Skip to content

Commit 033d213

Browse files
authored
Merge pull request #672 from github/revert-node-version-check
revert node version check
2 parents d9b1fe1 + b5322b3 commit 033d213

File tree

3 files changed

+1
-56
lines changed

3 files changed

+1
-56
lines changed

bin/ghe-host-check

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -41,22 +41,6 @@ done
4141
# $GHE_HOSTNAME configured in backup.config when not present.
4242
host="${1:-$GHE_HOSTNAME}"
4343

44-
CLUSTER=false
45-
if ghe-ssh "$host" -- \
46-
"[ -f '$GHE_REMOTE_ROOT_DIR/etc/github/cluster' ]"; then
47-
CLUSTER=true
48-
fi
49-
50-
if "$CLUSTER"; then
51-
node_version_list=$(ghe-ssh "$host" ghe-cluster-each -- ghe-version)
52-
echo "$node_version_list" 1>&2
53-
distinct_versions=$(echo "$node_version_list" | awk '{split($0, a, ":"); print a[2]}' | uniq | wc -l)
54-
if [ "$distinct_versions" -ne 1 ]; then
55-
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-
6044
# Options to pass to SSH during connection check
6145
options="
6246
-o PasswordAuthentication=no

test/bin/ghe-cluster-each

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,6 @@ for _ in "$@"; do
1919
esac
2020
done
2121

22-
if [ "$2" == "ghe-version" ]; then
23-
if [ -z "$DIFFERENT_VERSIONS" ]; then
24-
echo "fake-uuid: GitHub Enterprise Server 3.1.0 lxc 2020-12-16 5e97c07602"
25-
echo "fake-uuid1: GitHub Enterprise Server 3.1.0 lxc 2020-12-16 5e97c07602"
26-
echo "fake-uuid2: GitHub Enterprise Server 3.1.0 lxc 2020-12-16 5e97c07602"
27-
else
28-
echo "fake-uuid: GitHub Enterprise Server 3.1.0 lxc 2020-12-16 5e97c07602"
29-
echo "fake-uuid1: GitHub Enterprise Server 3.1.0 lxc 2020-12-16 5e97c07602"
30-
echo "fake-uuid2: GitHub Enterprise Server 2.19 lxc 2020-12-13 5e97c07622"
31-
fi
32-
exit 0
33-
fi
34-
3522
if $SHOW_UUID; then
3623
CONFIG="$GHE_REMOTE_DATA_USER_DIR/common/cluster.conf"
3724

test/test-ghe-restore.sh

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -535,7 +535,7 @@ setup_test_data "$GHE_DATA_DIR/1"
535535
# Make the current symlink
536536
ln -s 1 "$GHE_DATA_DIR/current"
537537

538-
begin_test "ghe-restore cluster with matching node versions"
538+
begin_test "ghe-restore cluster"
539539
(
540540
set -e
541541
rm -rf "$GHE_REMOTE_ROOT_DIR"
@@ -598,32 +598,6 @@ begin_test "ghe-restore cluster with matching node versions"
598598
)
599599
end_test
600600

601-
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-
627601
begin_test "ghe-restore missing directories or files from source snapshot displays warning"
628602
(
629603
# Tests the scenario where something exists in the database, but not on disk.

0 commit comments

Comments
 (0)