Rebuilding instance ignores image's property hw_disk_bus
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_
$ glance image-show 48888bbf-
+------
| Property | Value |
+------
| checksum | 79b4436412283bb
| container_format | bare |
| created_at | 2017-02-
| disk_format | qcow2 |
| id | 48888bbf-
| min_disk | 0 |
| min_ram | 0 |
| name | cirros-
| owner | 277132bf94b040f
| protected | False |
| size | 12506112 |
| status | active |
| tags | [] |
| updated_at | 2017-02-
| virtual_size | None |
| visibility | public |
+------
$ glance image-show 8ce9540e-
+------
| Property | Value |
+------
| checksum | 79b4436412283bb
| container_format | bare |
| created_at | 2017-02-
| disk_format | qcow2 |
| hw_disk_bus | scsi |
| hw_scsi_model | virtio-scsi |
| id | 8ce9540e-
| min_disk | 0 |
| min_ram | 0 |
| name | cirros-scsi |
| owner | bd560276f6bd482
| protected | False |
| size | 12506112 |
| status | active |
| tags | [] |
| updated_at | 2017-02-
| virtual_size | None |
| visibility | shared |
+------
$ nova boot --flavor m1.small --image 48888bbf-
$ 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-
$ 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-
The expected result IMO should be like a normal boot from this image:
$ nova boot --flavor m1.small --image 8ce9540e-
$ virsh dumpxml instance-00000004 | grep '.*target.*bus'
<target dev='sda' bus='scsi'/>
description: | updated |
Changed in nova: | |
status: | New → Confirmed |
importance: | Undecided → Low |
tags: | added: libvirt |
Changed in nova: | |
assignee: | nobody → 赵明俊 (falseuser) |
Changed in nova: | |
assignee: | 赵明俊 (falseuser) → Stephen Finucane (stephenfinucane) |
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.