Skip to content

Commit 0bb4704

Browse files
committed
review updates
1 parent 970cb37 commit 0bb4704

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

backup.config-example

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ GHE_NUM_SNAPSHOTS=10
3232
# disk space validation and software version checks on the backup-host will be disabled.
3333
#GHE_SKIP_CHECKS=false
3434

35+
# Cluster filesystem to check if it's writable as part of ghe-host-check
36+
# By default it is /data/user/tmp but can be updated if needed
37+
#GHE_FILE_SYSTEM_CHECK="/data/user/tmp"
38+
3539
# The hostname of the GitHub appliance to restore. If you've set up a separate
3640
# GitHub appliance to act as a standby for recovery, specify its IP or hostname
3741
# here. The host to restore to may also be specified directly when running

bin/ghe-host-check

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -120,23 +120,22 @@ fi
120120
NON_WRITABLE=""
121121
# ensure all nodes are writable
122122
if [ "$CLUSTER" == "true" ] ; then
123-
if [ -z "$FILE_TO_TEST" ]; then
123+
if [ -z "$GHE_FILE_SYSTEM_CHECK" ]; then
124124
if [ -d "/data/user/tmp" ]; then
125125
FILE_TO_TEST="/data/user/tmp/test-ro-file.txt"
126126
else
127127
FILE_TO_TEST="/tmp/test-ro-file.txt"
128128
fi
129+
else
130+
FILE_TO_TEST="$GHE_FILE_SYSTEM_CHECK/test-ro-file.txt"
129131
fi
130132

131133
# Iterate through each node in the cluster
132134
nodes=$(ghe-ssh "$host" ghe-cluster-nodes)
133135
first=true
134-
# echo $nodes | while read -r node; do
135136
for node in $nodes; do
136137
if ! echo "set -o pipefail; ssh $node -- 'touch $FILE_TO_TEST && rm $FILE_TO_TEST'" | ghe-ssh "$host" /bin/bash; then
137-
#echo "File system is writable on $node"
138-
#else
139-
echo "File system is not writeable on $node" 1>&2
138+
echo "File system is not writeable or no permission on $node" 1>&2
140139
if [ "$first" = true ]; then
141140
NON_WRITABLE="$node"
142141
first=false
@@ -147,7 +146,7 @@ if [ "$CLUSTER" == "true" ] ; then
147146
done
148147
# Display the comma-separated list of non-writable nodes
149148
if [ ! -z "$NON_WRITABLE" ]; then
150-
echo "Error: Non-writable nodes: $NON_WRITABLE . Please make sure the file systems for all Enterprise nodes are writable." 1>&2
149+
log_error "Error: Following nodes are non-writable - $NON_WRITABLE. Please make sure the filesystem for all GHES nodes are writable." 1>&2
151150
exit 1
152151
else
153152
echo "All nodes are writable."

0 commit comments

Comments
 (0)