ips_qemu_file.close()
# build a TestPlc object from the result, passing options
for spec in all_plc_specs:
- spec['disabled'] = False
+ spec['failed_step'] = False
all_plcs = [ (x, TestPlc(x,self.options)) for x in all_plc_specs]
# pass options to utils as well
# run the step
beg=strftime(TIME_FORMAT)
- if not spec['disabled'] or force or self.options.interactive or self.options.keep_going:
+ if not spec['failed_step'] or force or self.options.interactive or self.options.keep_going:
skip_step=False
if self.options.interactive:
prompting=True
continue
try:
force_msg=""
- if force: force_msg=" (forced)"
+ if force and spec['failed_step']: force_msg=" (forced after %s has failed)"
utils.header("********** %d RUNNING step %s%s on plc %s"%(plc_counter,stepname,force_msg,plcname))
if not cross: step_result = method(plc_obj)
else: step_result = method(plc_obj,across_plcs)
status="OK"
else:
overall_result = False
- spec['disabled'] = True
+ spec['failed_step'] = stepname
utils.header('********** %d FAILED Step %s on %s (discarded from further steps)'\
%(plc_counter,stepname,plcname))
status="KO"
except:
overall_result=False
- spec['disabled'] = True
+ spec['failed_step'] = stepname
traceback.print_exc()
utils.header ('********** %d FAILED (exception) Step %s on %s (discarded from further steps)'\
%(plc_counter,stepname,plcname))
# do not run, just display it's skipped
else:
- utils.header("********** %d IGNORED Plc %s is disabled - skipping step %s"%(plc_counter,plcname,stepname))
+ why="has failed %s"%spec['failed_step']
+ utils.header("********** %d SKIPPED Step %s on %s (%s)"%(plc_counter,stepname,plcname,why))
status="UNDEF"
if not self.options.dry_run:
end=strftime(TIME_FORMAT)
'delete_vs','create_vs','install', 'configure', 'start', SEP,
'fetch_keys', 'store_keys', 'clear_known_hosts', SEP,
'initscripts', 'sites', 'nodes', 'slices', 'nodegroups', 'leases', SEP,
- 'reinstall_node', 'init_node','bootcd', 'configure_qemu', 'export_qemu',
- 'kill_all_qemus', 'start_node', SEP,
- # better use of time: do this now that the nodes are taking off
- 'plcsh_stress_test', SEP,
+ 'reinstall_node', 'init_node','bootcd', 'configure_qemu', 'export_qemu', 'kill_all_qemus', 'start_node', SEP,
'install_sfa', 'configure_sfa', 'cross_configure_sfa', 'import_sfa', 'start_sfa', SEPSFA,
'configure_sfi@1', 'add_sfa@1', 'create_sfa@1', 'update_sfa@1', 'view_sfa@1', SEPSFA,
+ # better use of time: do this now that the nodes are taking off
+ 'plcsh_stress_test', SEP,
'nodes_ssh_debug', 'nodes_ssh_boot', 'check_slice', 'check_initscripts', SEPSFA,
'check_slice_sfa@1', 'delete_sfa_user@1', 'delete_sfa_slices@1', SEPSFA,
'check_tcp', 'check_hooks', SEP,
def dbclean_sfa(self):
"thoroughly wipes off the SFA database"
- return self.run_in_guest("sfa-nuke-plc.py")==0
+ self.run_in_guest("sfa-nuke-plc.py")==0
+ return True
def plcclean_sfa(self):
"cleans the PLC entries that were created as a side effect of running the script"
self.run_in_guest("rm -rf /var/lib/sfa")
self.run_in_guest("rm -rf /etc/sfa")
self.run_in_guest("rm -rf /var/log/sfa_access.log /var/log/sfa_import_plc.log /var/log/sfa.daemon")
+ # xxx tmp
+ self.run_in_guest("rpm -e --noscripts sfa-plc")
return True
###
def stop_sfa(self):
"service sfa stop"
- return self.run_in_guest('service sfa stop')==0
+ self.run_in_guest('service sfa stop')==0
+ return True
def populate (self):
"creates random entries in the PLCAPI"