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
Justin
slapos.toolbox
Commits
6e7664a5
Commit
6e7664a5
authored
Mar 15, 2014
by
Nicolas Wavrant
Committed by
Alain Takoudjou
Mar 17, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
runner: uses slapos instead of legacy slapgrid-cp and slapgrid-sr
parent
80d13fb7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
15 deletions
+15
-15
slapos/runner/utils.py
slapos/runner/utils.py
+15
-15
No files found.
slapos/runner/utils.py
View file @
6e7664a5
...
...
@@ -263,10 +263,10 @@ def removeProxyDb(config):
def
isSoftwareRunning
(
config
=
None
):
"""
Return True if slap
grid-sr
is still running and false if slapgrid if not
Return True if slap
os
is still running and false if slapgrid if not
"""
# XXX-Marco what is 'config' for?
return
isRunning
(
'slap
grid-sr
'
)
return
isRunning
(
'slap
os
'
)
def
runSoftwareWithLock
(
config
,
lock
=
True
):
...
...
@@ -285,10 +285,10 @@ def runSoftwareWithLock(config, lock=True):
logfile
=
open
(
config
[
'software_log'
],
'w'
)
if
not
updateProxy
(
config
):
return
False
slapgrid
=
Popen
([
config
[
'slap
grid_sr'
],
'-vc
'
,
'--pidfile'
,
slapgrid_pid
,
config
[
'configuration_file_path'
],
'--now'
,
'--develop'
],
stdout
=
logfile
,
name
=
'slap
grid-sr
'
)
slapgrid
=
Popen
([
config
[
'slap
os'
],
'node'
,
'software'
,
'--all
'
,
'--cfg'
,
config
[
'slapos_cfg'
],
'--pidfile'
,
slapgrid_pid
,
'--verbose'
,
'--logfile'
,
config
[
'software_log'
]
],
stdout
=
logfile
,
name
=
'slap
os
'
)
if
lock
:
slapgrid
.
wait
()
#Saves the current compile software for re-use
...
...
@@ -354,10 +354,10 @@ def loadSoftwareRList(config):
def
isInstanceRunning
(
config
=
None
):
"""
Return True if slap
grid-cp
is still running and False otherwise
Return True if slap
os
is still running and False otherwise
"""
# XXX-Marco what is 'config' for?
return
isRunning
(
'slap
grid-cp
'
)
return
isRunning
(
'slap
os
'
)
def
runInstanceWithLock
(
config
,
lock
=
True
):
...
...
@@ -373,10 +373,10 @@ def runInstanceWithLock(config, lock=True):
logfile
=
open
(
config
[
'instance_log'
],
'w'
)
if
not
(
updateProxy
(
config
)
and
requestInstance
(
config
)):
return
False
slapgrid
=
Popen
([
config
[
'slap
grid_cp'
],
'-vc
'
,
'--pidfile'
,
slapgrid_pid
,
config
[
'configuration_file_path'
],
'--now'
],
stdout
=
logfile
,
name
=
'slapgrid-cp
'
)
slapgrid
=
Popen
([
config
[
'slap
os'
],
'node'
,
'instance'
,
'--all
'
,
'--cfg'
,
config
[
'slapos_cfg'
],
'--pidfile'
,
slapgrid_pid
,
'--verbose'
,
'--logfile'
,
config
[
'instance_log'
]
],
stdout
=
logfile
,
name
=
'slapos
'
)
if
lock
:
slapgrid
.
wait
()
return
(
True
if
slapgrid
.
returncode
==
0
else
False
)
...
...
@@ -515,9 +515,9 @@ def configNewSR(config, projectpath):
folder = realpath(config, projectpath)
if folder:
if isInstanceRunning():
killRunningProcess('
slap
grid
-
cp
')
killRunningProcess('
slap
os
')
if isSoftwareRunning():
killRunningProcess('
slap
grid
-
sr
')
killRunningProcess('
slap
os
')
stopProxy(config)
removeProxyDb(config)
startProxy(config)
...
...
@@ -827,7 +827,7 @@ def buildAndRun(config):
def runSlapgridUntilSuccess(config, step):
"""Run slap
grid-sr or slapgrid-cp
several times,
"""Run slap
os
several times,
in the maximum of the constant MAX_RUN_~~~~"""
params = getBuildAndRunParams(config)
if step == "instance":
...
...
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