-
Notifications
You must be signed in to change notification settings - Fork 240
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow restore process to finish before starting Jenkins #843
Comments
yes that issue should not be closed as stale. |
@bentlema can you try this operator version:
and let me know? thanks! I tried the quick fix I suggest before: move the restore before the seed job creation in the user reconcile loop |
@brokenpip3, yes, this does appear to fix it! After upgrading to this image, and restarting a couple times, it does appear that the restore process is finishing before the seed jobs are executed. The logs seem to confirm this as well:
|
Cool! I'm glad that worked :) Will maintain the issue open until the new version that contain the fix will be released |
fixed in this version https://github.com/jenkinsci/kubernetes-operator/releases/tag/v0.8.0-beta2 |
Describe the bug
When using multibranch pipelines (GitHub Branch Source plugin), upon a Jenkins restart, all branches, PRs, and tags are rebuilt. This appears to be because the restore process hasn't finished restoring all build history in time. This is a race condition, and it causes build history to get overwritten, as well as a massive spike in resource usage as (In our case) hundreds of build jobs are being kicked off simultaneously.
One possible solution would be to move the restore process to an initContainer to guarantee it finishes before the jenkins-master container starts.
To Reproduce
With the GitHub Branch Source plugin installed, and a multibranch pipeline configured to build on branches, PRs, and/or tags, execute several builds. Observe the state of the build history. Restart Jenkins (kill the pod), and observe when Jenkins comes back up it will re-build every branch, PR, and tag, at the same time old build history is still "flowing in" via the restore process. (May be hard to repro with a small test case. We have dozens of multibranch pipelines, and hundreds of branches/PRs/tags)
Additional information
Kubernetes version: 1.23 (AWS EKS)
Jenkins Operator version: v0.7.1 and v0.8.0-beta
This same issue was reported in #679 , but was closed as stale.
The text was updated successfully, but these errors were encountered: