diff options
| author | Jenkins <jenkins@review.openstack.org> | 2012-09-03 14:25:57 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2012-09-03 14:25:57 +0000 |
| commit | 5d94144708ba30d35decec2d006c837545579d0e (patch) | |
| tree | 83ac00577920cefae723a251700b14e4b0e3654d | |
| parent | ca6505ef66ecdd948325ee37b627e813cc5ad56d (diff) | |
| parent | 84db80e46d1fdf442ec13c9eb106efbd3c4985ac (diff) | |
Merge "Update nova-rpc-zmq-receiver to load nova.conf."
| -rwxr-xr-x | bin/nova-rpc-zmq-receiver | 17 |
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, |
