Skip to content

Praefect should have a general tool for inspecting the repositories on the cluster

praefect dataloss is currently the only tool to list out information about repositories in the cluster. However, it only does so for repositories which are partially replicated. Some of the information like the repository's primary and the assigned storages can be useful even in normal operation when the repository is fully replicated.

We should provide a way to print out repository's information in a similar fashion to praefect dataloss even if the repository is fully replicated. To do so, I think we could generalize the functionality in dataloss in to a new command:

praefect list-repositories -virtual-storage <virtual-storage> [-read-only] [-partially-replicated] <relative-path>

Output would be what praefect dataloss is currently printing out. The flags are used to filter down results.

To list out information of all repositories in a virtual storage

  • praefect list-repositories -virtual-storage VIRTUAL_STORAGE_NAME

To list out information of specific repositories:

  • praefect list-repositories -virtual-storage VIRTUAL_STORAGE_NAME RELATIVE_PATH_1 RELATIVE_PATH_2 ...

To list out read-only repositories (praefect dataloss):

  • praefect list-repositories -virtual-storage VIRTUAL_STORAGE_NAME -read-only

To list out partially replicated repositories (praefect dataloss -partially-replicated):

  • praefect list-repositories -virtual-storage VIRTUAL_STORAGE_NAME -partially-replicated

/cc @mjwood @zj-gitlab

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information