Run resolv.conf update in nodes not master... 39/46039/1
authorBryan Sullivan <bryan.sullivan@att.com>
Fri, 20 Oct 2017 16:08:12 +0000 (09:08 -0700)
committerBryan Sullivan <bryan.sullivan@att.com>
Fri, 20 Oct 2017 16:08:12 +0000 (09:08 -0700)
JIRA: MODELS-23

Change-Id: I180f752acfe526b9b510f12bb7cc6600259396d5
Signed-off-by: Bryan Sullivan <bryan.sullivan@att.com>
tools/kubernetes/ceph-helm.sh

index 0028423..010a5e8 100644 (file)
@@ -49,12 +49,19 @@ function setup_ceph() {
   kubedns=$(kubectl get service -o json --namespace kube-system kube-dns | \
     jq -r '.spec.clusterIP')
 
+  cat <<EOF | sudo tee -a /etc/resolv.conf
+nameserver $kubedns
+search ceph.svc.cluster.local svc.cluster.local cluster.local 
+EOF
+
   for node in $nodes; do
     echo "${FUNCNAME[0]}: setup resolv.conf for $node"
-    cat <<EOF | sudo tee -a /etc/resolv.conf
+    ssh -x -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no <<EOG
+cat <<EOF | sudo tee -a /etc/resolv.conf
 nameserver $kubedns
 search ceph.svc.cluster.local svc.cluster.local cluster.local 
 EOF
+EOG
     echo "${FUNCNAME[0]}: Zap disk $dev at $node"
     ssh -x -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no \
       ubuntu@$node sudo ceph-disk zap /dev/$dev