Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upRemove 5-day-old zipped logs from buildslave dirs every night #200
Conversation
| @@ -58,3 +58,9 @@ buildbot-github-listener: | |||
| - mode: 644 | |||
| - watch_in: | |||
| - service: buildbot-github-listener | |||
|
|
|||
| find /home/servo/buildbot/master/*/*.bz2 -mtime +5 -exec rm {} ;: | |||
This comment has been minimized.
This comment has been minimized.
emilio
Jan 19, 2016
Member
I think you can do -delete instead of -exec rm {} ; (which may or may not need the semicolon) :P
This comment has been minimized.
This comment has been minimized.
|
I'd suggest using a more suggestive id and putting the actual command as the remove-old-build-logs:
cron.present:
- name: 'find /home/servo/buildbot/master/*/*.bz2 -mtime +5 -delete'
- user: root
- minute: 1
- hour: 0I also recommend quoting complicated commands like these to make it clear that they are strings and avoid ambiguity in parsing, but strictly speaking the quotes are optional. This makes it easier to see what the state is for and easier to reference it from another state. Here's the Salt documentation about names. Additionally, for the cron states in particular, the state id will become an |
|
@edunham Can you address this when you get a chance? We hit another out of disk space on buildbot master today :-( |
|
|
|
Overwrote old branch with @aneeshusa 's recommended change applied to latest master |
|
@bors-servo r+ |
|
|
Remove 5-day-old zipped logs from buildslave dirs every night Low disk space command from https://github.com/servo/servo/wiki/Buildbot-administration#handling-low-disk-space . We should no longer need to escape the semicolon, since Bash eats semicolons but Salt doesn't (right?) Salt cron syntax from https://docs.saltstack.com/en/latest/ref/states/all/salt.states.cron.html <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/saltfs/200) <!-- Reviewable:end -->
|
|
edunham commentedJan 19, 2016
Low disk space command from https://github.com/servo/servo/wiki/Buildbot-administration#handling-low-disk-space . We should no longer need to escape the semicolon, since Bash eats semicolons but Salt doesn't (right?)
Salt cron syntax from https://docs.saltstack.com/en/latest/ref/states/all/salt.states.cron.html