After upgrading to 14.0 my gitlab pages fail with this error in the logs:
ac490fda2b15 gitlab-pages: {"correlation_id":"01F8VPE6QTV782GX9CDQ7M1BDZ","error":"Get \"https://xxxxmyhost/api/v4/internal/pages?host=xxx\": dial tcp: lookup xxxxmyhost on [::1]:53: dial udp [::1]:53: connect: cannot assign requested address","host":"xxx,"level":"error","msg":"could not fetch domain information from a source","path":"/yyy.war","time":"2021-06-23T05:45:41Z"}
It seemd the chroot-ed gitlab-pages-daemon is not able to resolve any more. This page showd be the “solution”: GitLab Pages administration | GitLab
After executing these commands everything was ok again:
docker-compose exec bash
mkdir -p /var/opt/gitlab/gitlab-rails/shared/pages/etc/ssl
mkdir -p /var/opt/gitlab/gitlab-rails/shared/pages/opt/gitlab/embedded/ssl/certs/
cp /etc/resolv.conf /var/opt/gitlab/gitlab-rails/shared/pages/etc
cp /opt/gitlab/embedded/ssl/certs/cacert.pem /var/opt/gitlab/gitlab-rails/shared/pages/opt/gitlab/embedded/ssl/certs/
cp /opt/gitlab/embedded/ssl/certs/cacert.pem /var/opt/gitlab/gitlab-rails/shared/pages/etc/ssl/ca-bundle.pem
Of course this was not persistent. So I created my Dockerfile to be used in my docker-compose.yml:
FROM gitlab/gitlab-ce:latest
# gitlab pages daemon could not resolve DNS anymore. This is a workauround.
RUN \
mkdir -p /var/opt/gitlab/gitlab-rails/shared/pages/etc/ssl && \
mkdir -p /var/opt/gitlab/gitlab-rails/shared/pages/opt/gitlab/embedded/ssl/certs/ && \
cp /etc/resolv.conf /var/opt/gitlab/gitlab-rails/shared/pages/etc && \
cp /opt/gitlab/embedded/ssl/certs/cacert.pem /var/opt/gitlab/gitlab-rails/shared/pages/opt/gitlab/embedded/ssl/certs/ && \
cp /opt/gitlab/embedded/ssl/certs/cacert.pem /var/opt/gitlab/gitlab-rails/shared/pages/etc/ssl/ca-bundle.pem
This solved the problem for me. But this really is a workaround. Is there a “real” solution?
Thank you very much.