Skip to content

Print host assignments and primary per repository in `praefect dataloss`

Sami Hiltunen requested to merge smh-dataloss-assignments-and-primaries into master

This MR prints out primaries per repository in praefect dataloss and prints out whether the Gitaly node is an assigned host node of the repository. While the output and the protobufs have been changed, the command still doesn't support actually fetching repository specific primaries or the host node assignments from the database. Due to this, every repository gets the virtual storage's primary node printed as its primary. Likewise, every configured node is printed out as assigned. The output is correct when used with the virtual storage scoped primary as repositories in within a virtual storage share the same primary and are replicated to every node in the virtual storage.

The tests are changed to use the Postgres repository store to exercise the actual production code. Repository specific primaries and variable replication factor are not implemented on the in-memory stack, so support will be dropped in a follow up.

There will be a follow up MR which plugs in the behavior to actually fetch repository's primary from the database along its host node assignments.

Related to #2971 (closed), #3133 (closed)

Merge request reports