Capomastro needs a command to safely lock users out and stop builds for service maintenance
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Capomastro |
Triaged
|
High
|
Unassigned |
Bug Description
With the new scheduling features of Capomastro it can get a bit complicated to stop the service to perform any type of maintenance as it will be talking to Jenkins constantly with multiple users logged in. We'd need a way to clear all current sessions, log these users out, make them inactive temporarily and (ideally, also) pause the scheduler beat. This command would have an opposite counterpart so it can all be re-enabled after the service maintenance.
Of course we can't stop Jenkins in any way, but Django seems to support what we need to do here. We'd just need to investigate how to pause the Celery beat but this seems doable, otherwise we may break things while trying to deploy fixes to production.
Celery Beat periodic tasks can be "paused" by setting their "enabled" attribute to false. Then they will be skipped by the scheduler.