Add CleanAction to clean up unused repositories
Currently, in the internal/praefect/repocleaner package, there is a Runner that periodically crawls through each gitaly node's repositories and checks if they are tracked by praefect. If not, that means it's not in use at all and can be cleaned up.
In !4449 (merged), we added a grace period so that we don't accidentally mark repositories that have just created and are in flight as unmanaged by praefect
We now would like to actually quarantine those unused repositories to another location so sysadmins can go in and clean them up. This MR makes several changes. ted a record in the database.
- Add a
CleanReposRPC that takes care of moving old repositories into a folderlost+foundunder the storage root. - Add an
CleanActionthat will callCleanRepos
NOTE: This MR does not make use of the CleanAction just yet. We'll just continue to log the repositories that are not managed by praefect.
Edited by John Cai