Work around silly limitation of 6 search domains in /etc/resolv.conf.
authorWard Vandewege <ward@jhvc.com>
Tue, 28 Apr 2020 17:36:31 +0000 (13:36 -0400)
committerWard Vandewege <ward@jhvc.com>
Tue, 28 Apr 2020 17:39:20 +0000 (13:39 -0400)
This limitation was removed from the GNU C library release 2.26 in 2017
but Kubernetes still enforces it. Kubernetes uses 3 search domains. This
is no problem on Minikube, but on GKE the other 3 slots are populated by
GCP.

We can actually edit resolv.conf, but only in place, which is why we
fall back on `ed`...

No issue #

Arvados-DCO-1.1-Signed-off-by: Ward Vandewege <ward@jhvc.com>

charts/arvados/templates/slurm-controller-deployment.yaml

index b793c893d4ab3526a0a99011ae955cfd4b5a4ba0..54773fb76c50f25d24bfbec598ede5f3342920cc 100644 (file)
@@ -35,7 +35,7 @@ spec:
           command:
             - "sh"
             - "-c"
-            - "mkdir /munge && cp -p /etc/munge/munge.key /munge && chown munge:munge /munge/munge.key && mkdir /var/slurm && chmod 700 /var/slurm && sudo -u munge munged --key-file=/munge/munge.key && slurmctld -D"
+            - "apt-get -qqy install ed && echo ',s/google.internal/google.internal arvados-slurm-compute.default.svc.cluster.local/g; w' | tr \\; '\\012' | ed -s /etc/resolv.conf && mkdir /munge && cp -p /etc/munge/munge.key /munge && chown munge:munge /munge/munge.key && mkdir /var/slurm && chmod 700 /var/slurm && sudo -u munge munged --key-file=/munge/munge.key && slurmctld -D"
           env:
             - name : ARVADOS_API_HOST
               value: "{{ .Values.externalIP }}:444"