Is there a way to tell SGE to run specific jobs as root on the execution node?

Posted by Rick Reynolds on Server Fault See other posts from Server Fault or by Rick Reynolds
Published on 2011-10-27T17:43:02Z Indexed on 2012/12/17 5:04 UTC
Read the original article Hit count: 545

Filed under:

The title kinda says it all...

We're using SGE/OGE to submit jobs to a set of worker nodes that then do things with specific pieces of equipment. The programs and scripts that have been created that manipulate this equipment rely on running as root. I'd like SGE to handle allocation of resources in a way that is mindful of users, groups, projects, etc., but I also need the actual jobs to run with root permissions.

I've read up on How can one run a prologue script as root in gridengine? to see if anything there was pertinent, but it seems that SGE is providing the "user@" kind of spec specifically for prolog and epilog kinds of actions. Is there any similar functionality for the job itself?

I'm aware of su/sudo approaches, but that won't really work in this environment because the sudoers file isn't globally managed (i.e. I'd have to add a whole set of users to /etc/sudoers on lots of machines). I'm currently looking into a setuid kind of solution, but that would definitely be an unnecessary kind of work-around if SGE provides me a way to declare that a specific job (or jobs in a specific queue) always needs to run with a specific user's rights.

© Server Fault or respective owner

Related posts about gridengine