summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-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}")