From 8ed7ce2db58fa26c2697e6b58d7ebfad502b4f66 Mon Sep 17 00:00:00 2001 From: Paul Bastide Date: Fri, 8 Nov 2024 20:25:00 -0500 Subject: [PATCH] OpenShiftP-237: refactor the empty string check Signed-off-by: Paul Bastide --- ansible/post/files/mount_etcd_ext_volume.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ansible/post/files/mount_etcd_ext_volume.sh b/ansible/post/files/mount_etcd_ext_volume.sh index 9440d75..6b376af 100644 --- a/ansible/post/files/mount_etcd_ext_volume.sh +++ b/ansible/post/files/mount_etcd_ext_volume.sh @@ -66,12 +66,14 @@ echo "etcd migration done successfully." #etcd migration done Verification start i=0; -for count in 0 1 2; do +for count in 0 1 2 +do name=${arr[i+1]} echo "Logging inside Node : ${name}" mount_out=$(oc debug --as-root=true node/$name -- chroot /host grep -w "/var/lib/etcd" /proc/mounts) - echo "Mountpoint : ${mount_out} " - if [[ ${mount_out} = "" ]]; then + echo "Mount Point: ${mount_out} " + if [ -z "${mount_out}" ] + then echo "etcd mount fail for : ${name}" exit 0 fi