default_aggregation_methods configuration worked in gnocchi-upgrade

We need set the default_aggregation_methods when config file is
loaded.

Change-Id: Id25372eb7faf206fe9b526205967d6f14f0b3373
Closes-Bug: #1680740
This commit is contained in:
liyi 2017-04-07 16:09:31 +08:00
parent 5beff0edcc
commit 3c224fc179
1 changed files with 5 additions and 5 deletions

View File

@ -48,17 +48,17 @@ def prepare_service(args=None, conf=None,
conf.register_opts(list(options),
group=None if group == "DEFAULT" else group)
# HACK(jd) I'm not happy about that, fix AP class to handle a conf object?
archive_policy.ArchivePolicy.DEFAULT_AGGREGATION_METHODS = (
conf.archive_policy.default_aggregation_methods
)
conf.set_default("workers", utils.get_default_workers(), group="metricd")
conf(args, project='gnocchi', validate_default_values=True,
default_config_files=default_config_files,
version=pbr.version.VersionInfo('gnocchi').version_string())
# HACK(jd) I'm not happy about that, fix AP class to handle a conf object?
archive_policy.ArchivePolicy.DEFAULT_AGGREGATION_METHODS = (
conf.archive_policy.default_aggregation_methods
)
# If no coordination URL is provided, default to using the indexer as
# coordinator
if conf.storage.coordination_url is None: