Description of problem: Image registry pods go to CrashLoopBackOff when container name contains a sequence of dashes Version-Release number of selected component (if applicable): 4.2.0-0.nightly-2019-09-08-180038 How reproducible: always Steps to Reproduce: 1.Set container name with a sequence of dashes,such as: storage: azure: accountName: qexiuwangazure90974fkwsc container: qe-xiuwang-azure-909-74z7s---image-registry-qyctpisglrltvbixdqrw 2.Check image registry pod 3. Actual results: $ oc logs -f image-registry-6b9bf757d5-9sdpk time="2019-09-10T05:46:33.578796359Z" level=info msg="start registry" distribution_version=v2.6.0+unknown go.version=go1.11.13 openshift_version=v4.2.0-201909020729+3d8ce1c-dirty time="2019-09-10T05:46:33.579464688Z" level=info msg="caching project quota objects with TTL 1m0s" go.version=go1.11.13 panic: storage: service returned error: StatusCode=400, ErrorCode=OutOfRangeInput, ErrorMessage=The specified resource name length is not within the permissible limits. RequestId:caafca3b-101e-001a-4b9b-67f41a000000 Time:2019-09-10T05:46:33.6609312Z, RequestInitiated=Tue, 10 Sep 2019 05:46:33 GMT, RequestId=caafca3b-101e-001a-4b9b-67f41a000000, API Version=2016-05-31, QueryParameterName=, QueryParameterValue= goroutine 1 [running]: github.com/openshift/image-registry/vendor/github.com/docker/distribution/registry/handlers.NewApp(0x199c940, 0xc000042038, 0xc000094e00, 0xc0005f2400) /go/src/github.com/openshift/image-registry/vendor/github.com/docker/distribution/registry/handlers/app.go:127 +0x335a github.com/openshift/image-registry/pkg/dockerregistry/server/supermiddleware.NewApp(0x199c940, 0xc000042038, 0xc000094e00, 0x19a2ec0, 0xc000465290, 0x19a4ee0) /go/src/github.com/openshift/image-registry/pkg/dockerregistry/server/supermiddleware/app.go:96 +0x85 github.com/openshift/image-registry/pkg/dockerregistry/server.NewApp(0x199c940, 0xc000042038, 0x19830c0, 0xc00000e258, 0xc000094e00, 0xc0004ce000, 0x0, 0x0, 0x0, 0x0) /go/src/github.com/openshift/image-registry/pkg/dockerregistry/server/app.go:138 +0x287 github.com/openshift/image-registry/pkg/cmd/dockerregistry.NewServer(0x199c940, 0xc000042038, 0xc000094e00, 0xc0004ce000, 0x0, 0x0, 0x19bcae0) /go/src/github.com/openshift/image-registry/pkg/cmd/dockerregistry/dockerregistry.go:210 +0x190 github.com/openshift/image-registry/pkg/cmd/dockerregistry.Execute(0x197f8a0, 0xc00000e028) /go/src/github.com/openshift/image-registry/pkg/cmd/dockerregistry/dockerregistry.go:164 +0x9e1 main.main() /go/src/github.com/openshift/image-registry/cmd/dockerregistry/main.go:93 +0x3f6 Expected results: Should prompt warning for the name contains a sequence of dashes Additional info: must-gather logs here: http://virt-openshift-05.lab.eng.nay.redhat.com/xiuwang/azure-must-gather/
Container names must start with a letter or number, and can contain only letters, numbers, and the dash (-) character. Every dash (-) character must be immediately preceded and followed by a letter or number; consecutive dashes are not permitted in container names. All letters in a container name must be lowercase. Container names must be from 3 through 63 characters long. Verified with 4.3.0-0.nightly-2019-11-19-122017
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2020:0062