Skip to content

Port to 14.6: Fix Geo verification with GitLab-managed object storage replication

What does this MR do and why?

Describe in detail what your merge request does and why.

Port of !79303 (merged) and !79469 (merged) to 14.6.

!79303 (merged) doesn't pick as-is because the replicable_model.rb file was moved from ee/lib/gitlab/geo/replicable_model.rb to ee/app/models/concerns/geo/replicable_model.rb in 14.7. This MR resolves the conflict by copying the new method def in_available_verifiables? to ee/lib/gitlab/geo/replicable_model.rb.

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

To reproduce the problem in 14-stable-ee prior to this MR being merged:

  • On 14-6-stable-ee branch, with Geo setup, with object storage configured for at least Uploads, with "Allow replication of object stored files" enabled for the secondary site
  • Add an attachment to an issue or MR
  • See that it persists as a sync failure
  • Notice in geo.log that sync succeeds and verification fails, in a loop, with progressive backoff of retries until it's being retried once every hour

To prove that the port of !79303 (merged) in this MR worked:

  • Now switch to this MR's branch port-14-6-fix-verification-object-storage and gdk restart rails-background-jobs
  • See that the sync failure goes away and becomes success
  • Notice no sync/verification loop in geo.log

To prove that the port of !79469 (merged) in this MR worked:

  • Run in Rails console Geo::UploadRegistry.last.replicator.verify
  • Inspect the registry Geo::UploadRegistry.last
  • Notice that verification succeeded and it's still marked synced

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Merge request reports

Loading