libvirt hypervisor version checks are insufficient
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Undecided
|
Rafi Khardalian |
Bug Description
This impacts master and Grizzly.
With Grizzly, we implemented functionality ("live snapshots") in the libvirt driver to make use of new blockcopy/blockpull operations which became available in Qemu 1.0.3. The determination as to whether to attempt a live or cold (legacy) snapshot is based on libvirt's response to the getVersion() API call. The fundamental flaw in our approach is that libvirt will return the *current* version of Qemu, despite the fact that instances which were already running prior to upgrading Qemu are still running the older version. As such, we end up satisfying version requirements to utilize new functionality, when it isn't actually available until a given instance is restarted on the new version of Qemu.
To reproduce the problem:
1. Install QEMU < before 1.0.3.
2. Launch an instance ("instanceA"), and leave this instance running.
3. Upgrade Qemu to 1.0.3 (available via UCA) and restart libvirt.
4. Launch another instance ("InstanceB").
5. Attempt a snapshot of InstanceA. This will fail with an exception.
6. Attempt a snapshot of InstanceB. It will succeed.
#5 fails because the instance is actually running the version of Qemu which was installed in with step #1. Checking getVersion() via libvirt is not sufficient in this case, we need to know what version any given instance is running before attempting to use newer functionality.
Changed in nova: | |
assignee: | nobody → Rafi Khardalian (rkhardalian) |
Changed in nova: | |
status: | New → In Progress |
Changed in nova: | |
milestone: | none → havana-2 |
status: | Fix Committed → Fix Released |
Changed in nova: | |
milestone: | havana-2 → 2013.2 |
2013-06-21 18:28:39.998 TRACE nova.openstack. common. rpc.amqp Traceback (most recent call last): common. rpc.amqp File "/opt/stack/ nova/nova/ openstack/ common/ rpc/amqp. py", line 433, in _process_data common. rpc.amqp **args) common. rpc.amqp File "/opt/stack/ nova/nova/ openstack/ common/ rpc/dispatcher. py", line 172, in dispatch common. rpc.amqp result = getattr(proxyobj, method)(ctxt, **kwargs) common. rpc.amqp File "/opt/stack/ nova/nova/ exception. py", line 98, in wrapped common. rpc.amqp temp_level, payload) common. rpc.amqp File "/usr/lib/ python2. 7/contextlib. py", line 24, in __exit__ common. rpc.amqp self.gen.next() common. rpc.amqp File "/opt/stack/ nova/nova/ exception. py", line 75, in wrapped common. rpc.amqp return f(self, context, *args, **kw) common. rpc.amqp File "/opt/stack/ nova/nova/ compute/ manager. py", line 215, in decorated_function common. rpc.amqp pass common. rpc.amqp File "/usr/lib/ python2. 7/contextlib. py", line 24, in __exit__ common. rpc.amqp self.gen.next() common. rpc.amqp File "/opt/stack/ nova/nova/ compute/ manager. py", line 201, in decorated_function common. rpc.amqp return function(self, context, *args, **kwargs) common. rpc.amqp File "/opt/stack/ nova/nova/ compute/ manager. py", line 243, in decorated_function common. rpc.amqp e, sys.exc_info()) common. rpc.amqp File "/usr/lib/ python2. 7/contextlib. py", line 24, in __exit__ common. rpc.amqp self.gen.next() common. rpc.amqp File "/opt/stack/ nova/nova/ compute/ manager. py", line 230, in decorated_function common. rpc.amqp return function(self, context, *args, **kwargs) common. rpc.amqp File "/opt/stack/ nova/nova/ compute/ manager. py", line 1932, in snapshot_instance common. rpc.amqp self.driver. snapshot( context, instance, image_id, update_task_state) common. rpc.amqp File "/opt/stack/ nova/nova/ virt/libvirt/ driver. py", line 1248, in snapshot common. rpc.amqp image_format) common. rpc.amqp File "/opt/stack/ nova/nova/ virt/libvirt/ driver. py", l...
2013-06-21 18:28:39.998 TRACE nova.openstack.
2013-06-21 18:28:39.998 TRACE nova.openstack.
2013-06-21 18:28:39.998 TRACE nova.openstack.
2013-06-21 18:28:39.998 TRACE nova.openstack.
2013-06-21 18:28:39.998 TRACE nova.openstack.
2013-06-21 18:28:39.998 TRACE nova.openstack.
2013-06-21 18:28:39.998 TRACE nova.openstack.
2013-06-21 18:28:39.998 TRACE nova.openstack.
2013-06-21 18:28:39.998 TRACE nova.openstack.
2013-06-21 18:28:39.998 TRACE nova.openstack.
2013-06-21 18:28:39.998 TRACE nova.openstack.
2013-06-21 18:28:39.998 TRACE nova.openstack.
2013-06-21 18:28:39.998 TRACE nova.openstack.
2013-06-21 18:28:39.998 TRACE nova.openstack.
2013-06-21 18:28:39.998 TRACE nova.openstack.
2013-06-21 18:28:39.998 TRACE nova.openstack.
2013-06-21 18:28:39.998 TRACE nova.openstack.
2013-06-21 18:28:39.998 TRACE nova.openstack.
2013-06-21 18:28:39.998 TRACE nova.openstack.
2013-06-21 18:28:39.998 TRACE nova.openstack.
2013-06-21 18:28:39.998 TRACE nova.openstack.
2013-06-21 18:28:39.998 TRACE nova.openstack.
2013-06-21 18:28:39.998 TRACE nova.openstack.
2013-06-21 18:28:39.998 TRACE nova.openstack.
2013-06-21 18:28:39.998 TRACE nova.openstack.
2013-06-21 18:28:39.998 TRACE nova.openstack.
2013-06-21 18:28:39.998 TRACE nova.openstack.