Merge "Fix incorrect type conversion for cmd option '--docker-dir'"

This commit is contained in:
Zuul 2022-10-27 17:23:48 +00:00 committed by Gerrit Code Review
commit 0f67e99ee1
2 changed files with 4 additions and 3 deletions

View File

@ -224,7 +224,7 @@ _CLI_OPTS = [
cfg.MultiOpt('docker-dir', types.String(),
help=('Path to additional docker file template directory,'
' can be specified multiple times'),
short='D', default=[]),
short='D'),
cfg.StrOpt('logs-dir', help='Path to logs directory'),
cfg.BoolOpt('pull', default=True,
help='Attempt to pull a newer version of the base image'),

View File

@ -246,8 +246,9 @@ class KollaWorker(object):
self.temp_dir = tempfile.mkdtemp(prefix='kolla-' + ts)
self.working_dir = os.path.join(self.temp_dir, 'docker')
self.copy_dir(self.images_dir, self.working_dir)
for dir in self.conf.docker_dir:
self.copy_dir(dir, self.working_dir)
if self.conf.docker_dir:
for dir in self.conf.docker_dir:
self.copy_dir(dir, self.working_dir)
self.copy_apt_files()
LOG.debug('Created working dir: %s', self.working_dir)