Replace resolv.conf, not append 67/46067/1
authorBryan Sullivan <bryan.sullivan@att.com>
Fri, 20 Oct 2017 19:23:19 +0000 (12:23 -0700)
committerBryan Sullivan <bryan.sullivan@att.com>
Fri, 20 Oct 2017 19:23:19 +0000 (12:23 -0700)
JIRA: MODELS-23

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

index 010a5e8..d781936 100644 (file)
@@ -38,7 +38,7 @@ function setup_ceph() {
   dev=$4
   # per https://github.com/att/netarbiter/tree/master/sds/ceph-docker/examples/helm
   echo "${FUNCNAME[0]}: Clone netarbiter"
-  git clone https://github.com/blsaws/netarbiter.git
+  git clone https://github.com/att/netarbiter.git
   
   echo "${FUNCNAME[0]}: Create a .kube/config secret so that a K8s job could run kubectl inside the container"
   cd netarbiter/sds/ceph-docker/examples/helm
@@ -49,17 +49,20 @@ 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
+  cat <<EOF | sudo tee /etc/resolv.conf
 nameserver $kubedns
-search ceph.svc.cluster.local svc.cluster.local cluster.local 
+search ceph.svc.cluster.local svc.cluster.local cluster.local
+options ndots:5
 EOF
 
   for node in $nodes; do
     echo "${FUNCNAME[0]}: setup resolv.conf for $node"
-    ssh -x -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no <<EOG
+    ssh -x -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no \
+      ubuntu@$node <<EOG
 cat <<EOF | sudo tee -a /etc/resolv.conf
 nameserver $kubedns
 search ceph.svc.cluster.local svc.cluster.local cluster.local 
+options ndots:5
 EOF
 EOG
     echo "${FUNCNAME[0]}: Zap disk $dev at $node"