Closed m4r1k closed 3 years ago
@m4r1k I believe this is the same issue https://bugzilla.redhat.com/show_bug.cgi?id=1874106 . With oc image mirror
the workaround is to add the flag --skip-multiple-scopes=true
. However this flag is not exposed with oc adm catalog mirror
so it should be added to provide the same workaround, while a more permanent solution is being investigated.
@m4r1k can you share the oc adm catalog mirror
command you ran? thanks
As also wrote in the Harbor issue, the oc
is fairly standard
oc adm catalog mirror \
registry.redhat.io/redhat/redhat-operator-index:v4.6 \
harbor.localdomain/ocp4-v4.6 \
-a ~/pull-secret.json \
--filter-by-os=linux/amd64
if you don't mind, can you confirm that command succeeds w/ oc from this commit: https://github.com/openshift/oc/pull/780/commits/511ab52fc1f19d1127e43ca2be3930bd69e19acc (PR https://github.com/openshift/oc/pull/780)
you can grab it with this image: quay.io/sallyom/cli:test
then
something like:
podman run --rm -it -v ~/pull-secret.json:/pull-secret:z \
quay.io/sallyom/cli:test \
oc adm catalog mirror registry.redhat.io/redhat/redhat-operator-index:v4.6 harbor.localdomain/ocp4-v4.6 \
-a /pull-secret --filter-by-os=linux/amd64
thanks
Good Morning @sallyom !
i tested your oc version against harbor v2.2.0-ec0ba116 With oc 4.7.1 i got the described "14 Request-URI Too Large" from Harbor.
Now using your oc Client Version: v4.2.0-alpha.0-1033-g6abfff6 it's working, Image mirror running successful without any issues. thanks
I can also confirm that using works the patch oc
cli the OperatorHub mirroring works without patching Harbor
nice! ok, let's get that merged. :)
Issues go stale after 90d of inactivity.
Mark the issue as fresh by commenting /remove-lifecycle stale
.
Stale issues rot after an additional 30d of inactivity and eventually close.
Exclude this issue from closing by commenting /lifecycle frozen
.
If this issue is safe to close now please do so with /close
.
/lifecycle stale
Stale issues rot after 30d of inactivity.
Mark the issue as fresh by commenting /remove-lifecycle rotten
.
Rotten issues close after an additional 30d of inactivity.
Exclude this issue from closing by commenting /lifecycle frozen
.
If this issue is safe to close now please do so with /close
.
/lifecycle rotten /remove-lifecycle stale
Rotten issues close after 30d of inactivity.
Reopen the issue by commenting /reopen
.
Mark the issue as fresh by commenting /remove-lifecycle rotten
.
Exclude this issue from closing again by commenting /lifecycle frozen
.
/close
@openshift-bot: Closing this issue.
Recently while mirroring the OpenShift OperatorHubs to a Harbor registry, I came across an error. While executing the
oc adm catalog mirror
command, Harbor's frontend (Nginx) was giving the error414 Request-URI Too Large when pushing large contents
.It looks like
oc
is generating wayyyyy too large URI requests. Follows the log from NginxI initially opened a issue and PR in Harbor but the community came back saying that is quite unusual generating URI this big.
In the official OpenShift documentation, when mirroring the OperatorHub, the only Registry requirement is "access to mirror registry that supports Docker v2-2".
Now I can be very wrong, but I don't see anywhere in the official Docker v2-2 specs that URI can have an unlimited (or definitely very large) size such as what the
oc
CLI generates. https://docs.docker.com/registry/spec/manifest-v2-2/ https://docs.docker.com/registry/spec/api/I suspect this problem will affect also other Registry implementation not tuned for
oc
.So couple of questions:
oc
Thanks!