Commit 8b0873c4 authored by Rafael Monnerat's avatar Rafael Monnerat

erp5.util: Update slapos command line calls

parent ed21149a
...@@ -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['slapproxy_binary'], proxy = subprocess.Popen([config['slapos_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,):
......
...@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment