Description of problem: When boot an instance from volume created from an instance, like: # nova boot --flavor m1.tiny --block-device source=image,id=5875cad9-4662-41da-b390-4638df154e01,dest=volume,size=1,shutdown=preserve,bootindex=0 --nic net-id=a5b46d6b-e89f-4399-ac62-1f33dee55662 cirros-nfs-from-volume With this the source_type of the volume is image # mysql -u root nova -e "select source_type,volume_id from block_device_mapping where volume_id='89aa74f6-459a-41da-a1c5-584f975c96a5'\G;" *************************** 1. row *************************** source_type: image volume_id: 89aa74f6-459a-41da-a1c5-584f975c96a5 As a result if we migrate the volume to a different storage backend, the migration fails with: 2017-02-06 04:53:35.432 899 ERROR nova.compute.manager [req-62a58fdd-031f-4117-a959-7f9008eae1d0 7de1d918a88540ee9cf9a15d845dad8f 6741168c17524c24b79ce5af6373a7c4 - - -] [instance: 18bdbbd8-684d-49a4-92ea-aa2ee335ccf2] Failed to swap volume 89aa74f6-459a-41da-a1c5-584f975c96a5 for 46123a0e-e158-4c32-8e24-125105b0f6bc 2017-02-06 04:53:35.432 899 ERROR nova.compute.manager [instance: 18bdbbd8-684d-49a4-92ea-aa2ee335ccf2] Traceback (most recent call last): 2017-02-06 04:53:35.432 899 ERROR nova.compute.manager [instance: 18bdbbd8-684d-49a4-92ea-aa2ee335ccf2] File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 4861, in _swap_volume 2017-02-06 04:53:35.432 899 ERROR nova.compute.manager [instance: 18bdbbd8-684d-49a4-92ea-aa2ee335ccf2] resize_to) 2017-02-06 04:53:35.432 899 ERROR nova.compute.manager [instance: 18bdbbd8-684d-49a4-92ea-aa2ee335ccf2] File "/usr/lib/python2.7/site-packages/nova/virt/libvirt/driver.py", line 1210, in swap_volume 2017-02-06 04:53:35.432 899 ERROR nova.compute.manager [instance: 18bdbbd8-684d-49a4-92ea-aa2ee335ccf2] driver_bdm = driver_block_device.DriverVolumeBlockDevice(bdm) 2017-02-06 04:53:35.432 899 ERROR nova.compute.manager [instance: 18bdbbd8-684d-49a4-92ea-aa2ee335ccf2] File "/usr/lib/python2.7/site-packages/nova/virt/block_device.py", line 105, in __init__ 2017-02-06 04:53:35.432 899 ERROR nova.compute.manager [instance: 18bdbbd8-684d-49a4-92ea-aa2ee335ccf2] self._transform() 2017-02-06 04:53:35.432 899 ERROR nova.compute.manager [instance: 18bdbbd8-684d-49a4-92ea-aa2ee335ccf2] File "/usr/lib/python2.7/site-packages/nova/virt/block_device.py", line 207, in _transform 2017-02-06 04:53:35.432 899 ERROR nova.compute.manager [instance: 18bdbbd8-684d-49a4-92ea-aa2ee335ccf2] raise _InvalidType 2017-02-06 04:53:35.432 899 ERROR nova.compute.manager [instance: 18bdbbd8-684d-49a4-92ea-aa2ee335ccf2] _InvalidType 2017-02-06 04:53:35.432 899 ERROR nova.compute.manager [instance: 18bdbbd8-684d-49a4-92ea-aa2ee335ccf2] This got fixed upstream with : https://review.openstack.org/#/c/315864/ With this change the migration is successful Version-Release number of selected component (if applicable): OSP8 ,python-nova-12.0.4-8.el7ost.noarch How reproducible: always Steps to Reproduce: 1. boot instance from volume as above 2. migrate volume to different storage backend: # cinder migrate 89aa74f6-459a-41da-a1c5-584f975c96a5 osp8-controller@nfs2\#nfs2 Actual results: result in migration error Expected results: successful migration Additional info:
This bugzilla has been removed from the release and needs to be reviewed and Triaged for another Target Release.
https://code.engineering.redhat.com/gerrit/97408
Verified as follows, ******** VERSION ******** 1:13.1.2-21.el7ost ***** LOGS ***** +--------------------------------------+-------------------------------------------------+ | Property | Value | +--------------------------------------+-------------------------------------------------+ | OS-DCF:diskConfig | MANUAL | | OS-EXT-AZ:availability_zone | | | OS-EXT-SRV-ATTR:host | - | | OS-EXT-SRV-ATTR:hypervisor_hostname | - | | OS-EXT-SRV-ATTR:instance_name | instance-00000001 | | 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 | 4FE3BaDrju7N | | config_drive | | | created | 2017-04-26T23:26:51Z | | flavor | m1.tiny (1) | | hostId | | | id | 5a831bda-4fca-4786-b76d-4d860b382ca6 | | image | Attempt to boot from volume - no image supplied | | key_name | - | | metadata | {} | | name | cirros-nfs-from-volume | | os-extended-volumes:volumes_attached | [] | | progress | 0 | | security_groups | default | | status | BUILD | | tenant_id | a1905277048b4c6f911b75cb40892592 | | updated | 2017-04-26T23:26:52Z | | user_id | 2d38202756c34ab1b693a63cccc061c3 | +--------------------------------------+-------------------------------------------------+ [user@serverX]# [user@serverX]# [user@serverX]# nova list +--------------------------------------+------------------------+--------+------------+-------------+---------------------+ | ID | Name | Status | Task State | Power State | Networks | +--------------------------------------+------------------------+--------+------------+-------------+---------------------+ | 5a831bda-4fca-4786-b76d-4d860b382ca6 | cirros-nfs-from-volume | ACTIVE | - | Running | public=172.24.4.227 | +--------------------------------------+------------------------+--------+------------+-------------+---------------------+ [user@serverX]# cinder list +--------------------------------------+--------+------+------+-------------+----------+--------------------------------------+ | ID | Status | Name | Size | Volume Type | Bootable | Attached to | +--------------------------------------+--------+------+------+-------------+----------+--------------------------------------+ | 23971086-1d69-41a2-9057-b058783412bc | in-use | | 1 | - | true | 5a831bda-4fca-4786-b76d-4d860b382ca6 | +--------------------------------------+--------+------+------+-------------+----------+--------------------------------------+ [user@serverX]# [user@serverX]# cinder migrate 23971086-1d69-41a2-9057-b058783412bc serverA@iscsi#iscsi Request to migrate volume <Volume: 23971086-1d69-41a2-9057-b058783412bc> has been accepted. [user@serverX]# [user@serverX]# cinder show 23971086-1d69-41a2-9057-b058783412bc | grep migration_status | migration_status | success |
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2017:1541