Read global config file for cache utilities

Made provision to read gloabl glance-api.conf file by
cache-pruner, cache-cleaner command line utility tools
to make those compatible with centralized_db cache driver.

Related blueprint centralized-cache-db

Change-Id: I88d28dd086b6b57bedd9eda73534fa3e05dc8cc6
This commit is contained in:
Abhishek Kekane 2023-11-01 20:55:41 +00:00
parent 0bbaec2eeb
commit 9c7820740a
1 changed files with 6 additions and 1 deletions

View File

@ -657,7 +657,12 @@ def parse_args(args=None, usage=None, default_config_files=None):
def parse_cache_args(args=None):
config_files = cfg.find_config_files(project='glance', prog='glance-cache')
config_files = cfg.find_config_files(project='glance', prog='glance-api')
# NOTE(abhishekk): Reading glance-api file first and glance-cache file
# later so that if glance-cache file has different values set for some
# cache related options then they should take precedence.
config_files.extend(cfg.find_config_files(project='glance',
prog='glance-cache'))
parse_args(args=args, default_config_files=config_files)