Skip to content

Commit

Permalink
Update server info file location.
Browse files Browse the repository at this point in the history
  • Loading branch information
wusun2 committed Sep 12, 2019
1 parent 64e7620 commit 2ea6acd
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/main/python/serverswap.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ def swap_servers(infile, outfile, searchitem, sep_str, swap_value, skip_lines):
print str(ip)

# Read Server Info
fileServer = options.path + "/conf/server-config.csv"
fileServer = options.path + "/conf/server-config-local.csv"
if not os.path.exists(fileServer):
fileServer = "T:/ABM/release/ABM/config/server-config.csv"
print fileServer
logFile = options.path + "/logFiles/serverswap.log"
if os.path.exists(logFile):
Expand All @@ -63,11 +65,13 @@ def swap_servers(infile, outfile, searchitem, sep_str, swap_value, skip_lines):
# Write error log if IP address not found
logWriteFile = open(logFile, "w")
if match == 'false':
logWriteFile.write('FATAL, Head Node not found - check for ' + str(ip) + ' in server-config.csv')
logWriteFile.write('Using server-config file in: ' + fileServer + "\n")
logWriteFile.write('FATAL, Head Node not found - check for ' + str(ip))
print 'Head Node not found'
else:
# Update Files in serverswap_files.csv
logWriteFile.write('MATCH, Head Node found - ' + str(ip) + ' in server-config.csv')
logWriteFile.write('Using server-config file in: ' + fileServer + "\n")
logWriteFile.write('MATCH, Head Node found - ' + str(ip))
skip = 0
fileUpdate = options.path + "/conf/serverswap_files.csv"
print fileUpdate
Expand Down

0 comments on commit 2ea6acd

Please sign in to comment.