nova/tools
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
..
config Remove vi modelines 2014-02-03 14:19:44 +00:00
db Remove vi modelines 2014-02-03 14:19:44 +00:00
esx Remove vi modelines 2014-02-03 14:19:44 +00:00
vmwareapi VMware: add a file to help config the firewall for vnc 2014-03-19 11:32:11 -07:00
xenserver Re-work how debugger CLI opts are registered 2014-03-25 06:44:50 -04:00
clean-vlans Remove vi modelines 2014-02-03 14:19:44 +00:00
colorizer.py Remove vi modelines 2014-02-03 14:19:44 +00:00
enable-pre-commit-hook.sh Update OpenStack LLC to Foundation 2013-02-26 19:15:29 -05:00
install_venv_common.py Remove vi modelines 2014-02-03 14:19:44 +00:00
install_venv.py Remove vi modelines 2014-02-03 14:19:44 +00:00
lintstack.py Remove vi modelines 2014-02-03 14:19:44 +00:00
lintstack.sh Go back to the original branch after pylint check 2013-01-17 18:01:43 -05:00
nova-manage.bash_completion add nova-manage bash completion script 2012-06-20 17:02:49 +02:00
regression_tester.py Remove vi modelines 2014-02-03 14:19:44 +00:00
with_venv.sh support reloctable venv roots in testing framework 2013-02-07 12:38:45 -08:00