Skip to content

Commit 4f77f13

Browse files
authored
Merge pull request #88737 from subhtk/OCP37702
OCPBUGS 37702: Added a known issue in the delete feature about container registry
2 parents bb8aac8 + b6d3a23 commit 4f77f13

File tree

3 files changed

+64
-1
lines changed

3 files changed

+64
-1
lines changed

disconnected/mirroring/about-installing-oc-mirror-v2.adoc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,12 @@ After your cluster is configured to use the resources generated by oc-mirror plu
8989
// workflows of delete feature
9090
include::modules/oc-mirror-workflows-delete-v2.adoc[leveloffset=+1]
9191

92+
[role="_additional-resources"]
93+
.Additional resources
94+
* xref:../../disconnected/mirroring/about-installing-oc-mirror-v2.adoc#oc-mirror-v2-procedure-garbage-collector_about-installing-oc-mirror-v2[Resolving storage cleanup issues in the distribution registry]
95+
96+
include::modules/oc-mirror-v2-procedure-garbage-collector.adoc[leveloffset=+2]
97+
9298
// procedure for delete feature
9399
include::modules/oc-mirror-procedure-delete-v2.adoc[leveloffset=+2]
94100

@@ -113,6 +119,7 @@ include::modules/oc-mirror-proxy-support.adoc[leveloffset=+1]
113119
[role="_additional-resources"]
114120
.Additional resources
115121
* xref:../../disconnected/updating/disconnected-update-osus.adoc#updating-disconnected-cluster-osus[Updating a cluster in a disconnected environment using the OpenShift Update Service]
122+
* xref:../../disconnected/mirroring/about-installing-oc-mirror-v2.adoc#oc-mirror-v2-procedure-garbage-collector_about-installing-oc-mirror-v2[Resolving storage cleanup issues in the distribution registry]
116123

117124
//operator catalog filtering
118125
include::modules/oc-mirror-operator-catalog-filtering.adoc[leveloffset=+1]
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * disconnected/mirroring/about-installing-oc-mirror-v2.adoc
4+
5+
:_mod-docs-content-type: PROCEDURE
6+
[id="oc-mirror-v2-procedure-garbage-collector_{context}"]
7+
= Resolving storage cleanup issues in the distribution registry
8+
9+
A known issue in the distribution registry prevents the garbage collector from freeing up storage as expected. This issue does not occur when you use {quay}.
10+
11+
.Procedure
12+
13+
* Choose the appropriate method to work around the known issue in the distribution registry:
14+
15+
** To restart the container registry, run the following command:
16+
+
17+
[source,terminal]
18+
----
19+
$ podman restart <registry_container>
20+
----
21+
22+
** To disable caching in the registry configuration, perform the following steps:
23+
24+
... To disable the `blobdescriptor` cache, modify the `/etc/docker/registry/config.yml` file:
25+
+
26+
[source,yaml]
27+
----
28+
version: 0.1
29+
log:
30+
fields:
31+
service: registry
32+
storage:
33+
cache:
34+
blobdescriptor: ""
35+
filesystem:
36+
rootdirectory: /var/lib/registry
37+
http:
38+
addr: :5000
39+
headers:
40+
X-Content-Type-Options: [nosniff]
41+
health:
42+
storagedriver:
43+
enabled: true
44+
interval: 10s
45+
threshold: 3
46+
----
47+
48+
... To apply the changes, restart the container registry by running the following command:
49+
+
50+
[source,terminal]
51+
----
52+
$ podman restart <registry_container>
53+
----

modules/oc-mirror-workflows-delete-v2.adoc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,10 @@ Consider using the mirror-to-disk and disk-to-mirror workflows to reduce mirrori
5252

5353
oc-mirror plugin v2 deletes only the manifests of the images, which does not reduce the storage occupied in the registry.
5454

55-
To free up storage space from unnecessary images, such as those with deleted manifests, you must enable the garbage collector on your container registry. With the garbage collector enabled, the registry will delete the image blobs that no longer have references to any manifests, reducing the storage previously occupied by the deleted blobs. The process for enabling the garbage collector differs depending on your container registry.
55+
To free up storage space from unnecessary images, such as those with deleted manifests, you must enable the garbage collector on your container registry. With the garbage collector enabled, the registry will delete the image blobs that no longer have references to any manifests, reducing the storage previously occupied by the deleted blobs. The process for enabling the garbage collector differs depending on your container registry.
56+
57+
For more information, see "Resolving storage cleanup issues in the distribution registry".
58+
5659

5760
[IMPORTANT]
5861
====

0 commit comments

Comments
 (0)