Fix "config object already initialized" error
Change-Id: I865e082215dbdb231e0ef968e76b4925b776da2a
This commit is contained in:
parent
328dd6cd0c
commit
c2d78e6b73
|
@ -56,9 +56,15 @@ cli_opts = [
|
|||
default='/tmp/config-drive.img',
|
||||
help='Path where to store generated config drive image',
|
||||
),
|
||||
cfg.StrOpt(
|
||||
'image_build_dir',
|
||||
default='/tmp',
|
||||
help='Directory where the image is supposed to be built',
|
||||
),
|
||||
]
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.register_cli_opts(cli_opts)
|
||||
LOG = logging.getLogger(__name__)
|
||||
PROJECT = "bareon"
|
||||
|
||||
|
@ -145,7 +151,6 @@ def main(actions=None):
|
|||
|
||||
# Setup logging and process configuration options
|
||||
logging.register_options(CONF)
|
||||
CONF.register_cli_opts(cli_opts)
|
||||
CONF(sys.argv[1:], project=PROJECT,
|
||||
version=version.version_info.release_string())
|
||||
logging.setup(CONF, PROJECT)
|
||||
|
|
|
@ -115,17 +115,9 @@ opts = [
|
|||
)
|
||||
]
|
||||
|
||||
cli_opts = [
|
||||
cfg.StrOpt(
|
||||
'image_build_dir',
|
||||
default='/tmp',
|
||||
help='Directory where the image is supposed to be built',
|
||||
),
|
||||
]
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.register_opts(opts)
|
||||
CONF.register_cli_opts(cli_opts)
|
||||
CONF.import_opt('image_build_dir', 'bareon.cmd.agent')
|
||||
CONF.import_opt('mpath_lvm_preferred_names', 'bareon.actions.bootloader')
|
||||
CONF.import_opt('lvm_conf_path', 'bareon.actions.bootloader')
|
||||
|
||||
|
|
Loading…
Reference in New Issue