Skip to content

Commit

Permalink
Merge pull request #854 from sanjaysrikakulam/move_to_maintenance_node
Browse files Browse the repository at this point in the history
add global to condor_q cmd
  • Loading branch information
sanjaysrikakulam authored Jul 28, 2023
2 parents 99fccdc + 11c8ae0 commit b0edf1d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions roles/usegalaxy-eu.htcondor_release/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,21 @@
echo "Created $LOG"
fi
for j in $(condor_q -hold -autoformat ClusterId HoldReasonCode| awk '(($2-34) == 0){print $1}'| paste -s -d ' ')
for j in $(condor_q -global -hold -autoformat ClusterId HoldReasonCode| awk '(($2-34) == 0){print $1}'| paste -s -d ' ')
do
NUMBER_OF_TIMES_SUBMITTED=$(grep -c "$j" "$LOG")
if [ $NUMBER_OF_TIMES_SUBMITTED -gt $RESUBMIT_CAP ]; then
condor_rm -reason "This job was resubmitted $RESUBMIT_CAP times. Most likely because of running out of memory." "$j"
continue
fi
JOB_DESCRIPTION=$(condor_q "$j" -autoformat JobDescription)
MEMORY_PROVISIONED=$(condor_q "$j" -autoformat MemoryProvisioned)
JOB_DESCRIPTION=$(condor_q "$j" -global -autoformat JobDescription)
MEMORY_PROVISIONED=$(condor_q "$j" -global -autoformat MemoryProvisioned)
if [ $(($MEMORY_PROVISIONED * $MULTIPLIER)) -gt $CAP ]; then
REQUEST_MEMORY=$CAP
else
REQUEST_MEMORY=$(($MEMORY_PROVISIONED * $MULTIPLIER))
fi
REMOTE_HOST=$(condor_q "$j" -autoformat LastRemoteHost|cut -f2 -d@|cut -f1 -d.)
REMOTE_HOST=$(condor_q "$j" -global -autoformat LastRemoteHost|cut -f2 -d@|cut -f1 -d.)
DATE_WITH_TIME=$(date "+%d/%m/%Y-%H:%M:%S")
/bin/cat <<EOM >>$LOG
Expand Down

0 comments on commit b0edf1d

Please sign in to comment.