nova/tools/xenserver
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
..
cleanup_sm_locks.py Update OpenStack LLC to Foundation 2013-02-26 19:15:29 -05:00
destroy_cached_images.py Remove unused import 2014-01-01 11:04:18 +08:00
populate_other_config.py Remove the monkey patching of _ into the builtins 2013-07-26 07:31:17 -07:00
rotate_xen_guest_logs.sh xenapi: Fix console rotate script 2013-07-24 10:43:35 +01:00
stress_test.py Xen: Add race-condition troubleshooting script. 2012-07-25 00:32:24 +00:00
vdi_chain_cleanup.py Update OpenStack LLC to Foundation 2013-02-26 19:15:29 -05:00
vm_vdi_cleaner.py Re-work how debugger CLI opts are registered 2014-03-25 06:44:50 -04:00