Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.toolbox
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Thomas Leymonerie
slapos.toolbox
Commits
ad1dca87
Commit
ad1dca87
authored
Dec 11, 2013
by
Nicolas Wavrant
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slaprunner: runSlapgridUntilSuccess returns how many times it runned
parent
fd90499b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
slapos/runner/utils.py
slapos/runner/utils.py
+8
-4
No files found.
slapos/runner/utils.py
View file @
ad1dca87
...
@@ -827,17 +827,21 @@ def runSlapgridUntilSuccess(config, step):
...
@@ -827,17 +827,21 @@ def runSlapgridUntilSuccess(config, step):
max_tries = (MAX_RUN_SOFTWARE if RUN_SOFTWARE else 0)
max_tries = (MAX_RUN_SOFTWARE if RUN_SOFTWARE else 0)
runSlapgridWithLock = runSoftwareWithLock
runSlapgridWithLock = runSoftwareWithLock
else:
else:
return
return -1
counter = max_tries
# XXX-Nico runSoftwareWithLock can return 0 or False (0==False)
# XXX-Nico runSoftwareWithLock can return 0 or False (0==False)
while max_tries > 0:
while counter > 0:
counter -= 1
slapgrid = runSlapgridWithLock(config)
slapgrid = runSlapgridWithLock(config)
if slapgrid:
if slapgrid:
break
break
max_tries -= 1
max_tries -= counter
# run instance only if we are deploying the software release,
# run instance only if we are deploying the software release,
# if it is defined so, and sr is correctly deployed
# if it is defined so, and sr is correctly deployed
if step == "software" and RUN_INSTANCE and slapgrid:
if step == "software" and RUN_INSTANCE and slapgrid:
runSlapgridUntilSuccess(config, "instance")
return (max_tries, runSlapgridUntilSuccess(config, "instance"))
else:
return max_tries
def setupDefaultSR(config):
def setupDefaultSR(config):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment