Skip to content

prevent disk overflow on gitserver

Administrator requested to merge gitserver-prevent-disk-full into master

Created by: ijt

Closes https://github.com/sourcegraph/infrastructure/issues/1458

This change should lighten our ops load a bit. Some gitserver nodes on sourcegraph.com were running out of disk space, and we had to manually ssh into them to remove old repos. There was already an algorithm in place that would remove repos older than some threshold every 24 hours, but it wasn't enough. This change increases the frequency of cleanups to once per minute, and adds a cleanup job that keeps removing the least recently updated repos until a target amount of space is available on disk.

Test plan: This PR includes an automated test.

CC @tsenart , @ggilmore

Merge request reports

Loading