From acb6d78c56cfc3e9e0392d1020ce72225ff1db65 Mon Sep 17 00:00:00 2001 From: Dan Prince Date: Thu, 9 Aug 2012 22:56:25 -0400 Subject: Send host not ComputeNode into uptime RPC call. Updates the hypervisor uptime API extension to send the correct hostname to the get_host_uptime in the compute API. Fixes LP Bug #1035315. Change-Id: I4840f16bd3c60063e08e2de8313ef5ed3510555e --- nova/api/openstack/compute/contrib/hypervisors.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'nova/api') diff --git a/nova/api/openstack/compute/contrib/hypervisors.py b/nova/api/openstack/compute/contrib/hypervisors.py index 33aaa014b..2760e6c19 100644 --- a/nova/api/openstack/compute/contrib/hypervisors.py +++ b/nova/api/openstack/compute/contrib/hypervisors.py @@ -197,7 +197,8 @@ class HypervisorsController(object): # Get the uptime try: - uptime = self.api.get_host_uptime(context, hyp) + host = hyp['service']['host'] + uptime = self.api.get_host_uptime(context, host) except NotImplementedError: msg = _("Virt driver does not implement uptime function.") raise webob.exc.HTTPNotImplemented(explanation=msg) -- cgit