config: Explicitly register 'remote_debug' CLI opts
We were registering the 'remote_debug' CLI opts as part of the 'nova.conf' init code. This meant not only every service we used (bar 'nova-console') but also every CLI tool we provided was exposing these options, even though they made zero sense in the latter option. Resolve this by explicitly registering the options against the services that we want them in. Specifically, these are the API services (nova-api, nova-api-metadata, nova-api-os-compute), the console proxy services (nova-novncproxy, nova-serialproxy, nova-spicehtml5proxy), nova-compute, nova-conductor and nova-scheduler. While we're here, we also clean up the documentation for these options since there are a few non-rST'y things in there. Change-Id: I7b7489e8412cc93d49904d4ef08a775b07b27d26 Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
This commit is contained in:
parent
2cddf595a8
commit
2362970d5c
@ -27,6 +27,7 @@ from oslo_reports import guru_meditation_report as gmr
|
||||
from oslo_reports import opts as gmr_opts
|
||||
|
||||
import nova.conf
|
||||
from nova.conf import remote_debug
|
||||
from nova import config
|
||||
from nova import exception
|
||||
from nova import objects
|
||||
@ -34,6 +35,7 @@ from nova import service
|
||||
from nova import version
|
||||
|
||||
CONF = nova.conf.CONF
|
||||
remote_debug.register_cli_opts(CONF)
|
||||
|
||||
|
||||
def main():
|
||||
|
@ -24,6 +24,7 @@ from oslo_reports import opts as gmr_opts
|
||||
|
||||
from nova.conductor import rpcapi as conductor_rpcapi
|
||||
import nova.conf
|
||||
from nova.conf import remote_debug
|
||||
from nova import config
|
||||
from nova import objects
|
||||
from nova.objects import base as objects_base
|
||||
@ -32,6 +33,7 @@ from nova import version
|
||||
|
||||
|
||||
CONF = nova.conf.CONF
|
||||
remote_debug.register_cli_opts(CONF)
|
||||
|
||||
|
||||
def main():
|
||||
|
@ -23,6 +23,7 @@ from oslo_reports import guru_meditation_report as gmr
|
||||
from oslo_reports import opts as gmr_opts
|
||||
|
||||
import nova.conf
|
||||
from nova.conf import remote_debug
|
||||
from nova import config
|
||||
from nova import objects
|
||||
from nova import service
|
||||
@ -30,6 +31,7 @@ from nova import version
|
||||
|
||||
|
||||
CONF = nova.conf.CONF
|
||||
remote_debug.register_cli_opts(CONF)
|
||||
|
||||
|
||||
def main():
|
||||
|
@ -26,13 +26,16 @@ from oslo_reports import opts as gmr_opts
|
||||
|
||||
import nova.conf
|
||||
from nova.conf import novnc
|
||||
from nova.conf import remote_debug
|
||||
from nova.console import websocketproxy
|
||||
from nova import objects
|
||||
from nova import version
|
||||
|
||||
|
||||
CONF = nova.conf.CONF
|
||||
remote_debug.register_cli_opts(CONF)
|
||||
novnc.register_cli_opts(CONF)
|
||||
|
||||
gmr_opts.set_defaults(CONF)
|
||||
objects.register_all()
|
||||
|
||||
|
@ -29,6 +29,7 @@ from nova.cmd import common as cmd_common
|
||||
from nova.compute import rpcapi as compute_rpcapi
|
||||
from nova.conductor import rpcapi as conductor_rpcapi
|
||||
import nova.conf
|
||||
from nova.conf import remote_debug
|
||||
from nova import config
|
||||
from nova import objects
|
||||
from nova.objects import base as objects_base
|
||||
@ -37,6 +38,7 @@ from nova import utils
|
||||
from nova import version
|
||||
|
||||
CONF = nova.conf.CONF
|
||||
remote_debug.register_cli_opts(CONF)
|
||||
|
||||
|
||||
def main():
|
||||
|
@ -23,12 +23,14 @@ from oslo_reports import opts as gmr_opts
|
||||
|
||||
from nova.conductor import rpcapi
|
||||
import nova.conf
|
||||
from nova.conf import remote_debug
|
||||
from nova import config
|
||||
from nova import objects
|
||||
from nova import service
|
||||
from nova import version
|
||||
|
||||
CONF = nova.conf.CONF
|
||||
remote_debug.register_cli_opts(CONF)
|
||||
|
||||
|
||||
def main():
|
||||
|
@ -23,12 +23,14 @@ import sys
|
||||
|
||||
from nova.cmd import baseproxy
|
||||
import nova.conf
|
||||
from nova.conf import remote_debug
|
||||
from nova.conf import vnc
|
||||
from nova import config
|
||||
from nova.console.securityproxy import rfb
|
||||
|
||||
|
||||
CONF = nova.conf.CONF
|
||||
remote_debug.register_cli_opts(CONF)
|
||||
vnc.register_cli_opts(CONF)
|
||||
|
||||
|
||||
|
@ -24,6 +24,7 @@ from oslo_reports import guru_meditation_report as gmr
|
||||
from oslo_reports import opts as gmr_opts
|
||||
|
||||
import nova.conf
|
||||
from nova.conf import remote_debug
|
||||
from nova import config
|
||||
from nova import objects
|
||||
from nova.scheduler import rpcapi as scheduler_rpcapi
|
||||
@ -31,6 +32,7 @@ from nova import service
|
||||
from nova import version
|
||||
|
||||
CONF = nova.conf.CONF
|
||||
remote_debug.register_cli_opts(CONF)
|
||||
|
||||
|
||||
def main():
|
||||
|
@ -21,11 +21,13 @@ import sys
|
||||
|
||||
from nova.cmd import baseproxy
|
||||
import nova.conf
|
||||
from nova.conf import remote_debug
|
||||
from nova.conf import serial_console as serial
|
||||
from nova import config
|
||||
|
||||
|
||||
CONF = nova.conf.CONF
|
||||
remote_debug.register_cli_opts(CONF)
|
||||
serial.register_cli_opts(CONF)
|
||||
|
||||
|
||||
|
@ -22,11 +22,13 @@ import sys
|
||||
|
||||
from nova.cmd import baseproxy
|
||||
import nova.conf
|
||||
from nova.conf import remote_debug
|
||||
from nova.conf import spice
|
||||
from nova import config
|
||||
|
||||
|
||||
CONF = nova.conf.CONF
|
||||
remote_debug.register_cli_opts(CONF)
|
||||
spice.register_cli_opts(CONF)
|
||||
|
||||
|
||||
|
@ -52,7 +52,6 @@ from nova.conf import placement
|
||||
from nova.conf import powervm
|
||||
from nova.conf import quota
|
||||
from nova.conf import rdp
|
||||
from nova.conf import remote_debug
|
||||
from nova.conf import rpc
|
||||
from nova.conf import scheduler
|
||||
from nova.conf import serial_console
|
||||
@ -119,5 +118,3 @@ workarounds.register_opts(CONF)
|
||||
wsgi.register_opts(CONF)
|
||||
xenserver.register_opts(CONF)
|
||||
zvm.register_opts(CONF)
|
||||
|
||||
remote_debug.register_cli_opts(CONF)
|
||||
|
@ -21,42 +21,43 @@ debugger_group = cfg.OptGroup('remote_debug',
|
||||
|
||||
CLI_OPTS = [
|
||||
cfg.HostAddressOpt('host',
|
||||
help="""
|
||||
Debug host (IP or name) to connect to. This command line parameter is used when
|
||||
you want to connect to a nova service via a debugger running on a different
|
||||
host.
|
||||
help="""
|
||||
Debug host (IP or name) to connect to.
|
||||
|
||||
Note that using the remote debug option changes how Nova uses the eventlet
|
||||
This command line parameter is used when you want to connect to a nova service
|
||||
via a debugger running on a different host.
|
||||
|
||||
Note that using the remote debug option changes how nova uses the eventlet
|
||||
library to support async IO. This could result in failures that do not occur
|
||||
under normal operation. Use at your own risk.
|
||||
|
||||
Possible Values:
|
||||
|
||||
* IP address of a remote host as a command line parameter
|
||||
to a nova service. For Example:
|
||||
* IP address of a remote host as a command line parameter to a nova service.
|
||||
For example::
|
||||
|
||||
/usr/local/bin/nova-compute --config-file /etc/nova/nova.conf
|
||||
--remote_debug-host <IP address where the debugger is running>
|
||||
nova-compute --config-file /etc/nova/nova.conf \
|
||||
--remote_debug-host <IP address of the debugger>
|
||||
"""),
|
||||
|
||||
cfg.PortOpt('port',
|
||||
help="""
|
||||
Debug port to connect to. This command line parameter allows you to specify
|
||||
the port you want to use to connect to a nova service via a debugger running
|
||||
on different host.
|
||||
help="""
|
||||
Debug port to connect to.
|
||||
|
||||
Note that using the remote debug option changes how Nova uses the eventlet
|
||||
This command line parameter allows you to specify the port you want to use to
|
||||
connect to a nova service via a debugger running on different host.
|
||||
|
||||
Note that using the remote debug option changes how nova uses the eventlet
|
||||
library to support async IO. This could result in failures that do not occur
|
||||
under normal operation. Use at your own risk.
|
||||
|
||||
Possible Values:
|
||||
|
||||
* Port number you want to use as a command line parameter
|
||||
to a nova service. For Example:
|
||||
* Port number you want to use as a command line parameter to a nova service.
|
||||
For example::
|
||||
|
||||
/usr/local/bin/nova-compute --config-file /etc/nova/nova.conf
|
||||
--remote_debug-host <IP address where the debugger is running>
|
||||
--remote_debug-port <port> it's listening on>.
|
||||
nova-compute --config-file /etc/nova/nova.conf \
|
||||
--remote_debug-host <IP address of the debugger> \
|
||||
--remote_debug-port <port debugger is listening on>.
|
||||
"""),
|
||||
]
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user