Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1380289 - [Backport] Block based migration doesn't work for instances that have a volume attached
[Backport] Block based migration doesn't work for instances that have a volum...
Status: CLOSED ERRATA
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-nova (Show other bugs)
7.0 (Kilo)
All Linux
high Severity high
: async
: 7.0 (Kilo)
Assigned To: Sahid Ferdjaoui
Gabriel Szasz
: ZStream
Depends On: 1381533 1383415
Blocks: 1381612 1381965 1498831
  Show dependency treegraph
 
Reported: 2016-09-29 04:27 EDT by VIKRANT
Modified: 2017-11-20 14:10 EST (History)
22 users (show)

See Also:
Fixed In Version: openstack-nova-2015.1.4-20.el7ost
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1381965 (view as bug list)
Environment:
Last Closed: 2017-02-15 17:56:50 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 2451541 None None None 2016-09-29 04:37 EDT
Red Hat Product Errata RHSA-2017:0282 normal SHIPPED_LIVE Moderate: openstack-cinder, openstack-glance, and openstack-nova security update 2017-02-15 22:52:44 EST

  None (edit)
Description VIKRANT 2016-09-29 04:27:19 EDT
Description of problem:

Block based migration doesn't work for instances that have a volume attached. This feature is not available in OSP 7 and OSP 8. From OSP 9 onwards we can do the migration successfully. Cu wants to back-port this feature to OSP 7. 

Version-Release number of selected component (if applicable):
RHEL OSP 7

How reproducible:
Every-time. 

Steps to Reproduce:
1. Spawn an instance using local ephemeral disk.
2. Attach a cinder volume to instance.
3. Try to block-migrate the instance. Migration is getting failed.

Actual results:
Migration getting failed. 

Expected results:
Migration should get completed successfully. 

Additional info:

==> From : OSP 9

~~~
# git log --oneline --grep "Allow block live migration of an instance with attached volumes"
ce5a2fb419f9 Merge "Allow block live migration of an instance with attached volumes"
23fd0389f0e2 Allow block live migration of an instance with attached volumes

# git log driver.py  | grep I8fcc3ef3cb5d9fd3a95067929c496fdb5976fd41
    Change-Id: I8fcc3ef3cb5d9fd3a95067929c496fdb5976fd41
~~~

==> From : OSP 8 [This feature is not present] 

~~~
# git log --oneline --grep "Allow block live migration of an instance with attached volumes"
~~~

==> Upstream patch which introduces this feature in Mitaka.

~~~
https://review.openstack.org/#/c/227278/
Comment 6 Sahid Ferdjaoui 2016-10-04 11:59:07 EDT
Ok so I finally tested the backport, you can see my test-case and the packages.

In an other time it would be nice if you can have a look at this bug 1357892, it's the same issue related to RHOS6. If you can confirm that the backport is working or not.

Thanks in advance.


Packages:
---------

  https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=11858590

Test case:
----------

[root@rhos7a 17.el7ost(keystone_admin)]# nova hypervisor-list
+----+-----------------------+-------+---------+
| ID | Hypervisor hostname   | State | Status  |
+----+-----------------------+-------+---------+
| 2  | rhos7a                | up    | enabled |
| 3  | rhos7b                | up    | enabled |
+----+-----------------------+-------+---------+


[root@rhos7a 17.el7ost(keystone_admin)]# nova flavor-create --ephemeral 2 eph1 99 64 1 1
+----+------+-----------+------+-----------+------+-------+-------------+-----------+
| ID | Name | Memory_MB | Disk | Ephemeral | Swap | VCPUs | RXTX_Factor | Is_Public |
+----+------+-----------+------+-----------+------+-------+-------------+-----------+
| 99 | eph1 | 64        | 1    | 2         |      | 1     | 1.0         | True      |
+----+------+-----------+------+-----------+------+-------+-------------+-----------+


[root@rhos7a 17.el7ost(keystone_admin)]# nova image-list
+--------------------------------------+--------+--------+--------+
| ID                                   | Name   | Status | Server |
+--------------------------------------+--------+--------+--------+
| c0738ff2-6fbc-4015-8168-0e0b00cc7d89 | cirros | ACTIVE |        |
+--------------------------------------+--------+--------+--------+

[root@rhos7a 17.el7ost(keystone_admin)]# cinder create 1 --image-id c0738ff2-6fbc-4015-8168-0e0b00cc7d89
+---------------------+--------------------------------------+
|       Property      |                Value                 |
+---------------------+--------------------------------------+
|     attachments     |                  []                  |
|  availability_zone  |                 nova                 |
|       bootable      |                false                 |
|      created_at     |      2016-10-04T10:46:04.012300      |
| display_description |                 None                 |
|     display_name    |                 None                 |
|      encrypted      |                False                 |
|          id         | af664878-c582-41ff-8189-8f81f4be1c3f |
|       image_id      | c0738ff2-6fbc-4015-8168-0e0b00cc7d89 |
|       metadata      |                  {}                  |
|     multiattach     |                false                 |
|         size        |                  1                   |
|     snapshot_id     |                 None                 |
|     source_volid    |                 None                 |
|        status       |               creating               |
|     volume_type     |                 None                 |
+---------------------+--------------------------------------+

[root@rhos7a 17.el7ost(keystone_admin)]# nova boot --flavor 99 --ephemeral size=1 --ephemeral size=1 --block-device source=volume,id=af664878-c582-41ff-8189-8f81f4be1c3f,dest=volume,bootindex=0 --nic net-id=753c360c-7353-4056-a663-d6c98e37e1b6 vm1

[root@rhos7a 17v1.el7ost(keystone_admin)]# nova show vm1
+--------------------------------------+----------------------------------------------------------+
| Property                             | Value                                                    |
+--------------------------------------+----------------------------------------------------------+
| OS-DCF:diskConfig                    | MANUAL                                                   |
| OS-EXT-AZ:availability_zone          | nova                                                     |
| OS-EXT-SRV-ATTR:host                 | rhos7b                                                   |
| OS-EXT-SRV-ATTR:hypervisor_hostname  | rhos7b                                                   |
| OS-EXT-SRV-ATTR:instance_name        | instance-00000007                                        |
| OS-EXT-STS:power_state               | 1                                                        |
| OS-EXT-STS:task_state                | -                                                        |
| OS-EXT-STS:vm_state                  | active                                                   |
| OS-SRV-USG:launched_at               | 2016-10-04T15:50:42.000000                               |
| OS-SRV-USG:terminated_at             | -                                                        |
| accessIPv4                           |                                                          |
| accessIPv6                           |                                                          |
| config_drive                         |                                                          |
| created                              | 2016-10-04T15:50:36Z                                     |
| flavor                               | eph1 (99)                                                |
| hostId                               | ba81b50a511482984723618de4bc7f360591605f6e71b2791e00b364 |
| id                                   | b333a7a0-a984-4c29-a753-57628e08864b                     |
| image                                | Attempt to boot from volume - no image supplied          |
| key_name                             | -                                                        |
| metadata                             | {}                                                       |
| name                                 | vm1                                                      |
| os-extended-volumes:volumes_attached | [{"id": "af664878-c582-41ff-8189-8f81f4be1c3f"}]         |
| private network                      | 10.0.0.7                                                 |
| progress                             | 0                                                        |
| security_groups                      | default                                                  |
| status                               | ACTIVE                                                   |
| tenant_id                            | 6c0dfbfc0db74a3fb5d078105200d188                         |
| updated                              | 2016-10-04T15:50:43Z                                     |
| user_id                              | f7a78c50e9834080961b4153e26e3414                         |
+--------------------------------------+----------------------------------------------------------+
[root@rhos7b 17v1.el7ost]# virsh domblklist instance-00000007
Target     Source
------------------------------------------------
vda        /dev/disk/by-path/ip-192.168.122.100:3260-iscsi-iqn.2010-10.org.openstack:volume-af664878-c582-41ff-8189-8f81f4be1c3f-lun-0
vdb        /var/lib/nova/instances/b333a7a0-a984-4c29-a753-57628e08864b/disk.eph0
vdc        /var/lib/nova/instances/b333a7a0-a984-4c29-a753-57628e08864b/disk.eph1

[root@rhos7a 17v1.el7ost(keystone_admin)]# nova show vm1
+--------------------------------------+----------------------------------------------------------+
| Property                             | Value                                                    |
+--------------------------------------+----------------------------------------------------------+
| OS-DCF:diskConfig                    | MANUAL                                                   |
| OS-EXT-AZ:availability_zone          | nova                                                     |
| OS-EXT-SRV-ATTR:host                 | rhos7a                                                   |
| OS-EXT-SRV-ATTR:hypervisor_hostname  | rhos7a                                                   |
| OS-EXT-SRV-ATTR:instance_name        | instance-00000007                                        |
| OS-EXT-STS:power_state               | 1                                                        |
| OS-EXT-STS:task_state                | -                                                        |
| OS-EXT-STS:vm_state                  | active                                                   |
| OS-SRV-USG:launched_at               | 2016-10-04T15:50:42.000000                               |
| OS-SRV-USG:terminated_at             | -                                                        |
| accessIPv4                           |                                                          |
| accessIPv6                           |                                                          |
| config_drive                         |                                                          |
| created                              | 2016-10-04T15:50:36Z                                     |
| flavor                               | eph1 (99)                                                |
| hostId                               | e73f7a2bb28368e3039f4c30488129eb78680e76166b19cb4017d4dc |
| id                                   | b333a7a0-a984-4c29-a753-57628e08864b                     |
| image                                | Attempt to boot from volume - no image supplied          |
| key_name                             | -                                                        |
| metadata                             | {}                                                       |
| name                                 | vm1                                                      |
| os-extended-volumes:volumes_attached | [{"id": "af664878-c582-41ff-8189-8f81f4be1c3f"}]         |
| private network                      | 10.0.0.7                                                 |
| progress                             | 0                                                        |
| security_groups                      | default                                                  |
| status                               | ACTIVE                                                   |
| tenant_id                            | 6c0dfbfc0db74a3fb5d078105200d188                         |
| updated                              | 2016-10-04T15:52:07Z                                     |
| user_id                              | f7a78c50e9834080961b4153e26e3414                         |
+--------------------------------------+----------------------------------------------------------+

[root@rhos7a 17v1.el7ost(keystone_admin)]# virsh domblklist instance-00000007
Target     Source
------------------------------------------------
vda        /dev/disk/by-path/ip-192.168.122.100:3260-iscsi-iqn.2010-10.org.openstack:volume-af664878-c582-41ff-8189-8f81f4be1c3f-lun-0
vdb        /var/lib/nova/instances/b333a7a0-a984-4c29-a753-57628e08864b/disk.eph0
vdc        /var/lib/nova/instances/b333a7a0-a984-4c29-a753-57628e08864b/disk.eph1
Comment 7 Sahid Ferdjaoui 2016-10-04 12:00:44 EDT
Forgot to indicate the command use to migrate the instance.

[root@rhos7a 17v1.el7ost(keystone_admin)]# nova live-migration --block-migrate vm1
Comment 22 Edu Alcaniz 2016-12-23 05:59:34 EST
Do we have date to deliver this errata?
Comment 26 errata-xmlrpc 2017-02-15 17:56:50 EST
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://rhn.redhat.com/errata/RHSA-2017-0282.html

Note You need to log in before you can comment on or make changes to this bug.