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
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
Paul Graydon
slapos.core
Commits
dca7b7aa
Commit
dca7b7aa
authored
Nov 16, 2011
by
Antoine Catton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor: bugfix on promises.
parent
ae02e2d6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
slapos/grid/slapgrid.py
slapos/grid/slapgrid.py
+9
-3
No files found.
slapos/grid/slapgrid.py
View file @
dca7b7aa
...
@@ -446,18 +446,19 @@ class Slapgrid(object):
...
@@ -446,18 +446,19 @@ class Slapgrid(object):
# Check whether every promise is kept
# Check whether every promise is kept
for
promise
in
promises_list
:
for
promise
in
promises_list
:
command
=
os
.
path
.
join
(
promise_dir
,
promise
)
command
=
[
os
.
path
.
join
(
promise_dir
,
promise
)]
promise
=
os
.
path
.
basename
(
command
[
0
])
kw
=
dict
(
stdout
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
PIPE
)
kw
=
dict
(
stdout
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
PIPE
)
process_handler
=
SlapPopen
(
command
,
process_handler
=
SlapPopen
(
command
,
preexec_fn
=
lambda
:
dropPrivileges
(
uid
,
gid
),
preexec_fn
=
lambda
:
dropPrivileges
(
uid
,
gid
),
cwd
=
cwd
,
cwd
=
cwd
,
env
=
None
,
**
kw
)
env
=
{}
,
**
kw
)
time
.
sleep
(
self
.
promise_timeout
)
time
.
sleep
(
self
.
promise_timeout
)
promise
=
os
.
path
.
basename
(
command
)
if
process_handler
.
poll
()
is
None
:
if
process_handler
.
poll
()
is
None
:
process_handler
.
kill
()
process_handler
.
kill
()
...
@@ -466,8 +467,13 @@ class Slapgrid(object):
...
@@ -466,8 +467,13 @@ class Slapgrid(object):
stderr
=
process_handler
.
communicate
()[
1
]
stderr
=
process_handler
.
communicate
()[
1
]
if
stderr
is
None
:
if
stderr
is
None
:
stderr
=
'No error output from %r.'
%
promise
stderr
=
'No error output from %r.'
%
promise
else
:
stderr
=
'Promise %r:'
%
promise
+
stderr
raise
Slapgrid
.
PromiseError
(
stderr
)
raise
Slapgrid
.
PromiseError
(
stderr
)
if
not
promise_present
:
self
.
logger
.
info
(
"No promise."
)
def
processComputerPartitionList
(
self
):
def
processComputerPartitionList
(
self
):
"""Will start supervisord and process each Computer Partition.
"""Will start supervisord and process each Computer Partition.
...
...
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