CCBR / Pipeliner

An open-source and scalable solution to NGS analysis powered by the NIH's Biowulf cluster.
4 stars 0 forks source link

Ability to Dynamically Resolve CCR BUY-NODES #358

Closed skchronicles closed 5 years ago

skchronicles commented 5 years ago

By default jobs are being submitted to the ccr,norm partitions (even if a user does not have access to the ccr buy-in nodes), this causes a bit of extra work for the job scheduler, and it also adds to logging noise. HPC staff is also suspending accounts of unauthorized users who are submitting jobs to both partitions.

To dynamically determine a user's buy-in information, we need to map their account sponsor's information to partition access info.

To find a out a users sponsor, we can query the slurm account management database using sacctmagr. The following command will return the sponsor's name: sacctmgr -rn list user | awk '{print $2}'

We can then map this information to known AllowedAccount partition information to determine which buy-in nodes they have access to: BUY_IN_NODES=$(ACCOUNT_SPONSOR=$(sacctmgr -rn list user | awk '{print $2}') && scontrol show partitions | grep -i $ACCOUNT_SPONSOR -B1 | grep '^PartitionName' | cut -d '=' -f2 | grep -iv 'gpu'| tr '\n' ',' | sed 's/.$//')

skchronicles commented 5 years ago

Resolved in master and activeDev branches: master branch: https://github.com/CCBR/Pipeliner/commit/b1953058609d3758162916c036dc780891a1f8bb actveDev branch: https://github.com/CCBR/Pipeliner/commit/7e072714e59e5607d2d2987d660e393346ce079d