From e878da0412993330d54e91c56739b6386f367eef Mon Sep 17 00:00:00 2001 From: Jeffrey Zhang Date: Mon, 29 Feb 2016 19:38:39 +0800 Subject: Reconfigure cinder service Change-Id: I8d207d1782acfebf5c07de39df3257fd9bdbbada Partially-implements: bp kolla-reconfig --- docker/base/set_configs.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'docker/base') diff --git a/docker/base/set_configs.py b/docker/base/set_configs.py index 16e3c35eb..83b635c30 100644 --- a/docker/base/set_configs.py +++ b/docker/base/set_configs.py @@ -282,9 +282,15 @@ def execute_config_check(): dest = config_file.get('dest') perm = config_file.get('perm') owner = config_file.get('owner') + optional = config_file.get('optional', False) if not os.path.exists(dest): - LOG.error('Dest file not exist: %s', dest) - sys.exit(1) + if optional: + LOG.info('Dest file does not exist, but is optional: %s', + dest) + return + else: + LOG.error('Dest file does not exist and is: %s', dest) + sys.exit(1) # check content with open(source) as fp1, open(dest) as fp2: if fp1.read() != fp2.read(): -- cgit v1.2.3