Cannot upload windows images to registry
Summary
Current registry chart configuration does not allow upload of windows images with foreign layers. See gitlab-org/omnibus-gitlab#4013 (closed) for detailed explanation.
This was resolved in gitlab-omnibus by adding following registry configuration:
validation:
disabled: true
It would be good to either expose validation
to gitlab chart config or set it to the same default as gitlab-omnibus.
Steps to reproduce
Build windows container image and push it to gitlab registry
Current behavior
PS # docker push registry.example.com/replay/gitlab-runner:latest
The push refers to repository [registry.example.com/replay/gitlab-runner]
5667a46c09cd: Layer already exists
<...>
754610cf8f81: Skipped foreign layer
c4d02418787d: Skipped foreign layer
received unexpected HTTP status: 500 Internal Server Error
Expected behavior
When I edit configmap gitlab-registry and add snippet from above, push succeeds
Versions
- Chart: 2.0.3
- Platform:
- Self-hosted: kubespray
Relevant logs
ime="2019-07-04T19:45:38.996817899Z" level=error msg="response completed with error" auth.user.name=alebastr err.code=unknown err.message="unknown error" go.version=go1.11.2 http.request.contenttype="application/vnd.docker.distribution.manifest.v2+json" http.request.host=registry.example.com http.request.id=010347c9-0c13-4705-a71a-871c9cc7716a http.request.method=PUT http.request.remoteaddr=192.168.80.164 http.request.uri="/v2/replay/gitlab-runner/manifests/latest" http.request.useragent="docker/18.09.7 go/go1.10.8 git-commit/b81f47481d os/windows arch/amd64 UpstreamClient(Docker-Client/18.09.7 \(windows\))" http.response.contenttype="application/json; charset=utf-8" http.response.duration="924.476µs" http.response.status=500 http.response.written=523 vars.name="replay/gitlab-runner" vars.reference=latest
time="2019-07-04T19:45:38.996852553Z" level=error msg="response completed with error" auth.user.name=alebastr err.code=unknown err.message="invalid URL on layer" go.version=go1.11.2 http.request.contenttype="application/vnd.docker.distribution.manifest.v2+json" http.request.host=registry.example.com http.request.id=010347c9-0c13-4705-a71a-871c9cc7716a http.request.method=PUT http.request.remoteaddr=192.168.80.164 http.request.uri="/v2/replay/gitlab-runner/manifests/latest" http.request.useragent="docker/18.09.7 go/go1.10.8 git-commit/b81f47481d os/windows arch/amd64 UpstreamClient(Docker-Client/18.09.7 \(windows\))" http.response.contenttype="application/json; charset=utf-8" http.response.duration="959.592µs" http.response.status=500 http.response.written=523 vars.name="replay/gitlab-runner" vars.reference=latest
192.168.80.160 - - [04/Jul/2019:19:45:38 +0000] "PUT /v2/replay/gitlab-runner/manifests/latest HTTP/1.1" 500 523 "" "docker/18.09.7 go/go1.10.8 git-commit/b81f47481d os/windows arch/amd64 UpstreamClient(Docker-Client/18.09.7 \\(windows\\))"
time="2019-07-04T19:45:38.996871301Z" level=error msg="response completed with error" auth.user.name=alebastr err.code="manifest blob unknown" err.detail=sha256:65014b3c312172f10bd6701a063f9b5aaf9a916c2d2cb843d406a6f77ded3f8d err.message="blob unknown to registry" go.version=go1.11.2 http.request.contenttype="application/vnd.docker.distribution.manifest.v2+json" http.request.host=registry.example.com http.request.id=010347c9-0c13-4705-a71a-871c9cc7716a http.request.method=PUT http.request.remoteaddr=192.168.80.164 http.request.uri="/v2/replay/gitlab-runner/manifests/latest" http.request.useragent="docker/18.09.7 go/go1.10.8 git-commit/b81f47481d os/windows arch/amd64 UpstreamClient(Docker-Client/18.09.7 \(windows\))" http.response.contenttype="application/json; charset=utf-8" http.response.duration="978.446µs" http.response.status=500 http.response.written=523 vars.name="replay/gitlab-runner" vars.reference=latest
time="2019-07-04T19:45:38.996890441Z" level=error msg="response completed with error" auth.user.name=alebastr err.code=unknown err.message="unknown error" go.version=go1.11.2 http.request.contenttype="application/vnd.docker.distribution.manifest.v2+json" http.request.host=registry.example.com http.request.id=010347c9-0c13-4705-a71a-871c9cc7716a http.request.method=PUT http.request.remoteaddr=192.168.80.164 http.request.uri="/v2/replay/gitlab-runner/manifests/latest" http.request.useragent="docker/18.09.7 go/go1.10.8 git-commit/b81f47481d os/windows arch/amd64 UpstreamClient(Docker-Client/18.09.7 \(windows\))" http.response.contenttype="application/json; charset=utf-8" http.response.duration="997.719µs" http.response.status=500 http.response.written=523 vars.name="replay/gitlab-runner" vars.reference=latest
time="2019-07-04T19:45:38.99690629Z" level=error msg="response completed with error" auth.user.name=alebastr err.code=unknown err.message="invalid URL on layer" go.version=go1.11.2 http.request.contenttype="application/vnd.docker.distribution.manifest.v2+json" http.request.host=registry.example.com http.request.id=010347c9-0c13-4705-a71a-871c9cc7716a http.request.method=PUT http.request.remoteaddr=192.168.80.164 http.request.uri="/v2/replay/gitlab-runner/manifests/latest" http.request.useragent="docker/18.09.7 go/go1.10.8 git-commit/b81f47481d os/windows arch/amd64 UpstreamClient(Docker-Client/18.09.7 \(windows\))" http.response.contenttype="application/json; charset=utf-8" http.response.duration=1.013628ms http.response.status=500 http.response.written=523 vars.name="replay/gitlab-runner" vars.reference=latest
time="2019-07-04T19:45:38.996920953Z" level=error msg="response completed with error" auth.user.name=alebastr err.code="manifest blob unknown" err.detail=sha256:266cffe9d908cf404f555fd6f60ff19167f6393ce6d42f4c9e6e4014cd04bccd err.message="blob unknown to registry" go.version=go1.11.2 http.request.contenttype="application/vnd.docker.distribution.manifest.v2+json" http.request.host=registry.example.com http.request.id=010347c9-0c13-4705-a71a-871c9cc7716a http.request.method=PUT http.request.remoteaddr=192.168.80.164 http.request.uri="/v2/replay/gitlab-runner/manifests/latest" http.request.useragent="docker/18.09.7 go/go1.10.8 git-commit/b81f47481d os/windows arch/amd64 UpstreamClient(Docker-Client/18.09.7 \(windows\))" http.response.contenttype="application/json; charset=utf-8" http.response.duration=1.028285ms http.response.status=500 http.response.written=523 vars.name="replay/gitlab-runner" vars.reference=latest