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
98374035
Commit
98374035
authored
Sep 10, 2021
by
Katrin Leinweber
Committed by
Achilleas Pipinellis
Sep 10, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Warn against using plain git commands for housekeeping
parent
cca1122a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
5 deletions
+26
-5
doc/administration/housekeeping.md
doc/administration/housekeeping.md
+7
-1
doc/administration/raketasks/check.md
doc/administration/raketasks/check.md
+19
-4
No files found.
doc/administration/housekeeping.md
View file @
98374035
...
...
@@ -62,6 +62,12 @@ Housekeeping also [removes unreferenced LFS files](../raketasks/cleanup.md#remov
from your project on the same schedule as the
`git gc`
operation, freeing up storage space for your
project.
WARNING:
Running
`git gc`
or
`git repack`
commands manually in the
[
repository folder
](
repository_storage_types.md#from-project-name-to-hashed-path
)
is discouraged. If the created pack files get incorrect access rights (that is, owned by the wrong user)
browsing to the project page might result in
`404`
and
`503`
errors.
## How housekeeping handles pool repositories
Housekeeping for pool repositories is handled differently from standard repositories. It is
...
...
@@ -76,7 +82,7 @@ This is the current call stack by which it is invoked:
1.
`ObjectPoolService#fetch`
1.
`Gitaly::FetchIntoObjectPoolRequest`
To manually invoke it from a
Rails console
if needed, you can call
To manually invoke it from a
[
Rails console
](
operations/rails_console.md
)
if needed, you can call
`project.pool_repository.object_pool.fetch`
. This is a potentially long-running task, though Gitaly
times out in about 8 hours.
...
...
doc/administration/raketasks/check.md
View file @
98374035
...
...
@@ -204,12 +204,20 @@ See [LDAP Rake Tasks - LDAP Check](ldap.md#check) for details.
The following are solutions to problems you might discover using the Rake tasks documented
above.
### Dangling
commi
ts
### Dangling
objec
ts
`gitlab:git:fsck`
can find dangling commits. To fix them, try
[
enabling housekeeping
](
../housekeeping.md
)
.
The
`gitlab:git:fsck`
task can find dangling objects such as:
If the issue persists, try triggering
`gc`
via the
```
plaintext
dangling blob a12...
dangling commit b34...
dangling tag c56...
dangling tree d78...
```
To delete them, try
[
running housekeeping
](
../housekeeping.md
)
.
If the issue persists, try triggering garbage collection via the
[
Rails Console
](
../operations/rails_console.md#starting-a-rails-console-session
)
:
```
ruby
...
...
@@ -217,6 +225,13 @@ p = Project.find_by_path("project-name")
Repositories
::
HousekeepingService
.
new
(
p
,
:gc
).
execute
```
If the dangling objects are younger than the 2 weeks default grace period,
and you don't want to wait until they expire automatically, run:
```
ruby
Repositories
::
HousekeepingService
.
new
(
p
,
:prune
).
execute
```
### Delete references to missing remote uploads
`gitlab-rake gitlab:uploads:check VERBOSE=1`
detects remote objects that do not exist because they were
...
...
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