diff options
author | Russell Bryant <rbryant@redhat.com> | 2013-04-10 09:37:24 -0400 |
---|---|---|
committer | Russell Bryant <rbryant@redhat.com> | 2013-04-10 17:03:47 -0400 |
commit | 7f9874b8c4bceb6cf7dff1ecfd4729f9927195b2 (patch) | |
tree | f401cb72b5834b4f6501813d155a8532048b786e /nova/compute | |
parent | 6b8d5eec07307c54c2756a4d3428297880c156bc (diff) | |
download | nova-7f9874b8c4bceb6cf7dff1ecfd4729f9927195b2.tar.gz nova-7f9874b8c4bceb6cf7dff1ecfd4729f9927195b2.tar.xz nova-7f9874b8c4bceb6cf7dff1ecfd4729f9927195b2.zip |
Fix issues with check_instance_shared_storage.
Commit 52f6981aa35e27c48587ad2320891db8364edd02 added a new method to
the compute rpc API. A test was not added to compute/test_rpcapi.py for
this. I noticed when I hit a bug in a patch I'm working on that would
have been caught by this test.
The addition to the client side also missed adding the version number
that was required for this method to be supported.
Since the versioning wasn't set up fully, this patch goes ahead and adds
the instance to the data being sent, as well. It's more consistent,
even if not used (yet).
Fix bug 1167356.
Change-Id: I46055a666fe3cf4a923002f11d22c3b6a6d020e2
Diffstat (limited to 'nova/compute')
-rwxr-xr-x | nova/compute/manager.py | 2 | ||||
-rw-r--r-- | nova/compute/rpcapi.py | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/nova/compute/manager.py b/nova/compute/manager.py index 687594ab9..e23b7c0e9 100755 --- a/nova/compute/manager.py +++ b/nova/compute/manager.py @@ -3062,7 +3062,7 @@ class ComputeManager(manager.SchedulerDependentManager): raise exception.NotFound(_("Host %(host)s not found") % locals()) @exception.wrap_exception(notifier=notifier, publisher_id=publisher_id()) - def check_instance_shared_storage(self, ctxt, data): + def check_instance_shared_storage(self, ctxt, instance, data): """Check if the instance files are shared :param context: security context diff --git a/nova/compute/rpcapi.py b/nova/compute/rpcapi.py index 1ddadde75..dfa19517e 100644 --- a/nova/compute/rpcapi.py +++ b/nova/compute/rpcapi.py @@ -251,9 +251,11 @@ class ComputeAPI(nova.openstack.common.rpc.proxy.RpcProxy): def check_instance_shared_storage(self, ctxt, instance, data): instance_p = jsonutils.to_primitive(instance) return self.call(ctxt, self.make_msg('check_instance_shared_storage', + instance=instance_p, data=data), topic=_compute_topic(self.topic, ctxt, None, - instance)) + instance), + version='2.28') def confirm_resize(self, ctxt, instance, migration, host, reservations=None, cast=True): |