[SRU] leave device name empty so that nova can determine it instead

Bug #1822129 reported by Eric Desrochers
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu Cloud Archive
Fix Released
Undecided
Eric Desrochers
Pike
Fix Released
Medium
Eric Desrochers
Queens
Fix Released
Medium
Eric Desrochers
Rocky
Fix Released
Medium
Eric Desrochers
Stein
Fix Released
Undecided
Eric Desrochers
horizon (Ubuntu)
Fix Released
Medium
Eric Desrochers
Xenial
In Progress
Medium
Unassigned
Bionic
Fix Released
Medium
Eric Desrochers
Cosmic
Fix Released
Medium
Eric Desrochers
Disco
Fix Released
Medium
Eric Desrochers

Bug Description

[IMPACT]

Horizon hardcoded 'vda' no matter what (legacy code) for boot volume scenarios. Meaning that if for instance we use an image with scsi decoration[1] horizon will name the device_name as 'vda' when it should be 'sda'.

Inside the instance, it will be 'sda' but horizon will show 'vda', if you then attach a second volume the volume will be seen as 'sda' in horizon, but 'sdb' in the instance and so on ... creating a inconsistency, and can also cause in certain circumstance VM to have issue to successfully reboot, hanging with "No bootable device".

There is 2 functions (thus fixes) separated as follow:

* setFinalSpecBootImageToVolume() which already uses BDMv2, in this case it was just a matter to remove the 'device_name' attribute as suggested per documentation[2]. This function take care of boot image from volume scenario.
-> https://review.openstack.org/#/c/644982/

* setFinalSpecBootFromVolumeDevice() which currently uses BDMv1 (legacy), in this case an upgrade to BDMv2 without setting up a 'device_name' attribute is sufficient to fix the issue. This function take care of booting from existing volume and snapshot.
-> https://review.openstack.org/648328/

Basically, with theses 2 fixes, it is no longer relying on "vol_device_name= 'vda'" as it was before as it is no longer needed since Liberty (again as per documentation)

An instance with scsi decoration will properly show 'sda' and without will show 'vda'.'vda' will still be taken when it's the right thing to do, but not because it is hardcorded like it used to before these fixes.

[1] - scsi meta decoration:
hw_disk_bus='scsi'
hw_scsi_model='virtio-scsi'

[2]- https://docs.openstack.org/nova/stein/user/block-device-mapping

[TEST CASE]

Here's some use case I can think of ....

With fix 1 in setFinalSpecBootImageToVolume():

* Test #1:
Use scsi meta data image decoration:
hw_disk_bus='scsi'
hw_scsi_model='virtio-scsi'

1. Go to the Horizon dashboard and launch an instance
2. Select "Boot from image (creates a new volume)" as Instance Boot Source

Expected result:
Instance should starts with /dev/sda as root device, instead of 'dev/vda'

* Test #2:
Use no scsi meta data image decoration

1. Go to the Horizon dashboard and launch an instance
2. Select "Boot from image (creates a new volume)" as Instance Boot Source

Expected result:
Instance will remain with /dev/vda as root device.
No behaviour change here.

With fix 2 in setFinalSpecBootFromVolumeDevice():

* Test #1:
Creating a server using an existing volume or volume snapshot.

[POTENTIAL REGRESSION]

* none expected, we basically leave nova to determine the device_name instead of having it force for Horizon by removing the 'device_name' attribute, and we also take benefit of it to upgrade some part of the code from legacy BDMv1 in flavor of BDMv2.

* Note: This will not fix device name inconsistency already created instance, but will fix newly created instance after having applied the package from where these fixes have been first introduced.

* Both fixes aren't dependant and can be SRU'd separately.

[OTHER INFORMATION]

* Upstream bug:
https://bugs.launchpad.net/nova/+bug/1560965

* Upstream git-review:

# Taking care of bootimagefromvolume
https://review.openstack.org/644982/
https://github.com/openstack/horizon/commit/4788c4d2f59b8aa08e5f599a6d2c327b6004dc0c

# Taking care of existing volume and snapshot
https://review.openstack.org/648328/

* Upstream Cherry Pick request:
https://review.openstack.org/#/q/I9d114c2c2e6736a8f1a8092afa568f930b656f0

Eric Desrochers (slashd)
tags: added: sts
Changed in horizon (Ubuntu):
assignee: nobody → Eric Desrochers (slashd)
importance: Undecided → Medium
status: New → In Progress
description: updated
description: updated
Eric Desrochers (slashd)
description: updated
description: updated
Eric Desrochers (slashd)
description: updated
description: updated
Eric Desrochers (slashd)
description: updated
description: updated
Eric Desrochers (slashd)
description: updated
summary: - leave device name empty so that nova can determine it instead
+ [SRU] leave device name empty so that nova can determine it instead
Eric Desrochers (slashd)
description: updated
no longer affects: horizon (Ubuntu Xenial)
Eric Desrochers (slashd)
description: updated
description: updated
Eric Desrochers (slashd)
description: updated
Eric Desrochers (slashd)
description: updated
Revision history for this message
Eric Desrochers (slashd) wrote :

debdiff for Horizon disco

Revision history for this message
Eric Desrochers (slashd) wrote :

"lp1822129-disco.debdiff"

Revision history for this message
Eric Desrochers (slashd) wrote :

Special note:

https://wiki.ubuntu.com/OpenStack/CorePackages

For horizon, we bundle the xstatic code alongside the upstream release tarball, so horizon has 2 orig tarballs. This requires the use of debuild:

debuild -S -sa
To generate a new xstatic orig tarball (see horizon/debian/README.source):

./debian/rules refresh-xstatic
Re-generating xstatic files for stable releases can be problematic. The general recommendation is to download the existing xstatic orig tarball from Launchpad and rename it accordingly.

tags: added: patch
Eric Desrochers (slashd)
description: updated
Revision history for this message
Eric Desrochers (slashd) wrote :

As discussed on irc, coreyb will do the sponsoring.

Revision history for this message
Corey Bryant (corey.bryant) wrote :

This is fixed upstream via the following -
bug: https://bugs.launchpad.net/nova/+bug/1560965
gerrit review: https://review.openstack.org/#/c/644982.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package horizon - 3:15.0.0~rc1-0ubuntu2

---------------
horizon (3:15.0.0~rc1-0ubuntu2) disco; urgency=medium

  [ Corey Bryant ]
  * Revert commited quilt patches.
  * Re-import orig tarball to fix broken svg files.

  [ Karl Williams ]
  * d/theme/ubuntu/_styles.scss: Fixing white bar on top of login
    page (LP: #1818770).

  [ Sahid Orentino Ferdjaoui]
  * d/theme/ubuntu/img: Replacing the corrupted PNG image
    image-background-pattern.png (LP: #1821896)

  [ Eric Desrochers ]
  * d/p/drop-devicename-creating-server-with-image-boot-to-volume.patch:
    When creating a server using an image boot source to new volume,
    horizon specified device_name 'vda'. If for instance we use an image
    with disk_bus type scsi, horizon will name the device_name as 'vda'
    when it should be 'sda'. As per BDMv2 documentation, it's best to not
    specify device_name. (LP: #1822129)

 -- Corey Bryant <email address hidden> Mon, 01 Apr 2019 15:59:34 -0400

Changed in horizon (Ubuntu Disco):
status: In Progress → Fix Released
Eric Desrochers (slashd)
Changed in horizon (Ubuntu Cosmic):
status: New → In Progress
Changed in horizon (Ubuntu Bionic):
status: New → In Progress
Changed in horizon (Ubuntu Cosmic):
assignee: nobody → Eric Desrochers (slashd)
Changed in horizon (Ubuntu Bionic):
assignee: nobody → Eric Desrochers (slashd)
Changed in horizon (Ubuntu Cosmic):
importance: Undecided → Medium
Changed in horizon (Ubuntu Bionic):
importance: Undecided → Medium
Revision history for this message
Edward Hope-Morley (hopem) wrote :

Openstack patches are tracked in bug 1560965 (this LP is for the SRU part)

Revision history for this message
Eric Desrochers (slashd) wrote :

lp1822129-cosmic.debdiff

Revision history for this message
Eric Desrochers (slashd) wrote :

lp1822129-bionic.debdiff

Eric Desrochers (slashd)
Changed in horizon (Ubuntu Xenial):
assignee: nobody → Eric Desrochers (slashd)
importance: Undecided → Medium
status: New → In Progress
Revision history for this message
Eric Desrochers (slashd) wrote :

lp1822129-xenial.debdiff

Revision history for this message
Corey Bryant (corey.bryant) wrote :

The pike, queens, rocky patches are all queued up in the package source and ready to upload once the current version that is in -proposed is tested and moved to -updates. It looks like we'll need an ocata patch as well.

Revision history for this message
Corey Bryant (corey.bryant) wrote :

New horizon package versions including this fix have been uploaded to the cosmic (rocky) and bionic (queens) unapproved queues where they are awaiting SRU team review:

https://launchpad.net/ubuntu/cosmic/+queue?queue_state=1&queue_text=horizon
https://launchpad.net/ubuntu/bionic/+queue?queue_state=1&queue_text=horizon

And also uploaded to pike-staging:

https://launchpad.net/~ubuntu-cloud-archive/+archive/ubuntu/pike-staging/+packages?field.name_filter=horizon

Revision history for this message
Corey Bryant (corey.bryant) wrote : Please test proposed package

Hello Eric, or anyone else affected,

Accepted horizon into pike-proposed. The package will build now and be available in the Ubuntu Cloud Archive in a few hours, and then in the -proposed repository.

Please help us by testing this new package. To enable the -proposed repository:

  sudo add-apt-repository cloud-archive:pike-proposed
  sudo apt-get update

Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-pike-needed to verification-pike-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-pike-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

tags: added: verification-pike-needed
Revision history for this message
Eric Desrochers (slashd) wrote :

[VERIFICATION PIKE]

I deployed a pike openstack env (including the horizon package found in -proposed)

[Test #1]

Expected result: /dev/sda

* Updated an image with the right metadata values:
$ glance image-update --property hw_disk_bus='scsi' --property hw_scsi_model='virtio-scsi' <IMAGE>

* Launched an instance using the image updated above

* Instance overview revealed:

Volumes Attached
Attached To
850806bd-4c97-4925-bda9-dfe744403f47 on /dev/sda

As expected ^

I confirm the fix works as expected for boot to image instance launch

[Test #2]

Expected result : /dev/vda

* Launched an instance using the image without metadata value.

* Instance overview revealed:

Volumes Attached
Attached To
b44eb145-f86f-47fa-a2d2-908bea7384cc on /dev/vda

tags: added: verification-pike-done
removed: verification-pike-needed
Revision history for this message
Eric Desrochers (slashd) wrote :

Adding another tag ^ as in the non-cloud world, we normally use 'verification-done-$RELEASE' and not 'verification-$RELEASE-done'. That way I make sure one of the 2 tags will trigger what it needs to trigger ;)

- Eric

tags: added: verification-done-pike
Revision history for this message
Brian Murray (brian-murray) wrote :

Hello Eric, or anyone else affected,

Accepted horizon into cosmic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/horizon/3:14.0.2-0ubuntu4 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-cosmic to verification-done-cosmic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-cosmic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in horizon (Ubuntu Cosmic):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-cosmic
Changed in horizon (Ubuntu Bionic):
status: In Progress → Fix Committed
tags: added: verification-needed-bionic
Revision history for this message
Brian Murray (brian-murray) wrote :

Hello Eric, or anyone else affected,

Accepted horizon into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/horizon/3:13.0.1-0ubuntu6 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Revision history for this message
Corey Bryant (corey.bryant) wrote :

Hello Eric, or anyone else affected,

Accepted horizon into rocky-proposed. The package will build now and be available in the Ubuntu Cloud Archive in a few hours, and then in the -proposed repository.

Please help us by testing this new package. To enable the -proposed repository:

  sudo add-apt-repository cloud-archive:rocky-proposed
  sudo apt-get update

Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-rocky-needed to verification-rocky-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-rocky-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

tags: added: verification-rocky-needed
Revision history for this message
Corey Bryant (corey.bryant) wrote :

Hello Eric, or anyone else affected,

Accepted horizon into queens-proposed. The package will build now and be available in the Ubuntu Cloud Archive in a few hours, and then in the -proposed repository.

Please help us by testing this new package. To enable the -proposed repository:

  sudo add-apt-repository cloud-archive:queens-proposed
  sudo apt-get update

Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-queens-needed to verification-queens-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-queens-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

tags: added: verification-queens-needed
Revision history for this message
Eric Desrochers (slashd) wrote :

[VERIFICATION BIONIC]

I deployed a openstack env (including the horizon package found in bionic-proposed)

[Test #1]

Expected result: /dev/sda

* Updated an image with the right metadata values:
$ glance image-update --property hw_disk_bus='scsi' --property hw_scsi_model='virtio-scsi' <IMAGE>

* Launched an instance using the image updated above

* Instance overview revealed:

Volumes Attached
Attached To ffbac3d9-ceea-4277-9878-7402bb7ba91c on /dev/sda

As expected ^

I confirm the fix works as expected for boot to image instance launch

[Test #2]

Expected result : /dev/vda

* Launched an instance using the image without metadata value.

* Instance overview revealed:

Volumes Attached
Attached To ba214e38-bc05-4a22-ba6b-1c88f6f7be2f on /dev/vda

tags: added: verification-done-bionic
removed: verification-needed-bionic
tags: added: verification-queens-done
removed: verification-queens-needed
Revision history for this message
Eric Desrochers (slashd) wrote :

[VERIFICATION COSMIC]

I deployed a openstack env (including the horizon package found in cosmic-proposed: 14.0.2-0ubuntu4)

[Test #1]

Expected result: /dev/sda

* Updated an image with the right metadata values:
$ glance image-update --property hw_disk_bus='scsi' --property hw_scsi_model='virtio-scsi' <IMAGE>

* Launched an instance using the image updated above

* Instance overview revealed:

Volumes Attached
b326f759-1cf5-409f-b7a5-0e19cbfd6232 on /dev/sda

As expected ^

I confirm the fix works as expected for boot to image instance launch

[Test #2]

Expected result : /dev/vda

* Launched an instance using the image without metadata value.

* Instance overview revealed:

Volumes Attached f18b6ad2-a18a-46ac-9c7e-33b55cd9f243 on /dev/vda

tags: added: verification-done-cosmic verification-rocky-done
removed: verification-needed-cosmic verification-rocky-needed
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for horizon has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package horizon - 3:14.0.2-0ubuntu4

---------------
horizon (3:14.0.2-0ubuntu4) cosmic; urgency=medium

  * d/p/*-monkey-patching-for-APITestCase.patch: Cherry-picked from
    upstream stable/rocky branch to fix unit tests for plugin dashboards
    (LP: #1806053).

horizon (3:14.0.2-0ubuntu3) cosmic; urgency=medium

  * d/p/drop-devicename-creating-server-with-image-boot-to-volume.patch:
    When creating a server using an image boot source to new volume,
    horizon specified device_name 'vda'. If for instance we use an image
    with disk_bus type scsi, horizon will name the device_name as 'vda'
    when it should be 'sda'. As per BDMv2 documentation, it's best to not
    specify device_name. (LP: #1822129)

 -- Corey Bryant <email address hidden> Thu, 09 May 2019 14:49:48 -0400

Changed in horizon (Ubuntu Cosmic):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package horizon - 3:13.0.1-0ubuntu6

---------------
horizon (3:13.0.1-0ubuntu6) bionic; urgency=medium

  * d/p/drop-devicename-creating-server-with-image-boot-to-volume.patch:
    When creating a server using an image boot source to new volume,
    horizon specified device_name 'vda'. If for instance we use an image
    with disk_bus type scsi, horizon will name the device_name as 'vda'
    when it should be 'sda'. As per BDMv2 documentation, it's best to not
    specify device_name. (LP: #1822129)

 -- Eric Desrochers <email address hidden> Wed, 17 Apr 2019 09:42:39 +0100

Changed in horizon (Ubuntu Bionic):
status: Fix Committed → Fix Released
Revision history for this message
Corey Bryant (corey.bryant) wrote :

The verification of the Stable Release Update for horizon has completed successfully and the package has now been released to -updates. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Corey Bryant (corey.bryant) wrote :

This bug was fixed in the package horizon - 3:14.0.2-0ubuntu4~cloud0
---------------

 horizon (3:14.0.2-0ubuntu4~cloud0) bionic-rocky; urgency=medium
 .
   * New update for the Ubuntu Cloud Archive.
 .
 horizon (3:14.0.2-0ubuntu4) cosmic; urgency=medium
 .
   * d/p/*-monkey-patching-for-APITestCase.patch: Cherry-picked from
     upstream stable/rocky branch to fix unit tests for plugin dashboards
     (LP: #1806053).
 .
 horizon (3:14.0.2-0ubuntu3) cosmic; urgency=medium
 .
   * d/p/drop-devicename-creating-server-with-image-boot-to-volume.patch:
     When creating a server using an image boot source to new volume,
     horizon specified device_name 'vda'. If for instance we use an image
     with disk_bus type scsi, horizon will name the device_name as 'vda'
     when it should be 'sda'. As per BDMv2 documentation, it's best to not
     specify device_name. (LP: #1822129)

Revision history for this message
Corey Bryant (corey.bryant) wrote :

The verification of the Stable Release Update for horizon has completed successfully and the package has now been released to -updates. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Corey Bryant (corey.bryant) wrote :

This bug was fixed in the package horizon - 3:13.0.1-0ubuntu6~cloud0
---------------

 horizon (3:13.0.1-0ubuntu6~cloud0) xenial-queens; urgency=medium
 .
   * New update for the Ubuntu Cloud Archive.
 .
 horizon (3:13.0.1-0ubuntu6) bionic; urgency=medium
 .
   * d/p/drop-devicename-creating-server-with-image-boot-to-volume.patch:
     When creating a server using an image boot source to new volume,
     horizon specified device_name 'vda'. If for instance we use an image
     with disk_bus type scsi, horizon will name the device_name as 'vda'
     when it should be 'sda'. As per BDMv2 documentation, it's best to not
     specify device_name. (LP: #1822129)

Revision history for this message
Corey Bryant (corey.bryant) wrote :

The verification of the Stable Release Update for horizon has completed successfully and the package has now been released to -updates. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Corey Bryant (corey.bryant) wrote :

This bug was fixed in the package horizon - 3:12.0.3-0ubuntu1~cloud2
---------------

 horizon (3:12.0.3-0ubuntu1~cloud2) xenial-pike; urgency=medium
 .
   * d/p/drop-devicename-creating-server-with-image-boot-to-volume.patch:
     When creating a server using an image boot source to new volume,
     horizon specified device_name 'vda'. If for instance we use an image
     with disk_bus type scsi, horizon will name the device_name as 'vda'
     when it should be 'sda'. As per BDMv2 documentation, it's best to not
     specify device_name. (LP: #1822129)

Eric Desrochers (slashd)
Changed in horizon (Ubuntu Xenial):
assignee: Eric Desrochers (slashd) → nobody
Revision history for this message
masterpe (michiel-y) wrote :

I'm using Openstack-ansible 18.1.8 to deploy Horizon. Where I use the source for the application. In the installed code I also see that this has not been fixed in the 18.1.8.

At what version of OSA has this been fixed?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.