Fix tempest init to update config options
tempest init does not write back the updated config options to config file after adding those to parser. Change-Id: Ib68e1d48ec0f36cecf13b083f26075d5a8813b62
This commit is contained in:
parent
63cb9a3718
commit
0e1dd8457f
@ -99,7 +99,6 @@ class TempestInit(command.Command):
|
||||
config_parse = moves.configparser.SafeConfigParser()
|
||||
config_parse.optionxform = str
|
||||
with open(conf_path, 'a+') as conf_file:
|
||||
config_parse.readfp(conf_file)
|
||||
# Set local lock_dir in tempest conf
|
||||
if not config_parse.has_section('oslo_concurrency'):
|
||||
config_parse.add_section('oslo_concurrency')
|
||||
@ -108,6 +107,7 @@ class TempestInit(command.Command):
|
||||
config_parse.set('DEFAULT', 'log_dir', log_dir)
|
||||
# Set default log filename to tempest.log
|
||||
config_parse.set('DEFAULT', 'log_file', 'tempest.log')
|
||||
config_parse.write(conf_file)
|
||||
|
||||
def copy_config(self, etc_dir, config_dir):
|
||||
shutil.copytree(config_dir, etc_dir)
|
||||
|
Loading…
Reference in New Issue
Block a user