diff --git a/qinling/config.py b/qinling/config.py index c1e30096..13fd37c5 100644 --- a/qinling/config.py +++ b/qinling/config.py @@ -94,7 +94,7 @@ engine_opts = [ cfg.IntOpt( 'function_service_expiration', default=300, - help='Maximum service time for function in orchestrator.' + help='Maximum service time in seconds for function in orchestrator.' ) ] @@ -135,20 +135,9 @@ kubernetes_opts = [ ] CONF = cfg.CONF - CLI_OPTS = [launch_opt] - -CONF.register_opts(api_opts, group=API_GROUP) -CONF.register_opts(pecan_opts, group=PECAN_GROUP) -CONF.register_opts(engine_opts, group=ENGINE_GROUP) -CONF.register_opts(storage_opts, group=STORAGE_GROUP) -CONF.register_opts(kubernetes_opts, group=KUBERNETES_GROUP) CONF.register_cli_opts(CLI_OPTS) - -default_group_opts = itertools.chain( - CLI_OPTS, - [] -) +default_group_opts = itertools.chain(CLI_OPTS, []) def list_opts(): @@ -162,6 +151,9 @@ def list_opts(): ] +for group, options in list_opts(): + CONF.register_opts(list(options), group) + _DEFAULT_LOG_LEVELS = [ 'eventlet.wsgi.server=WARN', 'oslo_service.periodic_task=INFO', @@ -175,7 +167,6 @@ def parse_args(args=None, usage=None, default_config_files=None): default_log_levels = log.get_default_log_levels() default_log_levels.extend(_DEFAULT_LOG_LEVELS) log.set_defaults(default_log_levels=default_log_levels) - log.register_options(CONF) CONF( diff --git a/qinling/services/periodics.py b/qinling/services/periodics.py index eb713fc3..1353d22c 100644 --- a/qinling/services/periodics.py +++ b/qinling/services/periodics.py @@ -50,7 +50,7 @@ def handle_function_service_expiration(ctx, engine_client, orchestrator): function_id={'in': expiry_ids} ) - LOG.info('Found total expiry function mapping numbers: %s', len(mappings)) + LOG.info('Found %s total expiry function mappings', len(mappings)) with db_api.transaction(): for m in mappings: