Deleting .bigbrotherrc does not stop it from attempting to restart old jobs. There is no other obvious way to stop it.
Description
Details
| Subject | Repo | Branch | Lines +/- | |
|---|---|---|---|---|
| toollabs: bigbrother: stop tracking jobs when rcfile is deleted | operations/puppet | production | +2 -0 |
Related Objects
Event Timeline
bigbrother is structured in a way that makes it almost impossible to solve this issue and similar ones (cf. T88122) without effectively rewriting it. Conveniently, @yuvipanda currently does that in T90561, but that also means that it is unlikely that someone will work on this task in parallel.
This looks like something that did not get addressed in the rewrite. My my reading of the code, update_db will check for configuration for each running job's owner by calling read_config(owner). read_config will then:
- Check for an existing record in self.watchdb for the owner
- Exit if no homedir is found
- Add a basic record otherwise
- Check to see if the record needs to be refreshed and exit if the rcfile has been read "recently" (randomized refresh time for each record in the range 0-60m)
- This actually has a bug that needs to be fixed where ~/.bigbrotherrc won't be read on the first pass
- If no rcfile is found for a given tool then read_config will exit silently
- Read the rcfile and merge its contents with the existing job tracking state
- This step looks like it will drop old jobs that are no longer listed in the rcfile
I think the retry forever behavior could be fixed by having read_config remove all 'jobs' entries for a tool account when the rcfile is missing as well as when it is empty.
Poor reading of the code on my part. The exit condition is now < self.watchdb[tool]['refresh'] and in the first pass situation self.watchdb[tool]['refresh'] == now so the early exit will not fire and the rcfile will be read.
Change 330265 had a related patch set uploaded (by BryanDavis):
toollabs: bigbrother: stop tracking jobs when rcfile is deleted
Change 330265 merged by Andrew Bogott:
toollabs: bigbrother: stop tracking jobs when rcfile is deleted