]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Use get_by_args instead of get_by_host_and_topic
authorIvy Zhang <shzyu@cn.ibm.com>
Tue, 15 Mar 2016 09:25:36 +0000 (05:25 -0400)
committerIvy Zhang <shzyu@cn.ibm.com>
Tue, 15 Mar 2016 09:25:36 +0000 (05:25 -0400)
We already changed to use get_by_args, but in init_host_with_rpc,
it still called get_by_host_and_topic instead of get_by_args.
Which would cause restart a disabled cinder-volume service failed

Change-Id: I10f562b4298e548f681030a71c828e3d2265e416
Closes-Bug: 1557366

cinder/volume/manager.py

index 102fcdbf45c2d50799cf3a00751fd068de99e89d..12bc5e0b75c58699610e5d572db43479398007a1 100644 (file)
@@ -522,9 +522,10 @@ class VolumeManager(manager.SchedulerDependentManager):
         stats = self.driver.get_volume_stats(refresh=True)
         svc_host = vol_utils.extract_host(self.host, 'backend')
         try:
-            service = objects.Service.get_by_host_and_topic(
-                context.get_admin_context(), svc_host,
-                CONF.volume_topic)
+            service = objects.Service.get_by_args(
+                context.get_admin_context(),
+                svc_host,
+                'cinder-volume')
         except exception.ServiceNotFound:
             with excutils.save_and_reraise_exception():
                 LOG.error(_LE("Service not found for updating "