Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
74e41fb5
Commit
74e41fb5
authored
Jul 17, 2021
by
Harish Ramachandran
Committed by
Achilleas Pipinellis
Jul 17, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Geo package verification script
parent
e762a4b6
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
5 deletions
+32
-5
doc/administration/troubleshooting/gitlab_rails_cheat_sheet.md
...dministration/troubleshooting/gitlab_rails_cheat_sheet.md
+32
-5
No files found.
doc/administration/troubleshooting/gitlab_rails_cheat_sheet.md
View file @
74e41fb5
...
@@ -1142,6 +1142,33 @@ registry = Geo::PackageFileRegistry.find(registry_id)
...
@@ -1142,6 +1142,33 @@ registry = Geo::PackageFileRegistry.find(registry_id)
registry
.
replicator
.
send
(
:download
)
registry
.
replicator
.
send
(
:download
)
```
```
#### Verify package files on the secondary manually
This will iterate over all package files on the secondary, looking at the
`verification_checksum`
stored in the database (which came from the primary)
and then calculate this value on the secondary to check if they match. This
won't change anything in the UI:
```
ruby
# Run on secondary
status
=
{}
Packages
::
PackageFile
.
find_each
do
|
package_file
|
primary_checksum
=
package_file
.
verification_checksum
secondary_checksum
=
Packages
::
PackageFile
.
hexdigest
(
package_file
.
file
.
path
)
verification_status
=
(
primary_checksum
==
secondary_checksum
)
status
[
verification_status
.
to_s
]
||=
[]
status
[
verification_status
.
to_s
]
<<
package_file
.
id
end
# Count how many of each value we get
status
.
keys
.
each
{
|
key
|
puts
"
#{
key
}
count:
#{
status
[
key
].
count
}
"
}
# See the output in its entirety
status
```
### Repository types newer than project/wiki repositories
### Repository types newer than project/wiki repositories
-
`SnippetRepository`
-
`SnippetRepository`
...
@@ -1172,15 +1199,15 @@ registry = Geo::SnippetRepositoryRegistry.find(registry_id)
...
@@ -1172,15 +1199,15 @@ registry = Geo::SnippetRepositoryRegistry.find(registry_id)
registry
.
replicator
.
send
(
:sync_repository
)
registry
.
replicator
.
send
(
:sync_repository
)
```
```
##
#
Generate Service Ping
## Generate Service Ping
###
#
Generate or get the cached Service Ping
### Generate or get the cached Service Ping
```
ruby
```
ruby
Gitlab
::
UsageData
.
to_json
Gitlab
::
UsageData
.
to_json
```
```
###
#
Generate a fresh new Service Ping
### Generate a fresh new Service Ping
This will also refresh the cached Service Ping displayed in the admin area
This will also refresh the cached Service Ping displayed in the admin area
...
@@ -1188,7 +1215,7 @@ This will also refresh the cached Service Ping displayed in the admin area
...
@@ -1188,7 +1215,7 @@ This will also refresh the cached Service Ping displayed in the admin area
Gitlab
::
UsageData
.
to_json
(
force_refresh:
true
)
Gitlab
::
UsageData
.
to_json
(
force_refresh:
true
)
```
```
###
#
Generate and print
### Generate and print
Generates Service Ping data in JSON format.
Generates Service Ping data in JSON format.
...
@@ -1196,7 +1223,7 @@ Generates Service Ping data in JSON format.
...
@@ -1196,7 +1223,7 @@ Generates Service Ping data in JSON format.
rake gitlab:usage_data:generate
rake gitlab:usage_data:generate
```
```
###
#
Generate and send Service Ping
### Generate and send Service Ping
Prints the metrics saved in
`conversational_development_index_metrics`
.
Prints the metrics saved in
`conversational_development_index_metrics`
.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment