summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryan Sullivan <bryan.sullivan@att.com>2017-11-02 12:23:20 -0700
committerBryan Sullivan <bryan.sullivan@att.com>2017-11-02 12:23:20 -0700
commitcdfa3e4e0aed5215db73877882f46a60646ffb31 (patch)
tree2a8d3635955d9543a0eea3f3908099bb819fcc80
parent1e08a0ab3f52a183b9d77a2b7f938d1dc8b8fe23 (diff)
Backout changes breaking ceph setup.
JIRA: MODELS-23 Change-Id: I8ad85be4f8e06edf768b6695ae349a32cea31578 Signed-off-by: Bryan Sullivan <bryan.sullivan@att.com>
-rw-r--r--tools/kubernetes/ceph-baremetal.sh7
-rw-r--r--tools/kubernetes/ceph-helm.sh9
2 files changed, 8 insertions, 8 deletions
diff --git a/tools/kubernetes/ceph-baremetal.sh b/tools/kubernetes/ceph-baremetal.sh
index e1feee7..06a6926 100644
--- a/tools/kubernetes/ceph-baremetal.sh
+++ b/tools/kubernetes/ceph-baremetal.sh
@@ -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
diff --git a/tools/kubernetes/ceph-helm.sh b/tools/kubernetes/ceph-helm.sh
index 280c045..e9a926b 100644
--- a/tools/kubernetes/ceph-helm.sh
+++ b/tools/kubernetes/ceph-helm.sh
@@ -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}")