Job with a root-owned script runs even if root_reject_scripts is set to true

Description

Issue:
When reject_root_script is set to true on a host,if job is assigned to that host and it was running a script owned by root, the job should get rejected and go back to Q state,but in the failed scenario the job is not getting rejected and starts running.

-->This issue was seen from 13.1 onward.
-->On 12.2,I am able to see the expected behavior (i.e job is getting rejected and is in Q state).
-->I requested AL for the feedback on the issue.Please find below his reply
[AL]:I tried it with PBS_USE_TCP=0 and I don't see the problem, but under the current asynchronous way of scheduling, I see a bug. I noticed that mom_logs show the "mom not accepting remote hook files or root job scripts" message and yet the job proceeded to run! Now after repeated rerun of the job by the scheduler, the job gets deleted. It should not get deleted but remain queued.

-->The execution logs can be found in Manual_execution_logs_t117_on_12.2.txt and Manual_execution_logs_t117_on_13.1.txt
-->Steps to reproduce section has required details.

Acceptance Criteria

None

Activity

Show:
nithin johnson
October 12, 2016, 7:09 AM

Steps to Reproduce:
1. Set reject_root_scripts option to true in hostA and HostB
Run as: root
Cmd: N/A
Path: in [PBS_HOME]/mom_priv/config file:
$reject_root_scripts true

Expected Outcome:
No Error
2. Restart the moms on hostA hostB
Run as: root
Cmd:
Linux/Unix:
/etc/init.d/pbs stop
/etc/init.d/pbs start
Windows:
net stop pbs_mom
net start pbs_mom
Expected Outcome:No Error

3. Now add 'root' to acl_roots to submit a job as root:
Run as: root
Cmd:
qmgr -c "set server acl_roots=root"
Expected Outcome:No Error

4. Now submit a job as root:
Run as: root
Cmd:
qsub job.scr
< job-id >
Expected Outcome:No Error

5. Check the status of the job:
Run as: qstat -s
Expected Outcome:The job would be queued and won't run with the comment:
Not Running: PBS Error: Execution server rejected request
[Note:As per Al "For 12.2,we can see the job's comment "Not Running: PBS Error: Execution server rejected request' but in 13.0+ due to fast asynchronous way of the scheduler running a job we wont be able to see the expected job's comment]"

nithin johnson
February 1, 2017, 8:07 AM

Assignee

nithin johnson

Reporter

Jon Shelley

Severity

None

OS

None

Start Date

None

Pull Request URL

None

Story Points

1

Fix versions

Priority

High
Configure