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
Nicolas Wavrant
slapos.toolbox
Commits
54e24dea
Commit
54e24dea
authored
Apr 07, 2014
by
Cédric Le Ninivin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
runner: do not use output from Popen for logging slapgrid commands
parent
5ee2f320
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 @
54e24dea
...
@@ -282,13 +282,15 @@ def runSoftwareWithLock(config, lock=True):
...
@@ -282,13 +282,15 @@ def runSoftwareWithLock(config, lock=True):
os
.
mkdir
(
config
[
'software_root'
])
os
.
mkdir
(
config
[
'software_root'
])
stopProxy
(
config
)
stopProxy
(
config
)
startProxy
(
config
)
startProxy
(
config
)
logfile
=
open
(
config
[
'software_log'
],
'w'
)
# XXX Hackish and unreliable
if
os
.
path
.
exists
(
config
[
'software_log'
]):
os
.
remove
(
config
[
'software_log'
])
if
not
updateProxy
(
config
):
if
not
updateProxy
(
config
):
return
False
return
False
slapgrid
=
Popen
([
config
[
'slapos'
],
'node'
,
'software'
,
'--all'
,
slapgrid
=
Popen
([
config
[
'slapos'
],
'node'
,
'software'
,
'--all'
,
'--cfg'
,
config
[
'slapos_cfg'
],
'--pidfile'
,
slapgrid_pid
,
'--cfg'
,
config
[
'slapos_cfg'
],
'--pidfile'
,
slapgrid_pid
,
'--verbose'
,
'--logfile'
,
config
[
'software_log'
]],
'--verbose'
,
'--logfile'
,
config
[
'software_log'
]],
stdout
=
logfile
,
name
=
'slapgrid-sr'
)
name
=
'slapgrid-sr'
)
if
lock
:
if
lock
:
slapgrid
.
wait
()
slapgrid
.
wait
()
#Saves the current compile software for re-use
#Saves the current compile software for re-use
...
@@ -370,13 +372,15 @@ def runInstanceWithLock(config, lock=True):
...
@@ -370,13 +372,15 @@ def runInstanceWithLock(config, lock=True):
slapgrid_pid
=
os
.
path
.
join
(
config
[
'run_dir'
],
'slapgrid-cp.pid'
)
slapgrid_pid
=
os
.
path
.
join
(
config
[
'run_dir'
],
'slapgrid-cp.pid'
)
startProxy
(
config
)
startProxy
(
config
)
logfile
=
open
(
config
[
'instance_log'
],
'w'
)
# XXX Hackish and unreliable
if
os
.
path
.
exists
(
config
[
'instance_log'
]):
os
.
remove
(
config
[
'instance_log'
])
if
not
(
updateProxy
(
config
)
and
requestInstance
(
config
)):
if
not
(
updateProxy
(
config
)
and
requestInstance
(
config
)):
return
False
return
False
slapgrid
=
Popen
([
config
[
'slapos'
],
'node'
,
'instance'
,
'--all'
,
slapgrid
=
Popen
([
config
[
'slapos'
],
'node'
,
'instance'
,
'--all'
,
'--cfg'
,
config
[
'slapos_cfg'
],
'--pidfile'
,
slapgrid_pid
,
'--cfg'
,
config
[
'slapos_cfg'
],
'--pidfile'
,
slapgrid_pid
,
'--verbose'
,
'--logfile'
,
config
[
'instance_log'
]],
'--verbose'
,
'--logfile'
,
config
[
'instance_log'
]],
stdout
=
logfile
,
name
=
'slapgrid-cp'
)
name
=
'slapgrid-cp'
)
if
lock
:
if
lock
:
slapgrid
.
wait
()
slapgrid
.
wait
()
return
(
True
if
slapgrid
.
returncode
==
0
else
False
)
return
(
True
if
slapgrid
.
returncode
==
0
else
False
)
...
...
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