File tree Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,10 @@ GHE_NUM_SNAPSHOTS=10
32
32
# disk space validation and software version checks on the backup-host will be disabled.
33
33
#GHE_SKIP_CHECKS=false
34
34
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
+
35
39
# The hostname of the GitHub appliance to restore. If you've set up a separate
36
40
# GitHub appliance to act as a standby for recovery, specify its IP or hostname
37
41
# here. The host to restore to may also be specified directly when running
Original file line number Diff line number Diff line change 120
120
NON_WRITABLE=" "
121
121
# ensure all nodes are writable
122
122
if [ " $CLUSTER " == " true" ] ; then
123
- if [ -z " $FILE_TO_TEST " ]; then
123
+ if [ -z " $GHE_FILE_SYSTEM_CHECK " ]; then
124
124
if [ -d " /data/user/tmp" ]; then
125
125
FILE_TO_TEST=" /data/user/tmp/test-ro-file.txt"
126
126
else
127
127
FILE_TO_TEST=" /tmp/test-ro-file.txt"
128
128
fi
129
+ else
130
+ FILE_TO_TEST=" $GHE_FILE_SYSTEM_CHECK /test-ro-file.txt"
129
131
fi
130
132
131
133
# Iterate through each node in the cluster
132
134
nodes=$( ghe-ssh " $host " ghe-cluster-nodes)
133
135
first=true
134
- # echo $nodes | while read -r node; do
135
136
for node in $nodes ; do
136
137
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
140
139
if [ " $first " = true ]; then
141
140
NON_WRITABLE=" $node "
142
141
first=false
@@ -147,7 +146,7 @@ if [ "$CLUSTER" == "true" ] ; then
147
146
done
148
147
# Display the comma-separated list of non-writable nodes
149
148
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
151
150
exit 1
152
151
else
153
152
echo " All nodes are writable."
You can’t perform that action at this time.
0 commit comments