Backout changes breaking ceph setup. 91/46591/1
authorBryan Sullivan <bryan.sullivan@att.com>
Thu, 2 Nov 2017 19:23:20 +0000 (12:23 -0700)
committerBryan Sullivan <bryan.sullivan@att.com>
Thu, 2 Nov 2017 19:23:20 +0000 (12:23 -0700)
JIRA: MODELS-23

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

index e1feee7..06a6926 100644 (file)
@@ -51,7 +51,10 @@ function setup_ceph() {
   # Note this loop may be partially redundant with the ceph-deploy steps below
   for node_ip in $all_nodes; do
     log "Install ntp and ceph on $node_ip"
-    ssh -x -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no ubuntu@$node_ip <<EOF
+               # TODO: fix this workaround
+               # Don't use ssh option UserKnownHostsFile=/dev/null as the hash needs to be 
+               # cached at this point, otherwise ceph-deploy and ssh steps will fail
+    ssh -x -o StrictHostKeyChecking=no ubuntu@$node_ip <<EOF
 sudo timedatectl set-ntp no
 wget -q -O- 'https://download.ceph.com/keys/release.asc' | sudo apt-key add -
 echo deb https://download.ceph.com/debian/ $(lsb_release -sc) main | sudo tee /etc/apt/sources.list.d/ceph.list
@@ -87,7 +90,7 @@ EOF
       log "Prepare ceph OSD on node $node_ip"
       echo "$node_ip ceph-osd$n" | sudo tee -a /etc/hosts
       # Using ceph-osd$n here avoids need for manual acceptance of the new server hash
-      ssh -x -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no ubuntu@ceph-osd$n <<EOF
+      ssh -x -o StrictHostKeyChecking=no ubuntu@ceph-osd$n <<EOF
 echo "$node_ip ceph-osd$n" | sudo tee -a /etc/hosts
 sudo mkdir /ceph && sudo chown -R ceph:ceph /ceph
 EOF
index 280c045..e9a926b 100644 (file)
@@ -93,8 +93,7 @@ EOF
 
   for node in $nodes; do
     log "install ceph, setup resolv.conf, zap disk for $node"
-    ssh -x -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no \
-      ubuntu@$node <<EOG
+    ssh -x -o StrictHostKeyChecking=no ubuntu@$node <<EOG
 cat <<EOF | sudo tee /etc/resolv.conf
 nameserver $kubedns
 search ceph.svc.cluster.local svc.cluster.local cluster.local
@@ -104,14 +103,12 @@ sudo apt install -y ceph ceph-common
 sudo ceph-disk zap /dev/$dev
 EOG
     log "Run ceph-osd at $node"
-    name=$(ssh -x -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no \
-      ubuntu@$node hostname)
+    name=$(ssh -x -o StrictHostKeyChecking=no ubuntu@$node hostname)
     ./helm-install-ceph-osd.sh $name /dev/$dev
   done
 
   for node in $nodes; do
-    name=$(ssh -x -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no \
-      ubuntu@$node hostname)
+    name=$(ssh -x -o StrictHostKeyChecking=no ubuntu@$node hostname)
     pod=$(kubectl get pods --namespace ceph | awk "/$name/{print \$1}")
     log "verify ceph-osd is Running at node $name"
     status=$(kubectl get pods --namespace ceph $pod | awk "/$pod/ {print \$3}")