Skip to content
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

workers should be able to automatically delete leftover directory #4095

Closed
aj062 opened this issue May 14, 2018 · 5 comments
Closed

workers should be able to automatically delete leftover directory #4095

aj062 opened this issue May 14, 2018 · 5 comments

Comments

@aj062
Copy link
Contributor

aj062 commented May 14, 2018

Buildbot worker prints a warning about leftover directory:

[Broker,client] I have a leftover directory 'xyz-tests' that is not being used by the buildmaster: you can delete it now

Reference: https://github.com/buildbot/buildbot/blob/master/worker/buildbot_worker/base.py#L299

In large setups where configuration is dynamic and workers connect to different builders and builders change over time, it becomes a huge manual tasks to keep track of left-over directories and manually delete them.

Buildbot worker should have an option to delete such left-over directories, (probably configurable somewhere, e.g. buildbot.tac or master.cfg)

@gpshead
Copy link

gpshead commented Sep 25, 2019

The lack of this behavior took two of my buildbots offline after the master made a configuration change that altered the directory suffixes used.

Instead of logging I have a leftover directory 'BLAH' that is not being used by the buildmaster: you can delete it now to a log file no human is going to monitor, just call shutil.rmtree() on it.

log.msg("I have a leftover directory '{0}' that is not "

is where it'd be done.

(as seen due to python/buildmaster-config#108 and https://bugs.python.org/issue38269)

@mojca
Copy link
Collaborator

mojca commented Sep 26, 2019

#4750

@mojca
Copy link
Collaborator

mojca commented Sep 27, 2019

Sorry for the too short response last time. I would be in favour of automatically cleaning things up, one just needs to be careful enough to not delete stuff that's still being used (two builders may use the same dir, for example; even though I might want a clean-up anyway), and that users might actually want to delete stuff which should have been removed before this functionality will be implemented.

@aj062
Copy link
Contributor Author

aj062 commented Mar 3, 2020

Seems like this is fixed by https://github.com/buildbot/buildbot/pull/5160/files

@p12tic
Copy link
Member

p12tic commented Mar 3, 2020

Indeed.

@p12tic p12tic closed this as completed Mar 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants