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
b66f584e
Commit
b66f584e
authored
Apr 25, 2013
by
Marco Mariani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
truth testing cleanup
parent
225e6d79
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
14 deletions
+11
-14
slapos/grid/SlapObject.py
slapos/grid/SlapObject.py
+3
-4
slapos/grid/slapgrid.py
slapos/grid/slapgrid.py
+6
-8
slapos/grid/utils.py
slapos/grid/utils.py
+2
-2
No files found.
slapos/grid/SlapObject.py
View file @
b66f584e
...
@@ -119,9 +119,8 @@ class Software(object):
...
@@ -119,9 +119,8 @@ class Software(object):
else
:
else
:
self
.
_install_from_buildout
()
self
.
_install_from_buildout
()
# Upload to binary cache if possible and allowed
# Upload to binary cache if possible and allowed
if
(
self
.
software_root
and
self
.
url
and
self
.
software_url_hash
\
if
all
([
self
.
software_root
,
self
.
url
,
self
.
software_url_hash
,
and
self
.
upload_binary_cache_url
\
self
.
upload_binary_cache_url
,
self
.
upload_binary_dir_url
]):
and
self
.
upload_binary_dir_url
):
blacklisted
=
False
blacklisted
=
False
for
url
in
self
.
upload_to_binary_cache_url_blacklist
:
for
url
in
self
.
upload_to_binary_cache_url_blacklist
:
if
self
.
url
.
startswith
(
url
):
if
self
.
url
.
startswith
(
url
):
...
@@ -159,7 +158,7 @@ class Software(object):
...
@@ -159,7 +158,7 @@ class Software(object):
if
(
self
.
signature_private_key_file
or
if
(
self
.
signature_private_key_file
or
self
.
upload_cache_url
or
self
.
upload_cache_url
or
self
.
upload_dir_url
is
not
None
):
self
.
upload_dir_url
):
buildout_parameter_list
.
append
(
'buildout:networkcache-section=networkcache'
)
buildout_parameter_list
.
append
(
'buildout:networkcache-section=networkcache'
)
for
buildout_option
,
value
in
[
for
buildout_option
,
value
in
[
(
'%ssignature-private-key-file=%s'
,
self
.
signature_private_key_file
),
(
'%ssignature-private-key-file=%s'
,
self
.
signature_private_key_file
),
...
...
slapos/grid/slapgrid.py
View file @
b66f584e
...
@@ -194,7 +194,7 @@ def parseArgumentTupleAndReturnSlapgridObject(*argument_tuple):
...
@@ -194,7 +194,7 @@ def parseArgumentTupleAndReturnSlapgridObject(*argument_tuple):
if
not
mandatory_parameter
in
options
:
if
not
mandatory_parameter
in
options
:
missing_mandatory_parameter_list
.
append
(
mandatory_parameter
)
missing_mandatory_parameter_list
.
append
(
mandatory_parameter
)
if
options
.
get
(
'all'
)
is
True
:
if
options
.
get
(
'all'
):
options
[
'develop'
]
=
True
options
[
'develop'
]
=
True
if
options
.
get
(
'maximum_periodicity'
)
is
not
None
:
if
options
.
get
(
'maximum_periodicity'
)
is
not
None
:
...
@@ -238,7 +238,7 @@ def parseArgumentTupleAndReturnSlapgridObject(*argument_tuple):
...
@@ -238,7 +238,7 @@ def parseArgumentTupleAndReturnSlapgridObject(*argument_tuple):
parser
.
error
(
'File %r does not exist.'
%
f
)
parser
.
error
(
'File %r does not exist.'
%
f
)
certificate_repository_path
=
options
.
get
(
'certificate_repository_path'
)
certificate_repository_path
=
options
.
get
(
'certificate_repository_path'
)
if
certificate_repository_path
is
not
None
:
if
certificate_repository_path
:
if
not
os
.
path
.
isdir
(
certificate_repository_path
):
if
not
os
.
path
.
isdir
(
certificate_repository_path
):
parser
.
error
(
'Directory %r does not exist'
%
certificate_repository_path
)
parser
.
error
(
'Directory %r does not exist'
%
certificate_repository_path
)
...
@@ -324,12 +324,10 @@ def parseArgumentTupleAndReturnSlapgridObject(*argument_tuple):
...
@@ -324,12 +324,10 @@ def parseArgumentTupleAndReturnSlapgridObject(*argument_tuple):
shadir_cert_file
=
options
.
get
(
'shadir-cert-file'
,
None
),
shadir_cert_file
=
options
.
get
(
'shadir-cert-file'
,
None
),
shadir_key_file
=
options
.
get
(
'shadir-key-file'
,
None
),
shadir_key_file
=
options
.
get
(
'shadir-key-file'
,
None
),
develop
=
options
.
get
(
'develop'
,
False
),
develop
=
options
.
get
(
'develop'
,
False
),
software_release_filter_list
=
options
.
get
(
'only-sr'
,
# Try to fetch from deprecated argument
# Try to fetch from deprecated argument
options
.
get
(
'only_sr'
,
None
)),
software_release_filter_list
=
options
.
get
(
'only-sr'
,
options
.
get
(
'only_sr'
,
None
)),
computer_partition_filter_list
=
options
.
get
(
'only-cp'
,
# Try to fetch from deprecated argument
# Try to fetch from deprecated argument
options
.
get
(
'only_cp'
,
None
)),
computer_partition_filter_list
=
options
.
get
(
'only-cp'
,
options
.
get
(
'only_cp'
,
None
)),
force_periodicity
=
options
.
get
(
'force_periodicity'
,
False
),
force_periodicity
=
options
.
get
(
'force_periodicity'
,
False
),
maximum_periodicity
=
options
.
get
(
'maximum_periodicity'
,
86400
),
maximum_periodicity
=
options
.
get
(
'maximum_periodicity'
,
86400
),
),
),
...
...
slapos/grid/utils.py
View file @
b66f584e
...
@@ -108,7 +108,7 @@ class SlapPopen(subprocess.Popen):
...
@@ -108,7 +108,7 @@ class SlapPopen(subprocess.Popen):
output_lines
=
[]
output_lines
=
[]
while
True
:
while
True
:
line
=
self
.
stdout
.
readline
()
line
=
self
.
stdout
.
readline
()
if
line
==
''
and
self
.
poll
()
!=
None
:
if
line
==
''
and
self
.
poll
()
is
not
None
:
break
break
output_lines
.
append
(
line
)
output_lines
.
append
(
line
)
logger
.
info
(
line
.
rstrip
(
'
\
n
'
))
logger
.
info
(
line
.
rstrip
(
'
\
n
'
))
...
@@ -189,7 +189,7 @@ def dropPrivileges(uid, gid):
...
@@ -189,7 +189,7 @@ def dropPrivileges(uid, gid):
if
uid
==
0
or
gid
==
0
:
if
uid
==
0
or
gid
==
0
:
raise
OSError
(
'Dropping privileges to uid = %r or '
\
raise
OSError
(
'Dropping privileges to uid = %r or '
\
'gid = %r is too dangerous'
%
(
uid
,
gid
))
'gid = %r is too dangerous'
%
(
uid
,
gid
))
if
not
(
current_uid
==
0
and
current_gid
==
0
)
:
if
current_uid
or
current_gid
:
logger
.
debug
(
'Running as uid = %r, gid = %r, dropping not needed and not '
logger
.
debug
(
'Running as uid = %r, gid = %r, dropping not needed and not '
'possible'
%
(
current_uid
,
current_gid
))
'possible'
%
(
current_uid
,
current_gid
))
return
return
...
...
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