Geo: Preflight check repository replication and verification check does not check verification
Summary
When running gitlab-promote-to-primary
including preflight checks the step checking if replication and verification is up-to-date reports success even when verification is not complete.
Steps to reproduce
- Install GitLab EE 13.5.1 with a single node primary and a single node secondary
- Create a new project on the primary
- Swiftly afterwards run
gitlab-promote-to-primary
on the secondary - Confirm that preflight checks are completed
- See
gitlab:geo:check_replication_verification_status...
succeed even though verification is not yet complete.
What is the current bug behavior?
The replication and verification step succeeds even though verification is incomplete.
What is the expected correct behavior?
The step only succeeds if both verification and replication are complete.
Relevant logs and/or screenshots
Running gitlab-rake gitlab:geo:check_replication_verification_status...
Repositories: 2/2 (100%)
Verified Repositories: 1/2 (50%)
Wikis: 2/2 (100%)
Verified Wikis: 1/2 (50%)
LFS Objects: 0/0 (0%)
Attachments: 0/0 (0%)
CI job artifacts: 0/0 (0%)
Design repositories: 0/0 (0%)
Merge Request Diffs: 0/0 (0%)
Package Files: 0/0 (0%)
Terraform State Versions: 0/0 (0%)
Repositories Checked: 0/2 (0%)
Merge Request Diffs Checked: 0/0 (0%)
Package Files Checked: 0/0 (0%)
Terraform State Versions Checked: 0/0 (0%)
SUCCESS - Replication is up-to-date.
Repositories: 2/2 (100%)
Verified Repositories: 1/2 (50%)
Wikis: 2/2 (100%)
Verified Wikis: 1/2 (50%)
LFS Objects: 0/0 (0%)
Attachments: 0/0 (0%)
CI job artifacts: 0/0 (0%)
Design repositories: 0/0 (0%)
Merge Request Diffs: 0/0 (0%)
Package Files: 0/0 (0%)
Terraform State Versions: 0/0 (0%)
Repositories Checked: 0/2 (0%)
Merge Request Diffs Checked: 0/0 (0%)
Package Files Checked: 0/0 (0%)
Terraform State Versions Checked: 0/0 (0%)
SUCCESS - Replication is up-to-date.
All preflight checks have passed. This node can now be promoted.
Possible fixes
Error may be in https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/lib/gitlab/geo/geo_node_status_check.rb#L63