Can I pass in arbitrary attributes to a job?

We are switching from another scheduler to PBS. Previously we had the ability to pass arbitrary attributes into the scheduler. As an example for why, on our clusters, by defaul,t external interfaces are down. Very few jobs use them and there is no sense leaving an external conduit open for BAD™ people to target. We had defined a custom attribute called pubnet. If a user added --attrs=pubnet to their qsub then we would up the interfaces in the job prolog and then down them again in the epilog. I tried #PBS -W pubnet and #PBS -W pubnet=true. AFAICT, you can only pass attrs that PBS knows about, like umask. I don’t believe environment variables will do what we want. We want access to this in the hooks, not in the jobs environment. Is there any way I can get arbitrary attributes from the users command line into a hook?

I would appreciate any ideas anyone has.

Thanks,

Bill

Hi Bill,

Did you look into custom resources? AFAIK, you are correct, PBS doesn’t allow you to add custom attributes, we add “custom attributes” via resources instead. Please check out the Custom Resources section of the admin guide (for 2020.1, it’s Chapter 5.14) and let us know if they might serve your use case.

Thanks,
Ravi

Yes, of course. That should work just fine and I should have thought of it :frowning: . When all you have is a hammer, everything looks like a nail, so I was looking for an attr, which is nothing more than a string, which is also what a custom resource is. Thanks for the whack upside the head :slight_smile: .

Regards,

Bill

1 Like