From: Koert van der Veer Date: Tue, 6 May 2014 09:04:00 +0000 (+0200) Subject: Properly initialize rpc in cinder-volume-usage-audit X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=b9d2780bf83a290951c08613263082bdefaadcfc;p=openstack-build%2Fcinder-build.git Properly initialize rpc in cinder-volume-usage-audit When RPC isn't initialized, any RPC based notifiers will fail, which renders cinder-volume-usage-audit mostly useless. Closes-Bug: #1316483 (cherry picked from commit e52445681400ff1f8a78a39dca07d4d9711dfe52) Change-Id: Ib6b9b1fdc76f289e9a44de520eeccbf99e28f40b --- diff --git a/bin/cinder-volume-usage-audit b/bin/cinder-volume-usage-audit index 53ea460ae..35af7caa1 100755 --- a/bin/cinder-volume-usage-audit +++ b/bin/cinder-volume-usage-audit @@ -55,6 +55,7 @@ gettextutils.install('cinder') from cinder import context from cinder import db from cinder.openstack.common import log as logging +from cinder import rpc from cinder import utils from cinder import version import cinder.volume.utils @@ -86,6 +87,7 @@ if __name__ == '__main__': version=version.version_string()) logging.setup("cinder") LOG = logging.getLogger("cinder") + rpc.init(CONF) begin, end = utils.last_completed_audit_period() if CONF.start_time: begin = datetime.strptime(CONF.start_time, "%Y-%m-%d %H:%M:%S")