@@ -91,22 +91,25 @@ if ghe-ssh "$host" -- \
91
91
CLUSTER=true
92
92
fi
93
93
94
+ set +e
94
95
# ensure all nodes in the cluster are online/reachable and running the same version
95
96
if " $CLUSTER " ; then
96
97
online_status=$( ghe-ssh " $host " ghe-cluster-host-check)
97
98
if [ " $online_status " != " Cluster is ready to configure." ]; then
98
- echo " Error: Not all nodes are online! Please ensure cluster is in a healthy state before using backup-utils." 1>&2
99
+ echo " $online_status " 1>&2
100
+ log_error " Error: Not all nodes are online! Please ensure cluster is in a healthy state before using backup-utils." 1>&2
99
101
exit 1
100
102
fi
101
103
102
104
node_version_list=$( ghe-ssh " $host " ghe-cluster-each -- ghe-version)
103
105
distinct_versions=$( echo " $node_version_list " | awk ' {split($0, a, ":"); print a[2]}' | awk ' {print $4}' | uniq | wc -l)
104
106
if [ " $distinct_versions " -ne 1 ]; then
105
107
echo " Version mismatch: $node_version_list " 1>&2
106
- 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
108
+ log_error " Error: Not all nodes are running the same version! Please ensure all nodes are running the same version before using backup-utils." 1>&2
107
109
exit 1
108
110
fi
109
111
fi
112
+ set -e
110
113
111
114
version=$( echo " $output " | grep " GitHub Enterprise" | awk ' {print $NF}' )
112
115
@@ -177,7 +180,7 @@ SKIP_MSG
177
180
178
181
# Display dir requirements for repositories and mysql
179
182
echo -e " \nChecking host for sufficient space for a backup..."
180
- available_space=$( df -B 1k $GHE_DATA_DIR | awk ' END{printf "%.0f", $4 * 1024}' )
183
+ available_space=$( df -B 1k $GHE_DATA_DIR | awk ' END{printf "%.0f", $4 * 1024}' )
181
184
echo " We recommend allocating at least 5x the amount of storage allocated to the primary GitHub appliance for historical snapshots and growth over time."
182
185
183
186
repos_disk_size=$( transfer_size repositories /tmp)
0 commit comments