- sp=subprocess.Popen([omf_rc_trigger_script],
- stdout=subprocess.PIPE,stderr=subprocess.STDOUT)
- (output,retcod)=sp.communicate()
- logger.log("omf_resctl: %s: called OMF rc control script (retcod=%r)"%(slicename,retcod))
- logger.log("omf_resctl: got output\n%s"%output)
+ try:
+ # the trigger script actually needs to be run in the slice context of course
+ # xxx we might need to use
+ # slice_command=['bash','-l','-c',omf_rc_trigger_script]
+ slice_command = [omf_rc_trigger_script]
+ to_run = tools.command_in_slice (slicename, slice_command)
+ sp=subprocess.Popen(to_run, stdout=subprocess.PIPE,stderr=subprocess.STDOUT)
+ (out,err)=sp.communicate()
+ retcod=sp.returncode
+ # we don't wait for that, try to display a retcod for info purpose only
+ # might be None if that config script lasts or hangs whatever
+ logger.log("omf_resctl: %s: called OMF rc control script (imm. retcod=%r)"%(slicename,retcod))
+ logger.log("omf_resctl: got stdout\n%s"%out)
+ logger.log("omf_resctl: got stderr\n%s"%err)
+ except:
+ import traceback
+ traceback.print_exc()
+ logger.log_exc("omf_resctl: WARNING: Could not call trigger script %s"%\
+ omf_rc_trigger_script, name=slicename)