Suspend/Pause not supported for libvirt

Bug #760484 reported by Édouard Thuleau
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Wishlist
NTT DATA

Bug Description

I use 2011.2~gamma2~bzr984-0ubuntu0ppa1~lucid1.

The suspend and pause commands are not supported by libvirt.

And when I try to use suspend or pause commands with OpenStack API, no message error are reported by the API but in nova-compute log, I can see the reason :

2011-04-14 10:55:23,289 DEBUG nova.rpc [-] received {u'_context_request_id': u'3IC9IU7K9O39RO4BBF1-', u'_context_read_deleted': False, u'args': {u'instance_i
d': u'1'}, u'_context_is_admin': None, u'_context_timestamp': u'2011-04-14T08:55:23Z', u'_context_user': u'user1', u'method': u'suspend_instance', u'_context
_project': u'simple', u'_context_remote_address': None} from (pid=1511) _receive /usr/lib/pymodules/python2.6/nova/rpc.py:167
2011-04-14 10:55:23,290 DEBUG nova.rpc [-] unpacked context: {'timestamp': u'2011-04-14T08:55:23Z', 'remote_address': None, 'project': u'simple', 'is_admin':
 None, 'user': u'user1', 'request_id': u'3IC9IU7K9O39RO4BBF1-', 'read_deleted': False} from (pid=1511) _unpack_context /usr/lib/pymodules/python2.6/nova/rpc.
py:331
2011-04-14 10:55:23,382 INFO nova.compute.manager [3IC9IU7K9O39RO4BBF1- user1 simple] check_instance_lock: decorating: |<function suspend_instance at 0x22af1
b8>|
2011-04-14 10:55:23,383 INFO nova.compute.manager [3IC9IU7K9O39RO4BBF1- user1 simple] check_instance_lock: arguments: |<nova.compute.manager.ComputeManager o
bject at 0x21a7410>| |<nova.context.RequestContext object at 0x3622650>| |1|
2011-04-14 10:55:23,383 DEBUG nova.compute.manager [3IC9IU7K9O39RO4BBF1- user1 simple] instance 1: getting locked state from (pid=1511) get_lock /usr/lib/pym
odules/python2.6/nova/compute/manager.py:680
2011-04-14 10:55:23,437 INFO nova.compute.manager [3IC9IU7K9O39RO4BBF1- user1 simple] check_instance_lock: locked: |False|
2011-04-14 10:55:23,438 INFO nova.compute.manager [3IC9IU7K9O39RO4BBF1- user1 simple] check_instance_lock: admin: |None|
2011-04-14 10:55:23,438 INFO nova.compute.manager [3IC9IU7K9O39RO4BBF1- user1 simple] check_instance_lock: executing: |<function suspend_instance at 0x22af1b
8>|
2011-04-14 10:55:23,494 AUDIT nova.compute.manager [3IC9IU7K9O39RO4BBF1- user1 simple] instance 1: suspending
2011-04-14 10:55:23,555 ERROR nova [-] Exception during message handling
(nova): TRACE: Traceback (most recent call last):
(nova): TRACE: File "/usr/lib/pymodules/python2.6/nova/rpc.py", line 188, in _receive
(nova): TRACE: rval = node_func(context=ctxt, **node_args)
(nova): TRACE: File "/usr/lib/pymodules/python2.6/nova/exception.py", line 120, in _wrap
(nova): TRACE: return f(*args, **kw)
(nova): TRACE: File "/usr/lib/pymodules/python2.6/nova/compute/manager.py", line 105, in decorated_function
(nova): TRACE: function(self, context, instance_id, *args, **kwargs)
(nova): TRACE: File "/usr/lib/pymodules/python2.6/nova/compute/manager.py", line 624, in suspend_instance
(nova): TRACE: lambda result: self._update_state_callback(self,
(nova): TRACE: File "/usr/lib/pymodules/python2.6/nova/exception.py", line 120, in _wrap
(nova): TRACE: return f(*args, **kw)
(nova): TRACE: File "/usr/lib/pymodules/python2.6/nova/virt/libvirt_conn.py", line 556, in suspend
(nova): TRACE: raise exception.ApiError("suspend not supported for libvirt")
(nova): TRACE: ApiError: ApiError: suspend not supported for libvirt
(nova): TRACE:
2011-04-14 10:56:05,568 INFO nova.compute.manager [-] DB/VM state mismatch. Changing state from '0' to '1'

So libvirt cannot Resume/pause instance and the instance continuous to running correctly.

Tags: consistency

Related branches

Thierry Carrez (ttx)
Changed in nova:
importance: Undecided → Wishlist
status: New → Confirmed
tags: added: consistency
Changed in nova:
status: Confirmed → In Progress
Thierry Carrez (ttx)
Changed in nova:
assignee: nobody → NTT DATA (nttdata)
Thierry Carrez (ttx)
Changed in nova:
status: In Progress → Fix Committed
Revision history for this message
Kei Masumoto (masumotok) wrote :

I think kvm-pause-supend is not included in this version.
Can you check suspend() in /usr/lib/pymodules/python2.6/nova/virt/libvirt_conn.py?
if that method just say "ApiError: suspend not supported for libvirt" and raise exception.
kvm-pause-suspend has not been merged to 2011.2~gamma2~bzr984-0ubuntu0ppa1~lucid1.

Revision history for this message
Thierry Carrez (ttx) wrote :

It was merged to trunk as http://bazaar.launchpad.net/~hudson-openstack/nova/trunk/revision/1126
Will be part of 2011.3~d1, and obviously *not* part of 2011.2~gamma2~bzr984-0ubuntu0ppa1~lucid1 (which was produced in April)

Revision history for this message
Kei Masumoto (masumotok) wrote :

Ok, it seems my misunderstanding. No further action is necessary.

Thierry Carrez (ttx)
Changed in nova:
milestone: none → diablo-1
Revision history for this message
Davor Cubranic (cubranic) wrote :

Thierry, why do I get "No route matched for POST /servers/2/pause" in nova-api.log when I try to run nova pause? Nova-api version is 2011.3~d3~20110629.1227-0ubuntu0ppa1~natty1.

Revision history for this message
Thierry Carrez (ttx) wrote :

@Davor: I don't know, but you should create a new bug about this... Adding information to an already-closed bug won't help in getting an answer.

Revision history for this message
Davor Cubranic (cubranic) wrote :

Thanks Thierry.

Thierry Carrez (ttx)
Changed in nova:
milestone: diablo-1 → 2011.3
status: Fix Committed → Fix Released
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.