-
Notifications
You must be signed in to change notification settings - Fork 7
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
fix: enforce only one instance of an in-pod cronjob running at once #192
base: main
Are you sure you want to change the base?
Conversation
Not sure how to run this through the Lagoon test suite to confirm functionality. Any tips? |
We do have a cronjob features test in the test suite, you could extend that to include a cronjob that would experience the issue that flock would solve. Not sure if this is the best way to do this though? |
What I mean is: how do I run this through the Lagoon test suite? |
88c4616
to
f88fcc2
Compare
I've updated this to use the service templates instead of bash. Will need to do some more testing, but seems to work well in the limited playing around I did. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for picking this up and integrating it with the new Go build-deploy logic!
f88fcc2
to
ab12c48
Compare
This change enforces that in-pod cronjobs have only one instance of the job running at any one time. Specifically, this change fixes the issue where minutely cronjobs which take longer than a minute to run result in dozens of instances of the job running at the same time. In some cases this can cause Lagoon users to DoS themselves or use excessive CPU or memory resources.
ab12c48
to
a102000
Compare
This change enforces that in-pod cronjobs have only one instance of the job running at any one time.
Specifically, this change fixes the issue where minutely cronjobs which take longer than a minute to run result in dozens of instances of the job running at the same time. In some cases this can cause Lagoon users to DoS themselves or use excessive CPU or memory resources.
Closes: uselagoon/lagoon-images#172