diff --git a/nova/cmd/baseproxy.py b/nova/cmd/baseproxy.py index aa398579fb28..999b8c102d0a 100644 --- a/nova/cmd/baseproxy.py +++ b/nova/cmd/baseproxy.py @@ -23,7 +23,6 @@ import sys from oslo_config import cfg from oslo_log import log as logging -from nova import config from nova.console import websocketproxy from nova.openstack.common.report import guru_meditation_report as gmr from nova import version @@ -44,8 +43,6 @@ def exit_with_error(msg, errno=-1): def proxy(host, port): - # Setup flags - config.parse_args(sys.argv) if CONF.ssl_only and not os.path.exists(CONF.cert): exit_with_error("SSL only and %s not found" % CONF.cert) diff --git a/nova/cmd/novncproxy.py b/nova/cmd/novncproxy.py index e7dc1fa01057..c34479cb7222 100644 --- a/nova/cmd/novncproxy.py +++ b/nova/cmd/novncproxy.py @@ -18,9 +18,12 @@ Websocket proxy that is compatible with OpenStack Nova noVNC consoles. Leverages websockify.py by Joel Martin """ +import sys + from oslo_config import cfg from nova.cmd import baseproxy +from nova import config opts = [ @@ -39,6 +42,7 @@ CONF.register_cli_opts(opts) def main(): # set default web flag option CONF.set_default('web', '/usr/share/novnc') + config.parse_args(sys.argv) baseproxy.proxy( host=CONF.novncproxy_host, diff --git a/nova/cmd/serialproxy.py b/nova/cmd/serialproxy.py index e12361f42a53..cc92915a66a9 100644 --- a/nova/cmd/serialproxy.py +++ b/nova/cmd/serialproxy.py @@ -17,10 +17,12 @@ Websocket proxy that is compatible with OpenStack Nova Serial consoles. Leverages websockify.py by Joel Martin. Based on nova-novncproxy. """ +import sys from oslo_config import cfg from nova.cmd import baseproxy +from nova import config opts = [ @@ -39,6 +41,7 @@ CONF.register_cli_opts(opts, group="serial_console") def main(): # set default web flag option CONF.set_default('web', None) + config.parse_args(sys.argv) baseproxy.proxy( host=CONF.serial_console.serialproxy_host, diff --git a/nova/cmd/spicehtml5proxy.py b/nova/cmd/spicehtml5proxy.py index efb7a5a13987..b0bd3971d70a 100644 --- a/nova/cmd/spicehtml5proxy.py +++ b/nova/cmd/spicehtml5proxy.py @@ -18,9 +18,12 @@ Websocket proxy that is compatible with OpenStack Nova SPICE HTML5 consoles. Leverages websockify.py by Joel Martin """ +import sys + from oslo_config import cfg from nova.cmd import baseproxy +from nova import config opts = [ @@ -37,6 +40,7 @@ CONF.register_cli_opts(opts, group='spice') def main(): + config.parse_args(sys.argv) baseproxy.proxy( host=CONF.spice.html5proxy_host,