This repository was archived by the owner on Sep 13, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +16
-8
lines changed Expand file tree Collapse file tree 1 file changed +16
-8
lines changed Original file line number Diff line number Diff line change @@ -59,15 +59,23 @@ spec:
59
59
60
60
mkdir -p /root/.quobyte ${QUOBYTE_MOUNT_POINT}
61
61
62
- # set the mount point immutable. As long as mount.quobyte does not run,
63
- # other processes cannot write data to this dir.
64
- chattr +i ${QUOBYTE_MOUNT_POINT} || \
65
- echo "WARNING: The local filesystem does not support IMMUTABLE flag"
62
+ if find "$QUOBYTE_MOUNT_POINT" -mindepth 1 -print -quit 2>/dev/null | grep -q .; then
63
+ echo "POLLUTED MOUNT POINT DETECTED! Cannot use $QUOBYTE_MOUNT_POINT as a mount point."
64
+ echo "Please remove all files and directories from $QUOBYTE_MOUNT_POINT and "
65
+ echo "run 'chattr +i $QUOBYTE_MOUNT_POINT' to prevent future mount point pollution."
66
+ else
67
+ # set the mount point immutable. As long as mount.quobyte does not run,
68
+ # other processes cannot write data to this dir.
69
+ chattr +i ${QUOBYTE_MOUNT_POINT} || \
70
+ echo "WARNING: The local filesystem does not support IMMUTABLE flag. Mount point pollution is possible."
71
+
72
+ /usr/bin/mount.quobyte --hostname ${NODENAME} \
73
+ --allow-usermapping-in-volumename --http-port 55000 -f \
74
+ -d ${QUOBYTE_CLIENT_LOG_LEVEL} -l /dev/stdout ${OPTS} \
75
+ ${QUOBYTE_REGISTRY}/ ${QUOBYTE_MOUNT_POINT}
76
+ fi
77
+
66
78
67
- /usr/bin/mount.quobyte --hostname ${NODENAME} \
68
- --allow-usermapping-in-volumename --http-port 55000 -f \
69
- -d ${QUOBYTE_CLIENT_LOG_LEVEL} -l /dev/stdout ${OPTS} \
70
- ${QUOBYTE_REGISTRY}/ ${QUOBYTE_MOUNT_POINT}
71
79
securityContext :
72
80
privileged : true
73
81
volumeMounts :
You can’t perform that action at this time.
0 commit comments