Issues Importing PBS Hook

Hello,

We are having issues importing a hook per direction from the hook guide.

When we have try importing the hook’s python file using the full path:

qmgr -c “import hook denyGrouplessJobs application/x-python default /cm/shared/apps/openpbs/var/spool/popbs/server_priv/hooks/ccast/denyGrouplessJobs.py”

we see this in the qmgr:

Qmgr: p h denyGrouplessJobs

create hook denyGrouplessJobs
set hook denyGrouplessJobs type = site
set hook denyGrouplessJobs enabled = true
set hook denyGrouplessJobs event = queuejob
set hook denyGrouplessJobs user = pbsadmin
set hook denyGrouplessJobs alarm = 30
set hook denyGrouplessJobs order = 1
set hook denyGrouplessJobs debug = false
set hook denyGrouplessJobs fail_action = none
import hook denyGrouplessJobs application/x-python base64 -

/cm/shared/apps/openpbs/var/spool/popbs/server_priv/hooks/tmp/qmgr_hook1450770HAljQZ - No such file or directory

import hook denyGrouplessJobs application/x-config base64 -

/cm/shared/apps/openpbs/var/spool/popbs/server_priv/hooks/tmp/qmgr_hook1450770HAljQZ - No such file or directory

Meanwhile, we notice that each time we run the same import hook command above a new hook file gets added to the “…/tmp/” folder that matches the content of our python file:

ls -ltr /cm/shared/apps/openpbs/var/spool/popbs/server_priv/hooks/tmp/

total 12

-rw-r–r-- 1 root root 604 Mar 24 11:12 qmgr_hook1448121UEQx9M

-rw-r–r-- 1 root root 604 Mar 24 11:25 qmgr_hook1450366pUZioq

-rw-r–r-- 1 root root 604 Mar 24 11:27 qmgr_hook1450738eE1fUs

Is there something we are missing while importing this hook’s python file?

Thanks,
Siji

Please try to copy the denyGrouplessJob.py to /root/denyGrouplessJob.py then try to import
this file from the /root directory and see whether there is any difference

Hey Adarsh,

we just tried that and no change:

[root@bright03 ~]# pwd
/root
qmgr -c “import hook denyGrouplessJobs application/x-python default denyGrouplessJobs.py”

hook ‘denyGrouplessJobs’ contents overwritten

qmgr

Max open servers: 49

Qmgr: p h denyGrouplessJobs

import hook denyGrouplessJobs application/x-python base64 -

/cm/shared/apps/openpbs/var/spool/popbs/server_priv/hooks/tmp/qmgr_hook1703376OfHqAB - No such file or directory

import hook denyGrouplessJobs application/x-config base64 -

/cm/shared/apps/openpbs/var/spool/popbs/server_priv/hooks/tmp/qmgr_hook1703376OfHqAB - No such file or directory

Thank you @sijisaula

Could you please share the contents of the below files / commands on the server:

  1. /etc/pbs.conf
  2. hostname -A
  3. hostname

Thanks @adarsh - The issue was within /etc/pbs.conf after further inspection and is now resolved!

1 Like