[go: up one dir, main page]

Skip to content

Deployment in a complete IPv6 only environment

Summary

Deploying gitlab helm chart in a complete IPv6 only environment.

Not able to access the sign_in page and also found that certain end points of webservice pods are throwing "404 Not found Html page" when trying to access using IPv6.

Changed binding ips to IPv6 to access the webpage, rebuilt the image and tried. Still the endpoints are throwing the same and the complete webpage is not loading.

image

Steps to reproduce

Deployment in a complete IPv6 only environment.

Dockerfile of gitlab-webservice:

FROM registry.gitlab.com/gitlab-org/build/cng/gitlab-webservice-ee:v13.12.1

**RUN sed -i "s+0.0.0.0+[::]+g" /srv/gitlab/config/puma.rb**__


CMD /scripts/process-wrapper

HEALTHCHECK --interval=30s --timeout=30s --retries=5 \
CMD /scripts/healthcheck

Made the following changes in the scripts/start-workhorse and rebuild the image:

#!/bin/bash

set -e

touch /var/log/gitlab/workhorse.log

# pre-create known good tmpdir
export TMPDIR=/tmp/gitlab
mkdir -p -m 3770 $TMPDIR

export GITLAB_WORKHORSE_LOG_FILE=${GITLAB_WORKHORSE_LOG_FILE:-stdout}
export GITLAB_WORKHORSE_LOG_FORMAT=${GITLAB_WORKHORSE_LOG_FORMAT:-json}
if [[ "${GITLAB_WORKHORSE_PROM_LISTEN_ADDR}" =~ ^.+:[0-9][0-9]{0,4}$ ]]; then
   export PROM_LISTEN_ADDR="-prometheusListenAddr ${GITLAB_WORKHORSE_PROM_LISTEN_ADDR}"
fi

gitlab-workhorse \
  -logFile ${GITLAB_WORKHORSE_LOG_FILE} \
  -logFormat ${GITLAB_WORKHORSE_LOG_FORMAT} \
  ${GITLAB_WORKHORSE_EXTRA_ARGS} \
  -listenAddr **[::]:${GITLAB_WORKHORSE_LISTEN_PORT:-8181}**__ \
  -documentRoot "/srv/gitlab/public" \
  -secretPath "/etc/gitlab/gitlab-workhorse/secret" \
  -config "/srv/gitlab/config/workhorse-config.toml" \
  ${PROM_LISTEN_ADDR} \
  2>&1

Current behavior

kubectl exec -it gitlab-webservice-default-7c96fb68d4-69bks -- bash

git@gitlab-webservice-default-7c96fb68d4-69bks:/$ curl 127.0.0.1:8080/-/readiness
{"status":"ok","master_check":[{"status":"ok"}]}
git@gitlab-webservice-default-7c96fb68d4-69bks:/$ curl 127.0.0.1:8080/-/liveness
{"status":"ok"}

git@gitlab-webservice-default-7c96fb68d4-69bks:/$ curl [::1]:8080/-/readiness
**A big 404 Notfound HTML page**__

git@gitlab-webservice-default-7c96fb68d4-69bks:/$ curl [::1]:8080/-/liveness
**A big 404 Notfound HTML page**__

Expected behavior

git@gitlab-webservice-default-7c96fb68d4-69bks:/$ curl [::1]:8080/-/readiness
{"status":"ok","master_check":[{"status":"ok"}]}
git@gitlab-webservice-default-7c96fb68d4-69bks:/$ curl [::1]:8080/-/liveness
{"status":"ok"}

Similar behaviour at /-/metrics endpoint.

Does gitlab support IPv6 ONLY deployment?!

Edited by izazahamed-babji