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
Thomas Gambier
slapos.core
Commits
d3e7de70
Commit
d3e7de70
authored
Jan 08, 2013
by
Marco Mariani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
typos
parent
9fc3f60f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
8 deletions
+9
-8
slapos/grid/SlapObject.py
slapos/grid/SlapObject.py
+9
-8
No files found.
slapos/grid/SlapObject.py
View file @
d3e7de70
...
...
@@ -32,25 +32,26 @@ import os
import
shutil
import
subprocess
import
pkg_resources
import
pwd
import
stat
import
tarfile
import
tempfile
from
supervisor
import
xmlrpc
import
xmlrpclib
import
pwd
import
utils
import
xmlrpclib
from
supervisor
import
xmlrpc
from
slapos.slap.slap
import
NotFoundError
from
svcbackend
import
getSupervisorRPC
from
exception
import
BuildoutFailedError
,
WrongPermissionError
,
\
PathDoesNotExistError
from
networkcache
import
download_network_cached
,
upload_network_cached
import
tarfile
from
watchdog
import
getWatchdogID
REQUIRED_COMPUTER_PARTITION_PERMISSION
=
'0750'
class
Software
(
object
):
"""This class is responsible
of
installing a software release"""
"""This class is responsible
for
installing a software release"""
def
__init__
(
self
,
url
,
software_root
,
buildout
,
signature_private_key_file
=
None
,
signature_certificate_list
=
None
,
upload_cache_url
=
None
,
upload_dir_url
=
None
,
shacache_cert_file
=
None
,
...
...
@@ -201,7 +202,7 @@ class Software(object):
def
destroy
(
self
):
"""Removes software release."""
def
retry
(
func
,
path
,
exc
):
# inspired
on
slapos.buildout hard remover
# inspired
by
slapos.buildout hard remover
if
func
==
os
.
path
.
islink
:
os
.
unlink
(
path
)
else
:
...
...
@@ -299,7 +300,7 @@ class Partition(object):
instance_path
=
self
.
instance_path
,
user_id
=
uid
,
group_id
=
gid
,
# As supervisord has no environment to inherit
setup
minimalistic one
# As supervisord has no environment to inherit
, setup a
minimalistic one
HOME
=
pwd
.
getpwuid
(
uid
).
pw_dir
,
USER
=
pwd
.
getpwuid
(
uid
).
pw_name
,
)
...
...
@@ -383,7 +384,7 @@ class Partition(object):
buildout_binary
)
else
:
if
len
(
bootstrap_candidate_list
)
!=
1
:
raise
ValueError
(
'More th
e
n one bootstrap candidate found.'
)
raise
ValueError
(
'More th
a
n one bootstrap candidate found.'
)
# Reads uid/gid of path, launches buildout with thoses privileges
bootstrap_file
=
os
.
path
.
abspath
(
os
.
path
.
join
(
bootstrap_candidate_dir
,
bootstrap_candidate_list
[
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