Dynamic Resource - Script on nfs share
Hello,
i'm trying to create a dynamic resource.
When I place the script locally on the maschine (/tmp/script.py) it works fine. But when I place the script on a nfs-share (nfs/nas/pbs/config/script.py) I get a Security violation. Furthermore "nfs/nas/pbs/config/script.py file has a non-secure file access, setting resource token_dyn to 0, errno: 1
So its perfectly clear what happening, and why it does not work when the script is on the nfs-share. But I want it to be there, how can i make this file access secure?
thx
Answers
-
Hi Thomas,
It seems your query was answered via the Service Now ticket by Anton.
The requirements for the server dyn script are as below:
1. Please check PBS Professional 2022.1 Administrator’s Guide on page AG-263
There is a section specifically on this 5.14.3.1.i Requirements for Scripts that Update Dynamic Resources
The script:
• Owned and executable by PBS_DAEMON_SERVICE_USER
• Has permissions of 0755
• Returns its output via stdout, and the output must be in a single line ending with a newline
• The scheduler has access to the script, and can run it
• If you have set up peer scheduling, make sure that the script is available to any scheduler that needs to run itThe directory containing the script:
• Owned by PBS_DAEMON_SERVICE_USER
• Accessible only by PBS_DAEMON_SERVICE_USER (must not give write permission to group or others)
• Has permissions 05502. Please also make sure this script has a timeout or use the server_dyn_res_alarm attribute so that it does not take too much time to run the query or commands . https://linuxize.com/post/timeout-command-in-linux/
Note: The scheduler runs the query and waits for it to finish or time out. The default timeout for a server dynamic resource script is 30 seconds. You can specify a timeout for server dynamic resources in each scheduler's server_dyn_res_alarm attribute. If the script does not finish before the timeout, the scheduler uses a value of zero for the dynamic server resource. If you set the timeout to zero, the scheduler does not place a time limit on the script.
qmgr -c "set sched server_dyn_res_alarm = XX" # xx is number of seconds, default is 30
Thank you,
Adarsh
0