refresh dynamic config if exists after expansion
This commit is contained in:
@ -607,6 +607,12 @@ retry for %s times" % start_retry_num)
|
||||
if not os.path.exists(static_config_dir):
|
||||
os.makedirs(static_config_dir)
|
||||
|
||||
# valid if dynamic config file exists.
|
||||
dynamic_file = "%s/bin/cluster_dynamic_config" % appPath
|
||||
dynamic_file_exist = False
|
||||
if os.path.exists(dynamic_file):
|
||||
dynamic_file_exist = True
|
||||
|
||||
for dbNode in self.context.clusterInfo.dbNodes:
|
||||
hostName = dbNode.name
|
||||
staticConfigPath = "%s/script/static_config_files/cluster_static_config_%s" % \
|
||||
@ -618,6 +624,11 @@ retry for %s times" % start_retry_num)
|
||||
hostSsh = SshTool([hostName])
|
||||
targetFile = "%s/bin/cluster_static_config" % appPath
|
||||
hostSsh.scpFiles(srcFile, targetFile, [hostName], self.envFile)
|
||||
# if dynamic config file exists, freshconfig it.
|
||||
if dynamic_file_exist:
|
||||
refresh_cmd = "gs_om -t refreshconf"
|
||||
hostSsh.getSshStatusOutput(refresh_cmd, [hostName], self.envFile)
|
||||
|
||||
self.cleanSshToolFile(hostSsh)
|
||||
|
||||
self.logger.debug("End to generate and send cluster static file.\n")
|
||||
|
Reference in New Issue
Block a user