Skip to content

Commit ec8575c

Browse files
committed
Fix livenessprobe to use /tmp, as / is ready-only
Change-Id: I89d82252e972281d8d87b5081ba56e1a0d29b2b1
1 parent ffdc9e5 commit ec8575c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

mysqloperator/controller/innodbcluster/cluster_objects.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -708,20 +708,20 @@ def prepare_initconf(cluster: InnoDBCluster, spec: AbstractServerSetSpec, logger
708708
# still making progress and not just stuck waiting on a frozen networked
709709
# volume, for example.
710710
711-
if [ -f /fail-counter ]; then
712-
fail_count=$(($(cat /fail-counter) + 1))
711+
if [ -f /tmp/fail-counter ]; then
712+
fail_count=$(($(cat /tmp/fail-counter) + 1))
713713
else
714714
fail_count=1
715715
fi
716716
717717
if [ $fail_count -gt $max_failures_during_progress ]; then
718718
# Report success to reset the failure counter upstream and get
719719
# a time extension
720-
rm -f /fail-counter
720+
rm -f /tmp/fail-counter
721721
exit 0
722722
else
723723
# Update the failure counter and fail out
724-
echo $fail_count > /fail-counter
724+
echo $fail_count > /tmp/fail-counter
725725
exit 1
726726
fi
727727
"""

0 commit comments

Comments
 (0)