Work-around for offline+busy runners (#993)

Ref #911
This commit is contained in:
Yusuke Kuoka 2021-12-09 09:31:06 +09:00 committed by GitHub
parent 164a91b18f
commit 898ad3c355
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 19 additions and 9 deletions

View File

@ -422,16 +422,26 @@ func (r *RunnerReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctr
"configuredRegistrationTimeout", registrationTimeout, "configuredRegistrationTimeout", registrationTimeout,
) )
} else if registrationDidTimeout { } else if registrationDidTimeout {
log.Info( if runnerBusy {
"Already existing GitHub runner still appears offline . "+ log.Info(
"Recreating the pod to see if it resolves the issue. "+ "Timeout out while waiting for the runner to be online, but observed that it's busy at the same time."+
"CAUTION: If you see this a lot, you should investigate the root cause. ", "This is a known (unintuitive) behaviour of a runner that is already running a job. Please see https://github.com/actions-runner-controller/actions-runner-controller/issues/911",
"podCreationTimestamp", pod.CreationTimestamp, "podCreationTimestamp", pod.CreationTimestamp,
"currentTime", currentTime, "currentTime", currentTime,
"configuredRegistrationTimeout", registrationTimeout, "configuredRegistrationTimeout", registrationTimeout,
) )
} else {
log.Info(
"Already existing GitHub runner still appears offline . "+
"Recreating the pod to see if it resolves the issue. "+
"CAUTION: If you see this a lot, you should investigate the root cause. ",
"podCreationTimestamp", pod.CreationTimestamp,
"currentTime", currentTime,
"configuredRegistrationTimeout", registrationTimeout,
)
restart = true restart = true
}
} else { } else {
log.V(1).Info( log.V(1).Info(
"Runner pod exists but the GitHub runner appears to be still offline. Waiting for runner to get online ...", "Runner pod exists but the GitHub runner appears to be still offline. Waiting for runner to get online ...",