yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #69701
[Bug 1482040] Re: rebuild volume-backed instance with image does not replace image in root disk
Reviewed: https://review.openstack.org/520660
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=132636dd610d7e5cce24848776e942d229199e18
Submitter: Zuul
Branch: master
commit 132636dd610d7e5cce24848776e942d229199e18
Author: Matt Riedemann <mriedem.os@xxxxxxxxx>
Date: Thu Nov 16 12:18:34 2017 -0500
Fail fast if changing image on a volume-backed server rebuild
We don't support changing the image in the root disk of a volume-backed
server during a rebuild. The API will change the instance.image_ref
attribute to the newly supplied image_href to the rebuild API but the
actual image used by the server after the rebuild will be the original
image, which is wrong.
We need to just fail fast in this case in the API since the compute
service doesn't support it. We also need to ensure that instance.image_ref
doesn't get modified since a missing value here is used by novaclient and
probably other HTTP API users as an indication of a volume-backed server.
See the related mailing list discussion for more details:
http://lists.openstack.org/pipermail/openstack-dev/2017-October/123255.html
Co-Authored-By: Chris Friesen <chris.friesen@xxxxxxxxxxxxx>
Change-Id: If4c5fb782bb7e7714fb44f8ca9875121e066bc10
Closes-Bug: #1482040
** Changed in: nova
Status: In Progress => Fix Released
--
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/1482040
Title:
rebuild volume-backed instance with image does not replace image in
root disk
Status in OpenStack Compute (nova):
Fix Released
Status in OpenStack Compute (nova) ocata series:
Confirmed
Status in OpenStack Compute (nova) pike series:
Confirmed
Bug description:
When rebuild an volume-backed instance using normal images from glance,
nothing will be changed for the instance after rebuild except the image name
will be added to the instance, the instance is actually again built using the same
volume.
root@zheng-dev1:/var/log/nova# nova boot --flavor 1 --boot-volume daaddb77-4257-4ccd-86f2-220b31a0ce9b --nic net-id=8744ee96-7690-43bb-89b4-fcac805557bc test_rebuild
+--------------------------------------+--------------------------------------------------+
| Property | Value |
+--------------------------------------+--------------------------------------------------+
| OS-DCF:diskConfig | MANUAL |
| OS-EXT-AZ:availability_zone | nova |
| OS-EXT-SRV-ATTR:host | - |
| OS-EXT-SRV-ATTR:hypervisor_hostname | - |
| OS-EXT-SRV-ATTR:instance_name | instance-0000001a |
| OS-EXT-STS:power_state | 0 |
| OS-EXT-STS:task_state | scheduling |
| OS-EXT-STS:vm_state | building |
| OS-SRV-USG:launched_at | - |
| OS-SRV-USG:terminated_at | - |
| accessIPv4 | |
| accessIPv6 | |
| adminPass | KX5f2qfJBs9S |
| config_drive | |
| created | 2015-08-06T04:09:06Z |
| flavor | m1.tiny (1) |
| hostId | |
| id | 2f91193c-c462-4bcf-ad87-692c3d263cfd |
| image | Attempt to boot from volume - no image supplied |
| key_name | - |
| metadata | {} |
| name | test_rebuild |
| os-extended-volumes:volumes_attached | [{"id": "daaddb77-4257-4ccd-86f2-220b31a0ce9b"}] |
| progress | 0 |
| security_groups | default |
| status | BUILD |
| tenant_id | b8112a8d8227490eba99419b8a8c2555 |
| updated | 2015-08-06T04:09:06Z |
| user_id | ed64bccd0227444fa02dbd7695769a7d |
+--------------------------------------+--------------------------------------------------+
root@zheng-dev1:/var/log/nova# nova rebuild 2f91193c-c462-4bcf-ad87-692c3d263cfd 7bdff9a3-d051-4e75-bcd3-de69dbffe063
+-------------------+----------------------------------------------------------------+
| Property | Value |
+-------------------+----------------------------------------------------------------+
| OS-DCF:diskConfig | MANUAL |
| accessIPv4 | |
| accessIPv6 | |
| adminPass | GParrEjj3DEW |
| created | 2015-08-06T04:09:06Z |
| flavor | m1.tiny (1) |
| hostId | e9701452373fee3a5897683c6b914f4ba33b38b0fcff3b3719615bbd |
| id | 2f91193c-c462-4bcf-ad87-692c3d263cfd |
| image | cirros-0.3.4-x86_64-uec (7bdff9a3-d051-4e75-bcd3-de69dbffe063) |
| metadata | {} |
| name | test_rebuild |
| progress | 0 |
| public network | 2001:db8::19, 172.24.4.24 |
| status | REBUILD |
| tenant_id | b8112a8d8227490eba99419b8a8c2555 |
| updated | 2015-08-06T04:09:50Z |
| user_id | ed64bccd0227444fa02dbd7695769a7d |
+-------------------+----------------------------------------------------------------+
root@zheng-dev1:/var/log/nova# nova show 2f91193c-c462-4bcf-ad87-692c3d263cfd
+--------------------------------------+----------------------------------------------------------------+
| Property | Value |
+--------------------------------------+----------------------------------------------------------------+
| OS-DCF:diskConfig | MANUAL |
| OS-EXT-AZ:availability_zone | nova |
| OS-EXT-SRV-ATTR:host | zheng-dev1 |
| OS-EXT-SRV-ATTR:hypervisor_hostname | zheng-dev1 |
| OS-EXT-SRV-ATTR:instance_name | instance-0000001a |
| OS-EXT-STS:power_state | 1 |
| OS-EXT-STS:task_state | - |
| OS-EXT-STS:vm_state | active |
| OS-SRV-USG:launched_at | 2015-08-06T04:10:00.000000 |
| OS-SRV-USG:terminated_at | - |
| accessIPv4 | |
| accessIPv6 | |
| config_drive | True |
| created | 2015-08-06T04:09:06Z |
| flavor | m1.tiny (1) |
| hostId | e9701452373fee3a5897683c6b914f4ba33b38b0fcff3b3719615bbd |
| id | 2f91193c-c462-4bcf-ad87-692c3d263cfd |
| image | cirros-0.3.4-x86_64-uec (7bdff9a3-d051-4e75-bcd3-de69dbffe063) |
| key_name | - |
| metadata | {} |
| name | test_rebuild |
| os-extended-volumes:volumes_attached | [{"id": "daaddb77-4257-4ccd-86f2-220b31a0ce9b"}] |
| progress | 0 |
| public network | 2001:db8::19, 172.24.4.24 |
| security_groups | default |
| status | ACTIVE |
| tenant_id | b8112a8d8227490eba99419b8a8c2555 |
| updated | 2015-08-06T04:10:00Z |
| user_id | ed64bccd0227444fa02dbd7695769a7d |
+--------------------------------------+----------------------------------------------------------------+
add using virsh to see the xml, we can see that the instance is still
booted from the volume
</disk>
<disk type='block' device='disk'>
<driver name='qemu' type='raw' cache='none'/>
<source dev='/dev/disk/by-path/ip-10.250.10.17:3260-iscsi-iqn.2010-10.org.openstack:volume-daaddb77-4257-4ccd-86f2-220b31a0ce9b-lun-1'/>
<target dev='vda' bus='virtio'/>
<serial>daaddb77-4257-4ccd-86f2-220b31a0ce9b</serial>
<alias name='virtio-disk0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
</disk>
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1482040/+subscriptions
References