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
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
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
Show 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):
...
@@ -273,8 +273,8 @@ class SlapOSControler(object):
slapproxy_log_fp
=
open
(
slapproxy_log
,
'w'
)
slapproxy_log_fp
=
open
(
slapproxy_log
,
'w'
)
kwargs
[
'stdout'
]
=
slapproxy_log_fp
kwargs
[
'stdout'
]
=
slapproxy_log_fp
kwargs
[
'stderr'
]
=
slapproxy_log_fp
kwargs
[
'stderr'
]
=
slapproxy_log_fp
proxy
=
subprocess
.
Popen
([
config
[
'slap
proxy_binary'
],
proxy
=
subprocess
.
Popen
([
config
[
'slap
os_binary'
],
self
.
slapos_config
],
**
kwargs
)
'proxy'
,
'start'
,
'--cfg'
,
self
.
slapos_config
],
**
kwargs
)
process_manager
.
process_pid_set
.
add
(
proxy
.
pid
)
process_manager
.
process_pid_set
.
add
(
proxy
.
pid
)
# XXX: dirty, giving some time for proxy to being able to accept
# XXX: dirty, giving some time for proxy to being able to accept
# connections
# connections
...
@@ -340,9 +340,10 @@ class SlapOSControler(object):
...
@@ -340,9 +340,10 @@ class SlapOSControler(object):
# a SR may fail for number of reasons (incl. network failures)
# a SR may fail for number of reasons (incl. network failures)
# so be tolerant and run it a few times before giving up
# so be tolerant and run it a few times before giving up
for
runs
in
range
(
0
,
MAX_SR_RETRIES
):
for
runs
in
range
(
0
,
MAX_SR_RETRIES
):
status_dict
=
self
.
spawn
(
config
[
'slapgrid_software_binary'
],
status_dict
=
self
.
spawn
(
config
[
'slapos_binary'
],
'-v'
,
'-c'
,
'--all'
,
'node'
,
'software'
,
'--all'
,
self
.
slapos_config
,
raise_error_if_fail
=
False
,
'--pidfile'
,
'%s/software.pid'
%
self
.
software_root
,
'--cfg'
,
self
.
slapos_config
,
raise_error_if_fail
=
False
,
log_prefix
=
'slapgrid_sr'
,
get_output
=
False
)
log_prefix
=
'slapgrid_sr'
,
get_output
=
False
)
if
status_dict
[
'status_code'
]
==
0
:
if
status_dict
[
'status_code'
]
==
0
:
break
break
...
@@ -384,8 +385,9 @@ class SlapOSControler(object):
...
@@ -384,8 +385,9 @@ class SlapOSControler(object):
# may "expand"
# may "expand"
sleep_time
=
0
sleep_time
=
0
for
runs
in
range
(
0
,
MAX_PARTIONS
):
for
runs
in
range
(
0
,
MAX_PARTIONS
):
status_dict
=
self
.
spawn
(
config
[
'slapgrid_partition_binary'
],
'-v'
,
'-c'
,
status_dict
=
self
.
spawn
(
config
[
'slapos_binary'
],
'node'
,
'instance'
,
self
.
slapos_config
,
raise_error_if_fail
=
False
,
'--pidfile'
,
'%s/instance.pid'
%
self
.
software_root
,
'--cfg'
,
self
.
slapos_config
,
raise_error_if_fail
=
False
,
log_prefix
=
'slapgrid_cp'
,
get_output
=
False
)
log_prefix
=
'slapgrid_cp'
,
get_output
=
False
)
self
.
log
(
'slapgrid_cp status_dict : %r'
%
(
status_dict
,))
self
.
log
(
'slapgrid_cp status_dict : %r'
%
(
status_dict
,))
if
status_dict
[
'status_code'
]
in
(
0
,):
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
...
@@ -3,6 +3,7 @@ software_root = %(software_root)s
instance_root = %(instance_root)s
instance_root = %(instance_root)s
master_url = %(master_url)s
master_url = %(master_url)s
computer_id = %(computer_id)s
computer_id = %(computer_id)s
root_check = False
[slapproxy]
[slapproxy]
host = %(proxy_host)s
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