allow power state "BLOCKED" for live migrations if using Xen by libvirt

Bug #985587 reported by Christian Berendt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Low
Christian Berendt

Bug Description

There is an error in nova/scheduler/driver.py in method _live_migration_src_check making it impossible to have a working live migration for Xen instances using libvirt as management interface.

The power_state for a Xen instance can be power_state.BLOCKED, too, and the check in nova/scheduler/driver.py has to be completed if libvirt_type == 'xen'.

---snip---
fig:~ # xm list
Name ID Mem VCPUs State Time(s)
Domain-0 0 126568 16 r----- 4842.2
instance-0000000d 7 512 1 -b---- 30.0

fig:~ # ping -c 1 172.19.212.3
PING 172.19.212.3 (172.19.212.3) 56(84) bytes of data.
64 bytes from 172.19.212.3: icmp_seq=1 ttl=64 time=0.331 ms

--- 172.19.212.3 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.331/0.331/0.331/0.000 ms

os0006:~ # ./list.sh
+--------------------------------------+------------+--------+----------------------+
| ID | Name | Status | Networks |
+--------------------------------------+------------+--------+----------------------+
| d0b576a7-f8cb-46af-898c-e9cf4b89b2c4 | testing200 | ACTIVE | console=172.19.212.3 |
+--------------------------------------+------------+--------+----------------------+

os0006:~ # ./nova.sh live-migration d0b576a7-f8cb-46af-898c-e9cf4b89b2c4 plum.colo.b1-systems.de
ERROR:

2012-04-19 12:18:57 ERROR nova.api.openstack.compute.contrib.admin_actions [req-b9a8235b-0bb4-4a41-8cef-e14b22299fa6 181fa4bf5a244420a48e2fbb28118dde b845890ccdc44640a97ff486a961858a] Live migration of instance d0b576a7-f8cb-46af-898c-e9cf4b89b2c4 to host plum.colo.b1-systems.de failed
2012-04-19 12:18:57 TRACE nova.api.openstack.compute.contrib.admin_actions Traceback (most recent call last):
2012-04-19 12:18:57 TRACE nova.api.openstack.compute.contrib.admin_actions File "/usr/lib64/python2.6/site-packages/nova/api/openstack/compute/contrib/admin_actions.py", line 282, in _migrate_live
2012-04-19 12:18:57 TRACE nova.api.openstack.compute.contrib.admin_actions topic=FLAGS.compute_topic)
2012-04-19 12:18:57 TRACE nova.api.openstack.compute.contrib.admin_actions File "/usr/lib64/python2.6/site-packages/nova/scheduler/api.py", line 72, in live_migration
2012-04-19 12:18:57 TRACE nova.api.openstack.compute.contrib.admin_actions _call_scheduler("live_migration", context=context, params=params)
2012-04-19 12:18:57 TRACE nova.api.openstack.compute.contrib.admin_actions File "/usr/lib64/python2.6/site-packages/nova/scheduler/api.py", line 40, in _call_scheduler
2012-04-19 12:18:57 TRACE nova.api.openstack.compute.contrib.admin_actions return rpc.call(context, queue, kwargs)
2012-04-19 12:18:57 TRACE nova.api.openstack.compute.contrib.admin_actions File "/usr/lib64/python2.6/site-packages/nova/rpc/__init__.py", line 68, in call
2012-04-19 12:18:57 TRACE nova.api.openstack.compute.contrib.admin_actions return _get_impl().call(context, topic, msg, timeout)
2012-04-19 12:18:57 TRACE nova.api.openstack.compute.contrib.admin_actions File "/usr/lib64/python2.6/site-packages/nova/rpc/impl_kombu.py", line 674, in call
2012-04-19 12:18:57 TRACE nova.api.openstack.compute.contrib.admin_actions return rpc_amqp.call(context, topic, msg, timeout, Connection.pool)
2012-04-19 12:18:57 TRACE nova.api.openstack.compute.contrib.admin_actions File "/usr/lib64/python2.6/site-packages/nova/rpc/amqp.py", line 338, in call
2012-04-19 12:18:57 TRACE nova.api.openstack.compute.contrib.admin_actions rv = list(rv)
2012-04-19 12:18:57 TRACE nova.api.openstack.compute.contrib.admin_actions File "/usr/lib64/python2.6/site-packages/nova/rpc/amqp.py", line 306, in __iter__
2012-04-19 12:18:57 TRACE nova.api.openstack.compute.contrib.admin_actions raise result
2012-04-19 12:18:57 TRACE nova.api.openstack.compute.contrib.admin_actions RemoteError: Remote error: InstanceNotRunning Instance d0b576a7-f8cb-46af-898c-e9cf4b89b2c4 is not running.
2012-04-19 12:18:57 TRACE nova.api.openstack.compute.contrib.admin_actions [u'Traceback (most recent call last):\n', u' File "/usr/lib64/python2.6/site-packages/nova/rpc/amqp.py", line 252, in _process_data\n rval = node_func(context=ctxt, **node_args)\n', u' File "/usr/lib64/python2.6/site-packages/nova/scheduler/manager.py", line 97, in _schedule\n context, ex, *args, **kwargs)\n', u' File "/usr/lib64/python2.6/contextlib.py", line 23, in __exit__\n self.gen.next()\n', u' File "/usr/lib64/python2.6/site-packages/nova/scheduler/manager.py", line 92, in _schedule\n return driver_method(*args, **kwargs)\n', u' File "/usr/lib64/python2.6/site-packages/nova/scheduler/driver.py", line 213, in schedule_live_migration\n self._live_migration_src_check(context, instance_ref)\n', u' File "/usr/lib64/python2.6/site-packages/nova/scheduler/driver.py", line 252, in _live_migration_src_check\n instance_id=instance_ref[\'uuid\'])\n', u'InstanceNotRunning: Instance d0b576a7-f8cb-46af-898c-e9cf4b89b2c4 is not running.\n'].
---snap---

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/6713

Changed in nova:
assignee: nobody → Christian Berendt (berendt)
status: New → In Progress
summary: - live migration of xen instances using libvirt not possible
+ allow power state "BLOCKED" for live migrations if using Xen by libvirt
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/6713
Committed: http://github.com/openstack/nova/commit/a72f25dba2cccbbcdd8c8927f0bc6199272b67ce
Submitter: Jenkins
Branch: master

commit a72f25dba2cccbbcdd8c8927f0bc6199272b67ce
Author: Christian Berendt <email address hidden>
Date: Mon Apr 23 13:09:21 2012 +0200

    allow power state "BLOCKED" for live migrations if using Xen by libvirt

    fixes bug 985587

    Change-Id: I7184dd639733a68f6b31e5e3e4311c7aa8d50220

Changed in nova:
status: In Progress → Fix Committed
Devin Carlen (devcamcar)
Changed in nova:
milestone: none → folsom-1
importance: Undecided → Low
Thierry Carrez (ttx)
Changed in nova:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: folsom-1 → 2012.2
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.