I would like to tweak some things on a job outside of a hook so I thought I would
try using the ptl_testlib python package. However its crashing when the underlying library is calling qalter:
ptl_testlib.Server(pbs_server_name).alterjob(jobid=jid, attrib=new_att)
gives:
PbsAlterError Traceback (most recent call last)
<ipython-input-61-48f975436349> in <module>()
----> 1 ptl_testlib.Server(pbs_server_name).alterjob(jobid=jid, attrib=new_att)
/opt/pbs/python/lib/python2.7/site-packages/ptl/lib/pbs_testlib.pyc in alterjob(self, jobid, attrib, extend, runas, logerr)
6940 if rc != 0:
6941 raise PbsAlterError(rc=rc, rv=False, msg=self.geterrmsg(),
-> 6942 post=self._disconnect, conn=c)
6943
6944 if c:
PbsAlterError: rc=2, rv=False, msg=["/opt/pbs/bin/qalter: invalid option – ‘v’", ‘usage: qalter [-a date_time] [-A account_string] [-c interval] [-e path]’, ‘\t[-h hold_list] [-j y|n] [-k keep] [-J X-Y[:Z]] [-l resource_list]’, ‘\t[-m mail_options] [-M user_list] [-N jobname] [-o path] [-p priority]’, ‘\t[-R o|e|oe] [-r y|n] [-S path] [-u user_list] [-W dependency_list]’, ‘\t[-P project_name] job_identifier…’, ’ qalter --version’]
This is using the binary rpms of 18.2 and the ptl tree from github installed as normal if that affects things any.
The qstat from github doesnt have a ‘v’ option either so at least that matches.
thoughts/comments/concerns/etc
or better ways to tweaking something on a job outside of a hook.
In this case I was just adding a variable onto the Variable_List attribute.
But I could create a new job resource and tweak that as well for what I need.
thanks
steve