[Bug 1822129] Re: leave device name empty so that nova can determine it instead

Eric Desrochers eric.desrochers at canonical.com
Thu Mar 28 15:35:58 UTC 2019


** Description changed:

- * Upstream bug:
- https://bugs.launchpad.net/nova/+bug/1560965
+ [IMPACT]
  
- * Upstream git-review:
- 
- # Taking care of bootimagefromvolume
- https://review.openstack.org/644982/
- 
- # Taking care of existing volume and snapshot
- https://review.openstack.org/648328/ 
- 
- * Description:
- 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'.
+ 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, creating a inconsistency  depending
  from where you look at, and can also cause VM to have issue to
  successfully reboot, hanging with "No bootable device".
  
  There is 2 functions separate 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.
  
  * 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.
  
  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]
+ 
+ * Test #1 :
+ Use Xen as hypervisor
+ 
+ 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/xvda as root device, instead of 'dev/vda'
+ 
+ * Test #2:
+ 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 #3:
+ Boot from : Volume snapshot and Volume also will implicitly pick '/dev/vda'
+ 
+ [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 promote some part of the
+ code from legacy BDMv1 to BDMv2. This will fix the inconsistency that
+ annoy Horizon users for quite some time now.
+ 
+ [OTHER INFORMATION]
+ 
+ * Upstream bug:
+ https://bugs.launchpad.net/nova/+bug/1560965
+ 
+ * Upstream git-review:
+ 
+ # Taking care of bootimagefromvolume
+ https://review.openstack.org/644982/
+ 
+ # Taking care of existing volume and snapshot
+ https://review.openstack.org/648328/

** Also affects: horizon (Ubuntu Disco)
   Importance: Medium
     Assignee: Eric Desrochers (slashd)
       Status: In Progress

** Also affects: horizon (Ubuntu Cosmic)
   Importance: Undecided
       Status: New

** Also affects: horizon (Ubuntu Xenial)
   Importance: Undecided
       Status: New

** Also affects: horizon (Ubuntu Bionic)
   Importance: Undecided
       Status: New

** Description changed:

  [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, creating a inconsistency  depending
  from where you look at, and can also cause VM to have issue to
  successfully reboot, hanging with "No bootable device".
  
  There is 2 functions separate 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.
  
  * 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.
  
  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]
  
  * Test #1 :
  Use Xen as hypervisor
  
  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/xvda as root device, instead of 'dev/vda'
  
  * Test #2:
  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 #3:
  Boot from : Volume snapshot and Volume also will implicitly pick '/dev/vda'
  
  [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 promote some part of the
  code from legacy BDMv1 to BDMv2. This will fix the inconsistency that
  annoy Horizon users for quite some time now.
  
+ * Note: This will not fix already created instance, but will fix newly
+ created instance after having applied the package from where these fix
+ has been first introduced.
+ 
  [OTHER INFORMATION]
  
  * Upstream bug:
  https://bugs.launchpad.net/nova/+bug/1560965
  
  * Upstream git-review:
  
  # Taking care of bootimagefromvolume
  https://review.openstack.org/644982/
  
  # Taking care of existing volume and snapshot
  https://review.openstack.org/648328/

-- 
You received this bug notification because you are a member of Ubuntu
OpenStack, which is subscribed to horizon in Ubuntu.
https://bugs.launchpad.net/bugs/1822129

Title:
  leave device name empty so that nova can determine it instead

Status in horizon package in Ubuntu:
  In Progress
Status in horizon source package in Xenial:
  New
Status in horizon source package in Bionic:
  New
Status in horizon source package in Cosmic:
  New
Status in horizon source package in Disco:
  In Progress

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, creating a inconsistency
  depending from where you look at, and can also cause VM to have issue
  to successfully reboot, hanging with "No bootable device".

  There is 2 functions separate 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.

  * 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.

  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]

  * Test #1 :
  Use Xen as hypervisor

  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/xvda as root device, instead of 'dev/vda'

  * Test #2:
  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 #3:
  Boot from : Volume snapshot and Volume also will implicitly pick '/dev/vda'

  [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 promote some part of the
  code from legacy BDMv1 to BDMv2. This will fix the inconsistency that
  annoy Horizon users for quite some time now.

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

  [OTHER INFORMATION]

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

  * Upstream git-review:

  # Taking care of bootimagefromvolume
  https://review.openstack.org/644982/

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

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/horizon/+bug/1822129/+subscriptions



More information about the Ubuntu-openstack-bugs mailing list