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
Lu Xu
slapos.core
Commits
17cfb258
Commit
17cfb258
authored
Nov 16, 2011
by
Antoine Catton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add some logging on promise in order to debug easily.
parent
dca7b7aa
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
slapos/grid/slapgrid.py
slapos/grid/slapgrid.py
+4
-0
No files found.
slapos/grid/slapgrid.py
View file @
17cfb258
...
@@ -427,6 +427,7 @@ class Slapgrid(object):
...
@@ -427,6 +427,7 @@ class Slapgrid(object):
self
.
supervisord_configuration_path
)
self
.
supervisord_configuration_path
)
def
_checkPromises
(
self
,
computer_partition
):
def
_checkPromises
(
self
,
computer_partition
):
self
.
logger
.
info
(
"Checking promises..."
)
instance_path
=
os
.
path
.
join
(
self
.
instance_root
,
instance_path
=
os
.
path
.
join
(
self
.
instance_root
,
computer_partition
.
getId
())
computer_partition
.
getId
())
...
@@ -437,6 +438,7 @@ class Slapgrid(object):
...
@@ -437,6 +438,7 @@ class Slapgrid(object):
uid
=
stat_info
.
st_uid
uid
=
stat_info
.
st_uid
gid
=
stat_info
.
st_gid
gid
=
stat_info
.
st_gid
promise_present
=
False
# Get the list of promises
# Get the list of promises
promise_dir
=
os
.
path
.
join
(
instance_path
,
'etc'
,
'promise'
)
promise_dir
=
os
.
path
.
join
(
instance_path
,
'etc'
,
'promise'
)
if
os
.
path
.
exists
(
promise_dir
)
and
os
.
path
.
isdir
(
promise_dir
):
if
os
.
path
.
exists
(
promise_dir
)
and
os
.
path
.
isdir
(
promise_dir
):
...
@@ -445,10 +447,12 @@ class Slapgrid(object):
...
@@ -445,10 +447,12 @@ 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
:
promise_present
=
True
command
=
[
os
.
path
.
join
(
promise_dir
,
promise
)]
command
=
[
os
.
path
.
join
(
promise_dir
,
promise
)]
promise
=
os
.
path
.
basename
(
command
[
0
])
promise
=
os
.
path
.
basename
(
command
[
0
])
self
.
logger
.
info
(
"Checking promise %r."
,
promise
)
kw
=
dict
(
stdout
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
PIPE
)
kw
=
dict
(
stdout
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
PIPE
)
...
...
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