Skip to content

Commit e103205

Browse files
authored
Update splunkversioncontrol_backup_class.py
1 parent 7e2d748 commit e103205

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

bin/splunkversioncontrol_backup_class.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -982,7 +982,7 @@ def run_script(self):
982982
if res == False:
983983
logger.warn("i=\"%s\" Unexpected failure while attempting to trust the remote git repo?! stdout '%s' stderr '%s'" % (self.stanzaName, output, stderrout))
984984

985-
(output, stderrout, res) = self.runOSProcess("cd %s; git clone %s" % (self.gitTempDir, self.gitRepoURL), timeout=30)
985+
(output, stderrout, res) = self.runOSProcess("cd %s; git clone %s" % (self.gitTempDir, self.gitRepoURL), timeout=120)
986986
if res == False:
987987
logger.fatal("i=\"%s\" git clone failed for some reason...on url %s stdout of '%s' with stderrout of '%s'" % (self.stanzaName, self.gitRepoURL, output, stderrout))
988988
sys.exit(1)
@@ -1038,7 +1038,7 @@ def run_script(self):
10381038
logger.info("i=\"%s\" %s does not exist, running against all apps now" % (self.stanzaName, versionControlFile))
10391039

10401040
#Always start from master and the current version (just in case changes occurred)
1041-
(output, stderrout, res) = self.runOSProcess("cd %s; git checkout master; git pull" % (self.gitTempDir), timeout=20)
1041+
(output, stderrout, res) = self.runOSProcess("cd %s; git checkout master; git pull" % (self.gitTempDir), timeout=120)
10421042
if res == False:
10431043
logger.warn("i=\"%s\" git checkout master or git pull failed, stdout is '%s' stderrout is '%s'" % (self.stanzaName, output, stderrout))
10441044

@@ -1160,7 +1160,7 @@ def run_script(self):
11601160
logger.info("i=\"%s\" Completed working with app=%s" % (self.stanzaName, app))
11611161

11621162
#Always start from master and the current version (just in case someone was messing around in the temp directory)
1163-
(output, stderrout, res) = self.runOSProcess("cd %s; git checkout master; git pull" % (self.gitTempDir), timeout=20)
1163+
(output, stderrout, res) = self.runOSProcess("cd %s; git checkout master; git pull" % (self.gitTempDir), timeout=120)
11641164
if res == False:
11651165
logger.warn("i=\"%s\" git checkout master or git pull failed, stdout is '%s' stderrout is '%s'" % (self.stanzaName, output, stderrout))
11661166

@@ -1169,7 +1169,7 @@ def run_script(self):
11691169
if res == False:
11701170
#We have one or more files to commit, do something
11711171
todaysDate = datetime.datetime.now().strftime("%Y-%m-%d_%H%M")
1172-
(output, stderrout, res) = self.runOSProcess("cd {0}; git add -A; git commit -am \"Updated by Splunk Version Control backup job {1}\"; git tag {2}; git push origin master --tags".format(self.gitTempDir, self.stanzaName, todaysDate), timeout=30)
1172+
(output, stderrout, res) = self.runOSProcess("cd {0}; git add -A; git commit -am \"Updated by Splunk Version Control backup job {1}\"; git tag {2}; git push origin master --tags".format(self.gitTempDir, self.stanzaName, todaysDate), timeout=120)
11731173
if res == False:
11741174
logger.error("i=\"%s\" Failure while commiting the new files, backup completed but git may not be up-to-date, stdout '%s' stderrout of '%s'" % (self.stanzaName, output, stderrout))
11751175
#Append to our tag list so the dashboard shows the new tag as a choice to "restore from"
@@ -1196,4 +1196,4 @@ def runOSProcess(self, command, timeout=10):
11961196
else:
11971197
return stdoutdata, stderrdata, True
11981198
p.kill()
1199-
return "", "timeout after %s seconds" % (timeout), False
1199+
return "", "timeout after %s seconds" % (timeout), False

0 commit comments

Comments
 (0)