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
Léo-Paul Géneau
slapos.core
Commits
0018e9a2
Commit
0018e9a2
authored
Jun 27, 2013
by
Marco Mariani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SlapObject: removed method getSupervisorRPC
parent
01c6cd7e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
8 deletions
+5
-8
slapos/grid/SlapObject.py
slapos/grid/SlapObject.py
+5
-8
No files found.
slapos/grid/SlapObject.py
View file @
0018e9a2
...
...
@@ -343,11 +343,11 @@ class Partition(object):
os
.
chown
(
path
,
uid
,
gid
)
def
getUserGroupId
(
self
):
"""Returns
tuple of (uid, gid) of partition
"""
"""Returns
(uid, gid) tuple of partition owner
"""
stat_info
=
os
.
stat
(
self
.
instance_path
)
uid
=
stat_info
.
st_uid
gid
=
stat_info
.
st_gid
return
(
uid
,
gid
)
return
uid
,
gid
def
addServiceToGroup
(
self
,
partition_id
,
runner_list
,
path
,
extension
=
''
):
...
...
@@ -551,7 +551,7 @@ class Partition(object):
"""Asks supervisord to start the instance. If this instance is not
installed, we install it.
"""
supervisor
=
self
.
getSupervisorRPC
(
)
supervisor
=
getSupervisorRPC
(
self
.
supervisord_socket
)
partition_id
=
self
.
computer_partition
.
getId
()
try
:
supervisor
.
startProcessGroup
(
partition_id
,
False
)
...
...
@@ -566,7 +566,7 @@ class Partition(object):
"""Asks supervisord to stop the instance."""
partition_id
=
self
.
computer_partition
.
getId
()
try
:
supervisor
=
self
.
getSupervisorRPC
(
)
supervisor
=
getSupervisorRPC
(
self
.
supervisord_socket
)
supervisor
.
stopProcessGroup
(
partition_id
,
False
)
except
xmlrpclib
.
Fault
as
exc
:
if
exc
.
faultString
.
startswith
(
'BAD_NAME:'
):
...
...
@@ -628,16 +628,13 @@ class Partition(object):
"""
raise
NotImplementedError
def
getSupervisorRPC
(
self
):
return
getSupervisorRPC
(
self
.
supervisord_socket
)
def
updateSupervisor
(
self
):
"""Forces supervisord to reload its configuration"""
# Note: This method shall wait for results from supervisord
# In future it will not be needed, as update command
# is going to be implemented on server side.
self
.
logger
.
debug
(
'Updating supervisord'
)
supervisor
=
self
.
getSupervisorRPC
(
)
supervisor
=
getSupervisorRPC
(
self
.
supervisord_socket
)
# took from supervisord.supervisorctl.do_update
result
=
supervisor
.
reloadConfig
()
added
,
changed
,
removed
=
result
[
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