[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[HTCondor-users] feature request for CONDOR_IDS



*** Attention: This is an external email. Use caution responding, opening attachments or clicking on links. ***

I made a dumb decision years ago by making our network-wide condor uid 999 back on Ubuntu 18. Ubuntu20 and Ubuntu24 use this ID for system services, so it’s all very confusing.

I’m taking our upgrade to 24 LTS as an opportunity to fix this. Since we’re phasing the upgrade, changing the condor UID isn’t feasible, so I’m using a new account, ltscondor uid 29000.

CONDOR_IDS=29000.29000 is set in our common pool file.  To get this to work, I ended up adding an ExecPreStart.sh.

cat override.conf

[Service]

ExecStartPre=/usr/sbin/nmrbox-condor-prestart.sh

with the bash script being:

#!/bin/bash

ACCOUNT=ltscondor

/usr/bin/id $ACCOUNT > /dev/null

if [ $? -ne 0 ]; then

                echo "Condor account $ACCOUNT does not exist" >&2

                exit 1

fi

DIRS=( "/var/log/condor" "/var/lib/condor" "/var/spool/condor" "/var/lock/condor" "/var/run/condor")

 

for DIR in "${DIRS[@]}"; do

    mkdir -p "$DIR"        

    chown $ACCOUNT $DIR 

done

While this works, given that the condor.service is running as root, it seems like it should be able to handle the directory permissions without my help.