Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Douglas
erp5
Commits
8b0873c4
Commit
8b0873c4
authored
Jul 29, 2014
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5.util: Update slapos command line calls
parent
ed21149a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
7 deletions
+10
-7
erp5/util/testnode/SlapOSControler.py
erp5/util/testnode/SlapOSControler.py
+9
-7
erp5/util/testnode/template/slapos.cfg.in
erp5/util/testnode/template/slapos.cfg.in
+1
-0
No files found.
erp5/util/testnode/SlapOSControler.py
View file @
8b0873c4
...
...
@@ -273,8 +273,8 @@ class SlapOSControler(object):
slapproxy_log_fp
=
open
(
slapproxy_log
,
'w'
)
kwargs
[
'stdout'
]
=
slapproxy_log_fp
kwargs
[
'stderr'
]
=
slapproxy_log_fp
proxy
=
subprocess
.
Popen
([
config
[
'slap
proxy_binary'
],
self
.
slapos_config
],
**
kwargs
)
proxy
=
subprocess
.
Popen
([
config
[
'slap
os_binary'
],
'proxy'
,
'start'
,
'--cfg'
,
self
.
slapos_config
],
**
kwargs
)
process_manager
.
process_pid_set
.
add
(
proxy
.
pid
)
# XXX: dirty, giving some time for proxy to being able to accept
# connections
...
...
@@ -340,9 +340,10 @@ class SlapOSControler(object):
# a SR may fail for number of reasons (incl. network failures)
# so be tolerant and run it a few times before giving up
for
runs
in
range
(
0
,
MAX_SR_RETRIES
):
status_dict
=
self
.
spawn
(
config
[
'slapgrid_software_binary'
],
'-v'
,
'-c'
,
'--all'
,
self
.
slapos_config
,
raise_error_if_fail
=
False
,
status_dict
=
self
.
spawn
(
config
[
'slapos_binary'
],
'node'
,
'software'
,
'--all'
,
'--pidfile'
,
'%s/software.pid'
%
self
.
software_root
,
'--cfg'
,
self
.
slapos_config
,
raise_error_if_fail
=
False
,
log_prefix
=
'slapgrid_sr'
,
get_output
=
False
)
if
status_dict
[
'status_code'
]
==
0
:
break
...
...
@@ -384,8 +385,9 @@ class SlapOSControler(object):
# may "expand"
sleep_time
=
0
for
runs
in
range
(
0
,
MAX_PARTIONS
):
status_dict
=
self
.
spawn
(
config
[
'slapgrid_partition_binary'
],
'-v'
,
'-c'
,
self
.
slapos_config
,
raise_error_if_fail
=
False
,
status_dict
=
self
.
spawn
(
config
[
'slapos_binary'
],
'node'
,
'instance'
,
'--pidfile'
,
'%s/instance.pid'
%
self
.
software_root
,
'--cfg'
,
self
.
slapos_config
,
raise_error_if_fail
=
False
,
log_prefix
=
'slapgrid_cp'
,
get_output
=
False
)
self
.
log
(
'slapgrid_cp status_dict : %r'
%
(
status_dict
,))
if
status_dict
[
'status_code'
]
in
(
0
,):
...
...
erp5/util/testnode/template/slapos.cfg.in
View file @
8b0873c4
...
...
@@ -3,6 +3,7 @@ software_root = %(software_root)s
instance_root = %(instance_root)s
master_url = %(master_url)s
computer_id = %(computer_id)s
root_check = False
[slapproxy]
host = %(proxy_host)s
...
...
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