Set config_download_dir for each stack when exporting Ceph
Id8f5b00dd24848f73aeb9794000e0d44f0f9cbe8 introduced the bug this patch closes because the config_download_dir path now contains the stack name. In order to export data from multiple stacks, the config_download_dir path needs to be set per stack. Thus, move the declaration of this variable into the for stack in stacks loop. Closes-Bug: #1922790 Change-Id: I4c4de1cf2a97c87da8ee83074a310656031b788c
This commit is contained in:
parent
446667a851
commit
50afcda1d0
@ -90,17 +90,16 @@ class ExportOvercloudCeph(command.Command):
|
||||
raise Exception(
|
||||
"File '%s' already exists, not exporting." % output_file)
|
||||
|
||||
if not parsed_args.config_download_dir:
|
||||
config_download_dir = os.path.join(os.environ.get('HOME'),
|
||||
"overcloud-deploy",
|
||||
parsed_args.stack,
|
||||
'config-download')
|
||||
else:
|
||||
config_download_dir = parsed_args.config_download_dir
|
||||
|
||||
# extract ceph data for each stack into the cephs list
|
||||
cephs = []
|
||||
for stack in stacks:
|
||||
if not parsed_args.config_download_dir:
|
||||
config_download_dir = os.path.join(os.environ.get('HOME'),
|
||||
"overcloud-deploy",
|
||||
stack,
|
||||
'config-download')
|
||||
else:
|
||||
config_download_dir = parsed_args.config_download_dir
|
||||
self.log.info('Exporting Ceph data from stack %s at %s',
|
||||
stack, self.now)
|
||||
cephs.append(export.export_ceph(stack,
|
||||
|
Loading…
x
Reference in New Issue
Block a user