← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1667667] [NEW] Rebuilding instance ignores image's property hw_disk_bus

 

Public bug reported:

How to reproduce it:

Two images, one of them with with hw_disk_bus=scsi and hw_scsi_model
=virtio-scsi properties:

$ glance image-show 48888bbf-ddbf-4ede-a30f-b5b4a8e68876
+------------------+--------------------------------------+
| Property         | Value                                |
+------------------+--------------------------------------+
| checksum         | 79b4436412283bb63c2cba4ac796bcd9     |
| container_format | bare                                 |
| created_at       | 2017-02-24T08:45:48Z                 |
| disk_format      | qcow2                                |
| id               | 48888bbf-ddbf-4ede-a30f-b5b4a8e68876 |
| min_disk         | 0                                    |
| min_ram          | 0                                    |
| name             | cirros-0.3.4-i386-disk               |
| owner            | 277132bf94b040f0842bd66d71a0d574     |
| protected        | False                                |
| size             | 12506112                             |
| status           | active                               |
| tags             | []                                   |
| updated_at       | 2017-02-24T08:45:52Z                 |
| virtual_size     | None                                 |
| visibility       | public                               |
+------------------+--------------------------------------+

$ glance image-show 8ce9540e-a802-4e39-a1b4-20cbff14ec18
+------------------+--------------------------------------+
| Property         | Value                                |
+------------------+--------------------------------------+
| checksum         | 79b4436412283bb63c2cba4ac796bcd9     |
| container_format | bare                                 |
| created_at       | 2017-02-24T09:07:44Z                 |
| disk_format      | qcow2                                |
| hw_disk_bus      | scsi                                 |
| hw_scsi_model    | virtio-scsi                          |
| id               | 8ce9540e-a802-4e39-a1b4-20cbff14ec18 |
| min_disk         | 0                                    |
| min_ram          | 0                                    |
| name             | cirros-scsi                          |
| owner            | bd560276f6bd48219ddcd7c9fb245ec1     |
| protected        | False                                |
| size             | 12506112                             |
| status           | active                               |
| tags             | []                                   |
| updated_at       | 2017-02-24T09:07:45Z                 |
| virtual_size     | None                                 |
| visibility       | shared                               |
+------------------+--------------------------------------+

$ nova boot --flavor m1.small --image 48888bbf-ddbf-4ede-a30f-b5b4a8e68876 vm1
$ virsh dumpxml instance-00000003 | grep '.*target.*bus'
      <target dev='vda' bus='virtio'/>

$ nova rebuild vm1 cirros-scsi
$ nova show vm1 | grep image
| image                                | cirros-scsi (8ce9540e-a802-4e39-a1b4-20cbff14ec18)
$ virsh dumpxml instance-00000003 | grep '.*target.*bus'
      <target dev='vda' bus='virtio'/>

The problem is that despite property hw_disk_bus set on cirros-scsi
(8ce9540e-a802-4e39-a1b4-20cbff14ec18), 'virtio' (and vda) is not
replaced in the instance's XML file.

The expected result IMO should be like a normal boot from this image:

$ nova boot --flavor m1.small --image 8ce9540e-a802-4e39-a1b4-20cbff14ec18 vm2
$ virsh dumpxml instance-00000004 | grep '.*target.*bus'
      <target dev='sda' bus='scsi'/>

** Affects: nova
     Importance: Undecided
         Status: New


** Tags: image rebuild scsi

** Description changed:

  How to reproduce it:
  
  Two images, one of them with with hw_disk_bus=scsi and hw_scsi_model
  =virtio-scsi properties:
  
- $ glance image-show 48888bbf-ddbf-4ede-a30f-b5b4a8e68876 
+ $ glance image-show 48888bbf-ddbf-4ede-a30f-b5b4a8e68876
  +------------------+--------------------------------------+
  | Property         | Value                                |
  +------------------+--------------------------------------+
  | checksum         | 79b4436412283bb63c2cba4ac796bcd9     |
  | container_format | bare                                 |
  | created_at       | 2017-02-24T08:45:48Z                 |
  | disk_format      | qcow2                                |
  | id               | 48888bbf-ddbf-4ede-a30f-b5b4a8e68876 |
  | min_disk         | 0                                    |
  | min_ram          | 0                                    |
  | name             | cirros-0.3.4-i386-disk               |
  | owner            | 277132bf94b040f0842bd66d71a0d574     |
  | protected        | False                                |
  | size             | 12506112                             |
  | status           | active                               |
  | tags             | []                                   |
  | updated_at       | 2017-02-24T08:45:52Z                 |
  | virtual_size     | None                                 |
  | visibility       | public                               |
  +------------------+--------------------------------------+
  
  $ glance image-show 8ce9540e-a802-4e39-a1b4-20cbff14ec18
  +------------------+--------------------------------------+
  | Property         | Value                                |
  +------------------+--------------------------------------+
  | checksum         | 79b4436412283bb63c2cba4ac796bcd9     |
  | container_format | bare                                 |
  | created_at       | 2017-02-24T09:07:44Z                 |
  | disk_format      | qcow2                                |
  | hw_disk_bus      | scsi                                 |
  | hw_scsi_model    | virtio-scsi                          |
  | id               | 8ce9540e-a802-4e39-a1b4-20cbff14ec18 |
  | min_disk         | 0                                    |
  | min_ram          | 0                                    |
  | name             | cirros-scsi                          |
  | owner            | bd560276f6bd48219ddcd7c9fb245ec1     |
  | protected        | False                                |
  | size             | 12506112                             |
  | status           | active                               |
  | tags             | []                                   |
  | updated_at       | 2017-02-24T09:07:45Z                 |
  | virtual_size     | None                                 |
  | visibility       | shared                               |
  +------------------+--------------------------------------+
  
- 
  $ nova boot --flavor m1.small --image 48888bbf-ddbf-4ede-a30f-b5b4a8e68876 vm1
  $ virsh dumpxml instance-00000003 | grep '.*target.*bus'
-       <target dev='vda' bus='virtio'/>
+       <target dev='vda' bus='virtio'/>
  
- $ nova rebuild vm1 cirros-scsi 
- $ stack@devstack-adam:~/devstack$ nova show vm1 | grep image
+ $ nova rebuild vm1 cirros-scsi
+ $ nova show vm1 | grep image
  | image                                | cirros-scsi (8ce9540e-a802-4e39-a1b4-20cbff14ec18)
  $ virsh dumpxml instance-00000003 | grep '.*target.*bus'
-       <target dev='vda' bus='virtio'/>
+       <target dev='vda' bus='virtio'/>
  
  The problem is that despite property hw_disk_bus set on cirros-scsi
  (8ce9540e-a802-4e39-a1b4-20cbff14ec18), 'virtio' (and vda) is not
  replaced in the instance's XML file.
  
  The expected result IMO should be like a normal boot from this image:
  
  $ nova boot --flavor m1.small --image 8ce9540e-a802-4e39-a1b4-20cbff14ec18 vm2
  $ virsh dumpxml instance-00000004 | grep '.*target.*bus'
-       <target dev='sda' bus='scsi'/>
+       <target dev='sda' bus='scsi'/>

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1667667

Title:
  Rebuilding instance ignores image's property hw_disk_bus

Status in OpenStack Compute (nova):
  New

Bug description:
  How to reproduce it:

  Two images, one of them with with hw_disk_bus=scsi and hw_scsi_model
  =virtio-scsi properties:

  $ glance image-show 48888bbf-ddbf-4ede-a30f-b5b4a8e68876
  +------------------+--------------------------------------+
  | Property         | Value                                |
  +------------------+--------------------------------------+
  | checksum         | 79b4436412283bb63c2cba4ac796bcd9     |
  | container_format | bare                                 |
  | created_at       | 2017-02-24T08:45:48Z                 |
  | disk_format      | qcow2                                |
  | id               | 48888bbf-ddbf-4ede-a30f-b5b4a8e68876 |
  | min_disk         | 0                                    |
  | min_ram          | 0                                    |
  | name             | cirros-0.3.4-i386-disk               |
  | owner            | 277132bf94b040f0842bd66d71a0d574     |
  | protected        | False                                |
  | size             | 12506112                             |
  | status           | active                               |
  | tags             | []                                   |
  | updated_at       | 2017-02-24T08:45:52Z                 |
  | virtual_size     | None                                 |
  | visibility       | public                               |
  +------------------+--------------------------------------+

  $ glance image-show 8ce9540e-a802-4e39-a1b4-20cbff14ec18
  +------------------+--------------------------------------+
  | Property         | Value                                |
  +------------------+--------------------------------------+
  | checksum         | 79b4436412283bb63c2cba4ac796bcd9     |
  | container_format | bare                                 |
  | created_at       | 2017-02-24T09:07:44Z                 |
  | disk_format      | qcow2                                |
  | hw_disk_bus      | scsi                                 |
  | hw_scsi_model    | virtio-scsi                          |
  | id               | 8ce9540e-a802-4e39-a1b4-20cbff14ec18 |
  | min_disk         | 0                                    |
  | min_ram          | 0                                    |
  | name             | cirros-scsi                          |
  | owner            | bd560276f6bd48219ddcd7c9fb245ec1     |
  | protected        | False                                |
  | size             | 12506112                             |
  | status           | active                               |
  | tags             | []                                   |
  | updated_at       | 2017-02-24T09:07:45Z                 |
  | virtual_size     | None                                 |
  | visibility       | shared                               |
  +------------------+--------------------------------------+

  $ nova boot --flavor m1.small --image 48888bbf-ddbf-4ede-a30f-b5b4a8e68876 vm1
  $ virsh dumpxml instance-00000003 | grep '.*target.*bus'
        <target dev='vda' bus='virtio'/>

  $ nova rebuild vm1 cirros-scsi
  $ nova show vm1 | grep image
  | image                                | cirros-scsi (8ce9540e-a802-4e39-a1b4-20cbff14ec18)
  $ virsh dumpxml instance-00000003 | grep '.*target.*bus'
        <target dev='vda' bus='virtio'/>

  The problem is that despite property hw_disk_bus set on cirros-scsi
  (8ce9540e-a802-4e39-a1b4-20cbff14ec18), 'virtio' (and vda) is not
  replaced in the instance's XML file.

  The expected result IMO should be like a normal boot from this image:

  $ nova boot --flavor m1.small --image 8ce9540e-a802-4e39-a1b4-20cbff14ec18 vm2
  $ virsh dumpxml instance-00000004 | grep '.*target.*bus'
        <target dev='sda' bus='scsi'/>

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1667667/+subscriptions