File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -106,6 +106,16 @@ done
106106# Add offline runners to be placed
107107for i in " ${offline[@]} " ; do to_place+=(" offline $i " ); done
108108
109+ # Shuffle to_place so sequential runner numbers spread across nodes
110+ # (avoids overloading one node when jobs arrive in number order)
111+ shuffled=()
112+ while [ ${# to_place[@]} -gt 0 ]; do
113+ rand=$(( RANDOM % ${# to_place[@]} ))
114+ shuffled+=(" ${to_place[$rand]} " )
115+ to_place=(" ${to_place[@]: 0: $rand } " " ${to_place[@]: $((rand+1))} " )
116+ done
117+ to_place=(" ${shuffled[@]} " )
118+
109119# Assign to underloaded nodes
110120moves=()
111121for entry in " ${to_place[@]} " ; do
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ gh_list_runners() {
2121
2222# Get a registration token for new runners.
2323gh_registration_token () {
24- gh api " orgs/$ORG /actions/runners/registration-token" --jq .token
24+ gh api " orgs/$ORG /actions/runners/registration-token" -X POST - -jq .token
2525}
2626
2727# Get the latest runner binary version.
Original file line number Diff line number Diff line change @@ -15,7 +15,6 @@ SSH_OPTS="-o ConnectTimeout=5"
1515
1616# Parent directories containing actions-runner-*/ installations on shared storage.
1717RUNNER_PARENT_DIRS=(
18- /storage/scratch1/6/sbryngelson3/mfc-runners
1918 /storage/project/r-sbryngelson3-0/sbryngelson3/mfc-runners-2
2019)
2120
You can’t perform that action at this time.
0 commit comments