Commit ab70cf77 authored by Nicolas Wavrant's avatar Nicolas Wavrant

resiliencytestsuite: add logs to know errors when switching to clone

parent 6095dfdd
...@@ -179,14 +179,20 @@ class ResiliencyTestSuite(object): ...@@ -179,14 +179,20 @@ class ResiliencyTestSuite(object):
os.path.dirname(sys.argv[0]), os.path.dirname(sys.argv[0]),
'..', '..', '..', 'slapos.cfg' '..', '..', '..', 'slapos.cfg'
) )
import os
slapos_configuration_file_path = os.path.abspath(slapos_configuration_file_path)
# Output is huge and we don't want to store it in memory nor print it # Output is huge and we don't want to store it in memory nor print it
devnull = open('/dev/null', 'w') devnull = open('/dev/null', 'w')
command = ['/opt/slapos/bin/slapos', 'node', 'instance', command = ['/opt/slapos/bin/slapos', 'node', 'instance',
'--cfg=%s' % slapos_configuration_file_path, '--cfg=%s' % slapos_configuration_file_path,
'--pidfile=slapos.pid'] '--pidfile=slapos.pid']
subprocess.Popen(command, stdout=devnull, stderr=devnull).wait() self.logger.info('Running "slapos node instance" with command : %s' % ' '.join(command))
subprocess.Popen(command, stdout=devnull, stderr=devnull).wait() stdin, stdout = subprocess.Popen(command, stdout=devnull, stderr=stderr).wait()
subprocess.Popen(command, stdout=devnull, stderr=devnull).wait() stdin, stdout = subprocess.Popen(command, stdout=devnull, stderr=stderr).wait()
stdin, stdout = subprocess.Popen(command, stdout=devnull, stderr=stderr).wait()
if stdout:
print "Erreur when running slapos node instance :"
print stderr
success = self.checkDataOnCloneInstance() success = self.checkDataOnCloneInstance()
if success: if success:
......
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