Rebuilding instance ignores image's property hw_disk_bus

Bug #1667667 reported by Adam Kijak
40
This bug affects 7 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
In Progress
Low
Stephen Finucane

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'/>

Adam Kijak (adam-kijak)
description: updated
Changed in nova:
status: New → Confirmed
importance: Undecided → Low
tags: added: libvirt
Revision history for this message
Adam Kijak (adam-kijak) wrote :

The issue appears in also in reverse direction:
from image with 'hw_disk_bus; property to image without properties.

The result is that after rebuild an instance is still configured with scsi despite lack of properties on destination image.

Again, IMO the result should be the same as freshly spawned VM.

赵明俊 (falseuser)
Changed in nova:
assignee: nobody → 赵明俊 (falseuser)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/464991

Changed in nova:
status: Confirmed → In Progress
Changed in nova:
assignee: 赵明俊 (falseuser) → Stephen Finucane (stephenfinucane)
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.