Bug 1498831

Summary: [Backport] Block based migration doesn't work for instances that have a volume attached
Product: Red Hat OpenStack Reporter: Lee Yarwood <lyarwood>
Component: openstack-novaAssignee: Lee Yarwood <lyarwood>
Status: CLOSED ERRATA QA Contact: Joe H. Rahme <jhakimra>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 8.0 (Liberty)CC: ahoness, apevec, awaugama, berrange, ccollett, cllewellyn, dasmith, dcadzow, eglynn, jraju, jthomas, kchamart, lhh, lyarwood, molasaga, mschuppe, ochalups, pablo.iranzo, panbalag, pneedle, sbauza, sferdjao, sgordon, smulholland, srevivo, vaggarwa, vromanso
Target Milestone: zstreamKeywords: FeatureBackport, Triaged, ZStream
Target Release: 8.0 (Liberty)   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: openstack-nova-12.0.6-21.el7ost Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1381965 Environment:
Last Closed: 2017-11-29 16:03:15 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1380289, 1381533, 1381965    
Bug Blocks: 1381612    

Comment 3 Joe H. Rahme 2017-11-27 14:13:17 UTC
[stack@undercloud-0 testingdir]$ openstack server create --flavor m1.tiny --image e0d141de-37dd-4f3c-8b50-e435b68f3c55 vm1
+--------------------------------------+-------------------------------------------------------------------------+
| Field                                | Value                                                                   |
+--------------------------------------+-------------------------------------------------------------------------+
| OS-DCF:diskConfig                    | MANUAL                                                                  |
| OS-EXT-AZ:availability_zone          |                                                                         |
| OS-EXT-SRV-ATTR:host                 | None                                                                    |
| OS-EXT-SRV-ATTR:hypervisor_hostname  | None                                                                    |
| 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               | None                                                                    |
| OS-SRV-USG:terminated_at             | None                                                                    |
| accessIPv4                           |                                                                         |
| accessIPv6                           |                                                                         |
| addresses                            |                                                                         |
| adminPass                            | QU6ZUy2rKfKM                                                            |
| config_drive                         |                                                                         |
| created                              | 2017-11-27T13:28:06Z                                                    |
| flavor                               | m1.tiny (1)                                                             |
| hostId                               |                                                                         |
| id                                   | 77a84c7b-3477-4730-aa4b-a0dbfa1a9411                                    |
| image                                | cirros-0.3.4-x86_64-disk.img_alt (e0d141de-37dd-4f3c-8b50-e435b68f3c55) |
| key_name                             | None                                                                    |
| name                                 | vm1                                                                     |
| os-extended-volumes:volumes_attached | []                                                                      |
| progress                             | 0                                                                       |
| project_id                           | c4884a8319c94236b225e4a071368bfb                                        |
| properties                           |                                                                         |
| security_groups                      | [{u'name': u'default'}]                                                 |
| status                               | BUILD                                                                   |
| updated                              | 2017-11-27T13:28:06Z                                                    |
| user_id                              | ed607d0ff5974b43b2fcfc519711eaf2                                        |
+--------------------------------------+-------------------------------------------------------------------------+
 
[stack@undercloud-0 testingdir]$ openstack volume create --size 1 vol1
+---------------------+--------------------------------------+
| Field               | Value                                |
+---------------------+--------------------------------------+
| attachments         | []                                   |
| availability_zone   | nova                                 |
| bootable            | false                                |
| created_at          | 2017-11-27T13:31:24.527526           |
| display_description | None                                 |
| display_name        | vol1                                 |
| encrypted           | False                                |
| id                  | c681dd68-54ac-4c0e-bb7b-812f3473bac1 |
| multiattach         | false                                |
| properties          |                                      |
| size                | 1                                    |
| snapshot_id         | None                                 |
| source_volid        | None                                 |
| status              | creating                             |
| type                | None                                 |
+---------------------+--------------------------------------+
 
[stack@undercloud-0 testingdir]$ openstack server add volume vm1 vol1
 
[stack@undercloud-0 testingdir]$ openstack volume list
+--------------------------------------+--------------+--------+------+------------------------------+
| ID                                   | Display Name | Status | Size | Attached to                  |
+--------------------------------------+--------------+--------+------+------------------------------+
| c681dd68-54ac-4c0e-bb7b-812f3473bac1 | vol1         | in-use |    1 | Attached to vm1 on /dev/vdb  |
+--------------------------------------+--------------+--------+------+------------------------------+
 
[stack@undercloud-0 testingdir]$ openstack server show vm1
+--------------------------------------+-------------------------------------------------------------------------+
| Field                                | Value                                                                   |
+--------------------------------------+-------------------------------------------------------------------------+
| OS-DCF:diskConfig                    | MANUAL                                                                  |
| OS-EXT-AZ:availability_zone          | nova                                                                    |
| OS-EXT-SRV-ATTR:host                 | compute-1.localdomain                                                   |
| OS-EXT-SRV-ATTR:hypervisor_hostname  | compute-1.localdomain                                                   |
| OS-EXT-SRV-ATTR:instance_name        | instance-00000001                                                       |
| OS-EXT-STS:power_state               | 1                                                                       |
| OS-EXT-STS:task_state                | None                                                                    |
| OS-EXT-STS:vm_state                  | active                                                                  |
| OS-SRV-USG:launched_at               | 2017-11-27T13:28:12.000000                                              |
| OS-SRV-USG:terminated_at             | None                                                                    |
| accessIPv4                           |                                                                         |
| accessIPv6                           |                                                                         |
| addresses                            | public=10.0.0.210                                                       |
| config_drive                         |                                                                         |
| created                              | 2017-11-27T13:28:06Z                                                    |
| flavor                               | m1.tiny (1)                                                             |
| hostId                               | 2d99d67c51a3ff7c05c2f57b1191378cbcd835a062bc5aa2471e0997                |
| id                                   | 77a84c7b-3477-4730-aa4b-a0dbfa1a9411                                    |
| image                                | cirros-0.3.4-x86_64-disk.img_alt (e0d141de-37dd-4f3c-8b50-e435b68f3c55) |
| key_name                             | None                                                                    |
| name                                 | vm1                                                                     |
| os-extended-volumes:volumes_attached | [{u'id': u'c681dd68-54ac-4c0e-bb7b-812f3473bac1'}]                      |
| progress                             | 0                                                                       |
| project_id                           | c4884a8319c94236b225e4a071368bfb                                        |
| properties                           |                                                                         |
| security_groups                      | [{u'name': u'default'}]                                                 |
| status                               | ACTIVE                                                                  |
| updated                              | 2017-11-27T13:28:12Z                                                    |
| user_id                              | ed607d0ff5974b43b2fcfc519711eaf2                                        |
+--------------------------------------+-------------------------------------------------------------------------+
 
[stack@undercloud-0 testingdir]$ nova live-migration --block-migrate vm1
[stack@undercloud-0 testingdir]$ nova show vm1
+--------------------------------------+----------------------------------------------------------------------------------+
| Property                             | Value                                                                            |
+--------------------------------------+----------------------------------------------------------------------------------+
| OS-DCF:diskConfig                    | MANUAL                                                                           |
| OS-EXT-AZ:availability_zone          | nova                                                                             |
| OS-EXT-SRV-ATTR:host                 | compute-0.localdomain                                                            |
| OS-EXT-SRV-ATTR:hostname             | vm1                                                                              |
| OS-EXT-SRV-ATTR:hypervisor_hostname  | compute-0.localdomain                                                            |
| OS-EXT-SRV-ATTR:instance_name        | instance-00000001                                                                |
| OS-EXT-SRV-ATTR:kernel_id            |                                                                                  |
| OS-EXT-SRV-ATTR:launch_index         | 0                                                                                |
| OS-EXT-SRV-ATTR:ramdisk_id           |                                                                                  |
| OS-EXT-SRV-ATTR:reservation_id       | r-7o8f64f3                                                                       |
| OS-EXT-SRV-ATTR:root_device_name     | /dev/vda                                                                         |
| OS-EXT-SRV-ATTR:user_data            | -                                                                                |
| OS-EXT-STS:power_state               | 1                                                                                |
| OS-EXT-STS:task_state                | -                                                                                |
| OS-EXT-STS:vm_state                  | active                                                                           |
| OS-SRV-USG:launched_at               | 2017-11-27T13:28:12.000000                                                       |
| OS-SRV-USG:terminated_at             | -                                                                                |
| accessIPv4                           |                                                                                  |
| accessIPv6                           |                                                                                  |
| config_drive                         |                                                                                  |
| created                              | 2017-11-27T13:28:06Z                                                             |
| flavor                               | m1.tiny (1)                                                                      |
| hostId                               | 7031c9a8a4d0a9e9424d047db8c1f165eb090fa299c09d0bd7c1c287                         |
| id                                   | 77a84c7b-3477-4730-aa4b-a0dbfa1a9411                                             |
| image                                | cirros-0.3.4-x86_64-disk.img_alt (e0d141de-37dd-4f3c-8b50-e435b68f3c55)          |
| key_name                             | -                                                                                |
| locked                               | False                                                                            |
| metadata                             | {}                                                                               |
| name                                 | vm1                                                                              |
| os-extended-volumes:volumes_attached | [{"id": "c681dd68-54ac-4c0e-bb7b-812f3473bac1", "delete_on_termination": false}] |
| progress                             | 0                                                                                |
| public network                       | 10.0.0.210                                                                       |
| security_groups                      | default                                                                          |
| status                               | ACTIVE                                                                           |
| tenant_id                            | c4884a8319c94236b225e4a071368bfb                                                 |
| updated                              | 2017-11-27T14:05:56Z                                                             |
| user_id                              | ed607d0ff5974b43b2fcfc519711eaf2                                                 |
+--------------------------------------+----------------------------------------------------------------------------------+

Comment 6 errata-xmlrpc 2017-11-29 16:03:15 UTC
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:3285