You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
echo"Error: Not all nodes are running the same version! Please ensure all nodes are running the same version before using backup-utils."1>&2
56
+
exit 1
57
+
fi
58
+
fi
59
+
44
60
# Options to pass to SSH during connection check
45
61
options="
46
62
-o PasswordAuthentication=no
@@ -59,26 +75,26 @@ set -e
59
75
60
76
if [ $rc-ne 0 ];then
61
77
case$rcin
62
-
255)
63
-
ifecho"$output"| grep -i "port 22: Network is unreachable\|port 22: connection refused\|port 22: no route to host\|ssh_exchange_identification: Connection closed by remote host\|Connection timed out during banner exchange\|port 22: Connection timed out">/dev/null;then
64
-
exec"$(basename $0)""$hostname:122"
65
-
fi
66
-
78
+
255)
79
+
ifecho"$output"| grep -i "port 22: Network is unreachable\|port 22: connection refused\|port 22: no route to host\|ssh_exchange_identification: Connection closed by remote host\|Connection timed out during banner exchange\|port 22: Connection timed out">/dev/null;then
80
+
exec"$(basename $0)""$hostname:122"
81
+
fi
82
+
83
+
echo"$output"1>&2
84
+
echo"Error: ssh connection with '$host' failed"1>&2
85
+
echo"Note that your SSH key needs to be setup on $host as described in:"1>&2
begin_test "ghe-restore cluster with different node versions should fail at ghe-host-check"
602
+
(
603
+
set -e
604
+
rm -rf "$GHE_REMOTE_ROOT_DIR"
605
+
setup_moreutils_parallel
606
+
setup_remote_metadata
607
+
setup_remote_cluster
608
+
echo"cluster">"$GHE_DATA_DIR/current/strategy"
609
+
610
+
# set that versions should not match for this test
611
+
DIFFERENT_VERSIONS=1
612
+
export DIFFERENT_VERSIONS
613
+
614
+
# set as configured, enable maintenance mode and create required directories
615
+
setup_maintenance_mode "configured"
616
+
617
+
# set restore host environ var
618
+
GHE_RESTORE_HOST=127.0.0.1
619
+
export GHE_RESTORE_HOST
620
+
621
+
! output=$(ghe-restore -v -f 2>&1)
622
+
623
+
echo"$output"| grep -q "Error: Not all nodes are running the same version! Please ensure all nodes are running the same version before using backup-utils."
624
+
)
625
+
end_test
626
+
601
627
begin_test "ghe-restore missing directories or files from source snapshot displays warning"
602
628
(
603
629
# Tests the scenario where something exists in the database, but not on disk.
0 commit comments