E2E test for Praefect failover
Add an E2E test of basic manual Praefect failover.
It should verify that after failover occurs:
- the secondary node has been promoted to primary
- the new primary is able to serve requests
- and the old primary does not get replicated to
More information about Praefect failover can be found in the following epic and issue:
Steps
- Launch a
gitlab-qascenario with Praefect configured with a primary and a secondary node. - Create a project with at least 1 file in the repository.
- Trigger failover (by taking the primary offline, e.g.,
docker execinto the container and kill the gitaly process, or just kill the container. If automatic failover isn't implemented yet we'll need to change the praefect config to promote the secondary) - Verify that the secondary becomes the primary by making a change to the repo (e.g., create a branch)
- Verify that the change was not replicated to the secondary (this might not be possible because it probably requires file system access, although it might be possible to
docker execinto the relevant container, as in step 3)
Edited by Mark Lapierre