Internal Server Error when loggin into Docker registry
Summary
Logging into the Docker registry results in an Internal Server Error response.
This issue occurs on a cloud native helm install, which has been migrated and restored successfully from an OmniBus installation.
Steps to reproduce
$ helm install gitlab
- Follow the migration guide to migrate from OmniBus to cloud native setup
-
$ docker login registry
=> Internal Server Error 500
If I use the same chart (except for the domain name), without restoring the backup, everything works fine.
Configuration used
Relevant changes from the default:
global:
edition: ce
hosts:
domain: k0.local
https: false
ingress:
enabled: true
configureCertmanager: false
annotations:
kubernetes.io/ingress.class: "nginx"
kubernetes.io/ingress.allow-http: "true"
nginx.ingress.kubernetes.io/ssl-redirect: "false"
nginx.ingress.kubernetes.io/backend-protocol: "HTTP"
certmanager.k8s.io/cluster-issuer: "ca-issuer"
nginx.ingress.kubernetes.io/ssl-passthrough: "false"
tls:
enabled: true
secretName: itp-git-unicorn-tls-cert
ldap:
servers:
main:
...
certmanager:
install: false
nginx-ingress:
enabled: false
minio:
enabled: true
ingress:
tls:
secretName: itp-git-minio-tls-cert
registry:
enabled: true
ingress:
tls:
secretName: itp-git-registry-tls-cert
Current behavior
$ docker login -u foo -p bar registry.k0.local
Error response from daemon: Get https://registry.k0.local/v2/: received unexpected HTTP status: 500 Internal Server Error
Expected behavior
Successful login into Docker registry.
Versions
- Chart: master (ed4fd898)
- Platform:
- Self-hosted: NixOS 19.03pre169895.fa82ebccf66 (Koi)
- Kubernetes:
- Client: 1.13.3
- Server: 1.13.3
- Helm:
- Client: 2.11.0
- Server: 2.12.3
Relevant logs
Registry pod:
time="2019-02-26T11:40:22.895478922Z" level=warning msg="error authorizing context: authorization token required" go.version=go1.11.2 http.request.host=registry.k0.local http.request.id=27d9e1aa-7b76-4730-886e-212037b062b8 http.request.method=GET http.request.remoteaddr=127.0.0.1 http.request.uri="/v2/" http.request.useragent="docker/18.09.2 go/go1.11.5 git-commit/62479626f213818ba5b4565105a05277308587d5 kernel/4.14.101 os/linux arch/amd64 UpstreamClient(Docker-Client/18.09.2 \(linux\))"
10.10.42.0 - - [26/Feb/2019:11:40:22 +0000] "GET /v2/ HTTP/1.1" 401 87 "" "docker/18.09.2 go/go1.11.5 git-commit/62479626f213818ba5b4565105a05277308587d5 kernel/4.14.101 os/linux arch/amd64 UpstreamClient(Docker-Client/18.09.2 \\(linux\\))"
Postgres pod:
ERROR: column personal_access_tokens.token does not exist at character 142
STATEMENT: SELECT "personal_access_tokens".* FROM "personal_access_tokens" WHERE (revoked = false AND (expires_at >= NOW() OR expires_at IS NULL)) AND "personal_access_tokens"."token" = $1 LIMIT $2
FATAL: database "gitlab" does not exist
(The FATAL entries keep accumulating with time, and also happen on completely fresh installs)