nova/nova/cmd
Mark McLoughlin 0861fc2d22 Re-work how debugger CLI opts are registered
CLI options must be registered before the command line is parsed or a
cfg.ArgsAlreadyParsedError is raised.

Since commit 2cbea24 we are registering two 'remote_debug' arguments
in nova.service. In commit b506529, we see a hack being added to
ensure that nova.service is imported and the CLI opts registered
before config.parse_args() is called.

To clean this up somewhat, refactor all the elements of this remote
debugger support into nova.debugger. Avoid importing modules at
module import time since we need to import this before monkey
patching. Add a function for registering the CLI options just before
config.parse_args() is called. And fail gracefully if the CLI options
aren't registered when we called debugger.init().

Note that because the options aren't registered at module import time
any more, the config generator doesn't pick them up. However, that's
actually a good thing since this support doesn't work if you enable it
via config files since debugger.enabled() only looks at the command
line.

DocImpact: remote_debug options are not available via the config file,
only via the command line.

Change-Id: I97f747a2fb9222137203657df1d86ba89f3219e2
2014-03-25 06:44:50 -04:00
..
__init__.py Re-work how debugger CLI opts are registered 2014-03-25 06:44:50 -04:00
all.py Remove vi modelines 2014-02-03 14:19:44 +00:00
api.py Introduce Guru Meditation Reports into Nova 2014-02-24 19:24:41 -05:00
api_ec2.py Introduce Guru Meditation Reports into Nova 2014-02-24 19:24:41 -05:00
api_metadata.py Introduce Guru Meditation Reports into Nova 2014-02-24 19:24:41 -05:00
api_os_compute.py Introduce Guru Meditation Reports into Nova 2014-02-24 19:24:41 -05:00
baremetal_deploy_helper.py Remove vi modelines 2014-02-03 14:19:44 +00:00
baremetal_manage.py Remove vi modelines 2014-02-03 14:19:44 +00:00
cells.py Introduce Guru Meditation Reports into Nova 2014-02-24 19:24:41 -05:00
cert.py Introduce Guru Meditation Reports into Nova 2014-02-24 19:24:41 -05:00
compute.py Introduce Guru Meditation Reports into Nova 2014-02-24 19:24:41 -05:00
conductor.py Introduce Guru Meditation Reports into Nova 2014-02-24 19:24:41 -05:00
console.py Introduce Guru Meditation Reports into Nova 2014-02-24 19:24:41 -05:00
consoleauth.py Introduce Guru Meditation Reports into Nova 2014-02-24 19:24:41 -05:00
dhcpbridge.py Remove vi modelines 2014-02-03 14:19:44 +00:00
manage.py Enable flake8 H404 checking 2014-02-27 11:15:55 +04:00
network.py Block database access in nova-network binary 2014-03-12 12:13:52 -07:00
novnc.py Remove vi modelines 2014-02-03 14:19:44 +00:00
novncproxy.py Introduce Guru Meditation Reports into Nova 2014-02-24 19:24:41 -05:00
objectstore.py Introduce Guru Meditation Reports into Nova 2014-02-24 19:24:41 -05:00
scheduler.py Introduce Guru Meditation Reports into Nova 2014-02-24 19:24:41 -05:00
spicehtml5proxy.py Introduce Guru Meditation Reports into Nova 2014-02-24 19:24:41 -05:00
xvpvncproxy.py Introduce Guru Meditation Reports into Nova 2014-02-24 19:24:41 -05:00