summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Prince <dprince@redhat.com>2012-08-30 21:23:07 -0400
committerDan Prince <dprince@redhat.com>2012-08-30 21:28:03 -0400
commit84db80e46d1fdf442ec13c9eb106efbd3c4985ac (patch)
tree4a97ebcd38950b146aa882d9ceb9d0d20461f7c1
parent0749ffc3bedc66df7c82af2887c9839d240d0526 (diff)
downloadnova-84db80e46d1fdf442ec13c9eb106efbd3c4985ac.tar.gz
nova-84db80e46d1fdf442ec13c9eb106efbd3c4985ac.tar.xz
nova-84db80e46d1fdf442ec13c9eb106efbd3c4985ac.zip
Update nova-rpc-zmq-receiver to load nova.conf.
Updates the bin/nova-rpc-zmq-receiver so that it makes use of FLAGS, calls parse_args, and loads the nova.conf config file like all other nova- binaries. Fixes LP Bug #1044153 Change-Id: I904e5d2ae491cd805be78038493d437dd1f7f3cc
-rwxr-xr-xbin/nova-rpc-zmq-receiver17
1 files changed, 9 insertions, 8 deletions
diff --git a/bin/nova-rpc-zmq-receiver b/bin/nova-rpc-zmq-receiver
index 926eee377..b6517ad1e 100755
--- a/bin/nova-rpc-zmq-receiver
+++ b/bin/nova-rpc-zmq-receiver
@@ -33,22 +33,23 @@ if os.path.exists(os.path.join(POSSIBLE_TOPDIR, 'nova', '__init__.py')):
sys.path.insert(0, POSSIBLE_TOPDIR)
from nova import exception
-from nova.openstack.common import cfg
+from nova import flags
from nova.openstack.common import log as logging
from nova.openstack.common import rpc
from nova.openstack.common.rpc import impl_zmq
from nova import utils
-CONF = cfg.CONF
+FLAGS = flags.FLAGS
+FLAGS.register_opts(rpc.rpc_opts)
def main():
- CONF.register_opts(rpc.rpc_opts)
- impl_zmq.register_opts(CONF)
+ flags.parse_args(sys.argv)
+ impl_zmq.register_opts(FLAGS)
logging.setup("nova")
utils.monkey_patch()
- ipc_dir = CONF.rpc_zmq_ipc_dir
+ ipc_dir = FLAGS.rpc_zmq_ipc_dir
# Create the necessary directories/files for this service.
if not os.path.isdir(ipc_dir):
@@ -61,10 +62,10 @@ def main():
logging.error(_("Could not create IPC socket directory."))
return
- with contextlib.closing(impl_zmq.ZmqProxy(CONF)) as reactor:
+ with contextlib.closing(impl_zmq.ZmqProxy(FLAGS)) as reactor:
consume_in = "tcp://%s:%s" % \
- (CONF.rpc_zmq_bind_address,
- CONF.rpc_zmq_port)
+ (FLAGS.rpc_zmq_bind_address,
+ FLAGS.rpc_zmq_port)
consumption_proxy = impl_zmq.InternalContext(None)
reactor.register(consumption_proxy,