-
Notifications
You must be signed in to change notification settings - Fork 12
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
Deploy only one celery instance #366
Conversation
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.
LGTM! Just questions out of curiousity!
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.
If I'm understanding this correctly we're relying on the peer-relation-departed
event happening before leader-elected
. If it doesn't, we'd remove the nominated unit but not nominate a new unit until another leader-elected
event is triggered at some point in the future.
Exactly, there should be a leader at any point, so if the celery unit is leader, a leader elected event will be fired when it is removed (if not earlier) |
But if the
Since "celery-unit" is set, it would do nothing. Then the |
In that case, the change would occur in the peer relation departed handler. All the units receive that event, so if the celery unit is not the leader, the leader will set that value to itself |
Sorry, you are right. Thanks for the out of band explanation, I'd missed that the |
Test coverage for b1482f9
Static code analysis report
|
Applicable spec: N/A
Overview
Run celery only in one unit. To achieve that, the celery container is removed and it will be planned instead on a single unit along with the indico process
Rationale
Celery does not provide exactly once guarantees, so multiple units can cause tasks to be executed by multiple workers, impacting user experience when those have a visible result.
Juju Events Changes
Module Changes
charm.py
Library Changes
N/A
Checklist
src-docs
urgent
,trivial
,complex
)