Skip to content
Snippets Groups Projects
Unverified Commit ead6a067 authored by Phillip Wells's avatar Phillip Wells Committed by GitLab
Browse files

Merge branch 'docs-klang-geo-replication-troubleshooting-header-change' into 'master'

Switch from list to header in Geo troubleshooting for easier linkability

See merge request https://gitlab.com/gitlab-org/gitlab/-/merge_requests/169476



Merged-by: default avatarPhillip Wells <pwells@gitlab.com>
Co-authored-by: default avatarKeelan Lang <klang@gitlab.com>
parents 66c6c05f 944fdbe3
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -72,104 +72,108 @@ Commands that change data can cause damage if not run correctly or under the rig
[Start a Rails console session](../../../../administration/operations/rails_console.md#starting-a-rails-console-session)
to enact the following, basic troubleshooting steps:
 
- **For Blob types** (using the `Packages::PackageFile` component as an example)
- Find registry records that failed to sync:
```ruby
Geo::PackageFileRegistry.failed
```
The term registry records, in this case, refers to registry tables in the
Geo tracking database. Each record, or row, tracks a single replicable in the
main GitLab database, such as an LFS file, or a project Git repository. Here
are some other Rails models that correspond to Geo registry tables that can
be queried like the above:
```plaintext
CiSecureFileRegistry
ContainerRepositoryRegistry
DependencyProxyBlobRegistry
DependencyProxyManifestRegistry
JobArtifactRegistry
LfsObjectRegistry
MergeRequestDiffRegistry
PackageFileRegistry
PagesDeploymentRegistry
PipelineArtifactRegistry
ProjectWikiRepositoryRegistry
SnippetRepositoryRegistry
TerraformStateVersionRegistry
UploadRegistry
```
- Find registry records that are missing on the primary site:
```ruby
Geo::PackageFileRegistry.where(last_sync_failure: 'The file is missing on the Geo primary site')
```
- Resync a package file, synchronously, given an ID:
```ruby
model_record = Packages::PackageFile.find(id)
model_record.replicator.sync
```
- Resync a package file, synchronously, given a registry ID:
```ruby
registry = Geo::PackageFileRegistry.find(registry_id)
registry.replicator.sync
```
- Resync a package file, asynchronously, given a registry ID.
Since GitLab 16.2, a component can be asynchronously replicated as follows:
```ruby
registry = Geo::PackageFileRegistry.find(registry_id)
registry.replicator.enqueue_sync
```
- Reverify a package file, asynchronously, given a registry ID.
Since GitLab 16.2, a component can be asynchronously reverified as follows:
```ruby
registry = Geo::PackageFileRegistry.find(registry_id)
registry.replicator.verify_async
```
- **For Repository types** (using the `SnippetRepository` component as an example)
- Resync a snippet repository, synchronously, given an ID:
```ruby
model_record = Geo::SnippetRepositoryRegistry.find(id)
model_record.replicator.sync
```
- Resync a snippet repository, synchronously, given a registry ID
```ruby
registry = Geo::SnippetRepositoryRegistry.find(registry_id)
registry.replicator.sync
```
- Resync a snippet repository, asynchronously, given a registry ID.
Since GitLab 16.2, a component can be asynchronously replicated as follows:
```ruby
registry = Geo::SnippetRepositoryRegistry.find(registry_id)
registry.replicator.enqueue_sync
```
- Reverify a snippet repository, asynchronously, given a registry ID.
Since GitLab 16.2, a component can be asynchronously reverified as follows:
```ruby
registry = Geo::SnippetRepositoryRegistry.find(registry_id)
registry.replicator.verify_async
```
#### For blob types
Using the `Packages::PackageFile` component as an example:
- Find registry records that failed to sync:
```ruby
Geo::PackageFileRegistry.failed
```
The term registry records, in this case, refers to registry tables in the
Geo tracking database. Each record, or row, tracks a single replicable in the
main GitLab database, such as an LFS file, or a project Git repository. Here
are some other Rails models that correspond to Geo registry tables that can
be queried like the above:
```plaintext
CiSecureFileRegistry
ContainerRepositoryRegistry
DependencyProxyBlobRegistry
DependencyProxyManifestRegistry
JobArtifactRegistry
LfsObjectRegistry
MergeRequestDiffRegistry
PackageFileRegistry
PagesDeploymentRegistry
PipelineArtifactRegistry
ProjectWikiRepositoryRegistry
SnippetRepositoryRegistry
TerraformStateVersionRegistry
UploadRegistry
```
- Find registry records that are missing on the primary site:
```ruby
Geo::PackageFileRegistry.where(last_sync_failure: 'The file is missing on the Geo primary site')
```
- Resync a package file, synchronously, given an ID:
```ruby
model_record = Packages::PackageFile.find(id)
model_record.replicator.sync
```
- Resync a package file, synchronously, given a registry ID:
```ruby
registry = Geo::PackageFileRegistry.find(registry_id)
registry.replicator.sync
```
- Resync a package file, asynchronously, given a registry ID.
Since GitLab 16.2, a component can be asynchronously replicated as follows:
```ruby
registry = Geo::PackageFileRegistry.find(registry_id)
registry.replicator.enqueue_sync
```
- Reverify a package file, asynchronously, given a registry ID.
Since GitLab 16.2, a component can be asynchronously reverified as follows:
```ruby
registry = Geo::PackageFileRegistry.find(registry_id)
registry.replicator.verify_async
```
#### For repository types
Using the `SnippetRepository` component as an example:
- Resync a snippet repository, synchronously, given an ID:
```ruby
model_record = Geo::SnippetRepositoryRegistry.find(id)
model_record.replicator.sync
```
- Resync a snippet repository, synchronously, given a registry ID
```ruby
registry = Geo::SnippetRepositoryRegistry.find(registry_id)
registry.replicator.sync
```
- Resync a snippet repository, asynchronously, given a registry ID.
Since GitLab 16.2, a component can be asynchronously replicated as follows:
```ruby
registry = Geo::SnippetRepositoryRegistry.find(registry_id)
registry.replicator.enqueue_sync
```
- Reverify a snippet repository, asynchronously, given a registry ID.
Since GitLab 16.2, a component can be asynchronously reverified as follows:
```ruby
registry = Geo::SnippetRepositoryRegistry.find(registry_id)
registry.replicator.verify_async
```
 
### Resync and reverify multiple components
 
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment