Is it possible for the file generated by the pdg scheduler to be owned by the same account that submitted the job instead of 'render'?
G
PDG scheduler file ownership
PDG scheduler file ownership
--
Rocky Linux 8.5, cgru 3.2.1
Rocky Linux 8.5, cgru 3.2.1
Re: PDG scheduler file ownership
I was able to make that change by modifying a few lines of afanasyscheduler.py.
I'm making use of linux's ability to switch to a different UID/GID and a few security exceptions via sudo - i'm not sure whether this is something that's possible on other platforms.
In case this is useful to anyone else:
I'm making use of linux's ability to switch to a different UID/GID and a few security exceptions via sudo - i'm not sure whether this is something that's possible on other platforms.
In case this is useful to anyone else:
Code: Select all
[gene@tws12 types]$ diff afanasyscheduler.py afanasyscheduler.bak
175,176c175
< cmd = 'su -m {} -c "umask 022 && {}"'.format(cgruconfig.VARS['USERNAME'], self.expandCommandTokens(work_item.command, work_item))
< task.setCommand(cmd)
---
> task.setCommand(self.expandCommandTokens(work_item.command, work_item))
467,469d465
<
< # impersonate someone useful
< cmd = 'su -m {} -c "umask 022 && {}"'.format(cgruconfig.VARS['USERNAME'],cmd)
--
Rocky Linux 8.5, cgru 3.2.1
Rocky Linux 8.5, cgru 3.2.1
Re: PDG scheduler file ownership
Hi!
I think that user switching is a very "in-house depended" issue.
It should be implemented by admins/TDs/RNDs in place.
Also user, that service is running by, should have enough permissions for it.
Just may be Afanasy "out-of-the-box" submission plugins should have some ways for command customizing.
- this i can discuss/implement
I think that user switching is a very "in-house depended" issue.
It should be implemented by admins/TDs/RNDs in place.
Also user, that service is running by, should have enough permissions for it.
Just may be Afanasy "out-of-the-box" submission plugins should have some ways for command customizing.
- this i can discuss/implement
Timur Hairulin
CGRU 3.3.1, Ubuntu 20.04, 22.04, MS Windows 10 (clients only).
CGRU 3.3.1, Ubuntu 20.04, 22.04, MS Windows 10 (clients only).
Re: PDG scheduler file ownership
As you say - It might be useful for some users to have access to some prologue/epilogue code snippets of some sorts...
If one wanted to update an asset management tool for example... or clean up a cache folder...
We're running custom submit scripts that's very opinionated about how we work, but I reckon someone can benefit from it.
G
If one wanted to update an asset management tool for example... or clean up a cache folder...
We're running custom submit scripts that's very opinionated about how we work, but I reckon someone can benefit from it.
G
--
Rocky Linux 8.5, cgru 3.2.1
Rocky Linux 8.5, cgru 3.2.1