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):
os.path.dirname(sys.argv[0]),
'..', '..', '..', '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
devnull = open('/dev/null', 'w')
command = ['/opt/slapos/bin/slapos', 'node', 'instance',
'--cfg=%s' % slapos_configuration_file_path,
'--pidfile=slapos.pid']
subprocess.Popen(command, stdout=devnull, stderr=devnull).wait()
subprocess.Popen(command, stdout=devnull, stderr=devnull).wait()
subprocess.Popen(command, stdout=devnull, stderr=devnull).wait()
self.logger.info('Running "slapos node instance" with command : %s' % ' '.join(command))
stdin, stdout = subprocess.Popen(command, stdout=devnull, stderr=stderr).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()
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