Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Rafael Monnerat
slapos.core
Commits
a5378e7e
Commit
a5378e7e
authored
Aug 10, 2011
by
Antoine Catton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Making the tests pass
parent
2e925da6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
slapos/grid/slapgrid.py
slapos/grid/slapgrid.py
+5
-4
No files found.
slapos/grid/slapgrid.py
View file @
a5378e7e
...
...
@@ -477,12 +477,13 @@ class Slapgrid(object):
# Get the list of promises
promise_dir
=
os
.
path
.
join
(
instance_path
,
'etc'
,
'promise'
)
if
os
.
path
.
exists
(
promise_dir
)
and
os
.
path
.
isdir
(
promise_dir
):
commands_to_run
=
os
.
listdir
(
promise_dir
)
commands_to_run
=
[
os
.
path
.
join
(
promise_dir
,
command
)
for
command
in
os
.
listdir
(
promise_dir
)]
cwd
=
instance_path
# Check whether every promise is kept
for
process_handler
,
command
in
\
self
.
_runCommandAsUserAndYieldPopen
(
commands_to_run
,
self
.
_runCommand
s
AsUserAndYieldPopen
(
commands_to_run
,
(
uid
,
gid
),
cwd
):
time
.
sleep
(
self
.
promise_timeout
)
...
...
@@ -492,7 +493,7 @@ class Slapgrid(object):
if
process_handler
.
poll
()
is
None
:
process_handler
.
kill
()
computer_partition
.
error
(
"The promise %r timed out"
%
promise
)
elif
process_handler
.
returncode
!=
0
:
elif
process_handler
.
poll
()
!=
0
:
stderr
=
process_handler
.
communicate
()[
1
]
if
stderr
is
None
:
stderr
=
'No error output from %r.'
%
promise
...
...
@@ -582,7 +583,7 @@ class Slapgrid(object):
cwd
=
os
.
path
.
join
(
instance_path
,
'etc'
,
'report'
)
for
process_handler
,
command
in
\
self
.
_runCommandAsUserAndYieldPopen
(
commands_to_run
,
self
.
_runCommand
s
AsUserAndYieldPopen
(
commands_to_run
,
(
uid
,
gid
),
cwd
):
result
=
process_handler
.
communicate
()[
0
]
...
...
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