Hello list

I have this little script as both suspend and resume program in 2.2.7:

$ cat /tmp/prog.py
#!/usr/bin/python3
import sys
print ("doing something with the following hosts: ", sys.argv[1])
try: # save the log
    sys.stdout = open("/tmp/log", "a")
    sys.stderr = sys.stdout
except: pass
print ("doing something with the following hosts: ", sys.argv[1])
f = open("/tmp/log2", "a")
f.write("doing something with the following hosts: " + str( sys.argv[1]) )

When I execute
# scontrol update nodename=fg0 state=power_up
# scontrol update nodename=fg0 state=power_down

I get this message in slurmctld.log
[2011-11-03T10:50:15] powering down node fg0


But no evidence of the script having been executed at all... any ideas?


# scontrol show config | egrep "suspend|resume"
ResumeProgram           = /tmp/prog.py
ResumeRate              = 300 nodes/min
ResumeTimeout           = 30 sec
SuspendExcNodes         = (null)
SuspendExcParts         = (null)
SuspendProgram          = /tmp/prog.py
SuspendRate             = 60 nodes/min
SuspendTime             = 30 sec
SuspendTimeout          = 30 sec


-- 
Do not let me induce you to satisfy my curiosity, from an expectation,
that I shall gratify yours. What I may judge proper to conceal, does
not concern myself alone.

Reply via email to