Skip to content

Commit 61fe071

Browse files
committed
Added notes regarding symlinked directories; updated deployment script to ensure atomicity of driver replacement
1 parent 2fbb4a8 commit 61fe071

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

contributors/design-proposals/flexvolume-deployment.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ Iterating through the list of plugins inside `InitPlugins()` from `volume/plugin
3232

3333
Because Flexvolume has two separate plugin instantiations (attachable and non-attachable), it's worth considering the case when a driver that implements attach/detach is replaced with a driver that does not, or vice versa. This does not cause an issue because plugins are recreated every time the driver directory is changed.
3434

35-
There is a possibility that a Flexvolume command execution occurs at the same time as the DaemonSet updates the driver, which leads to a bad execution. This cannot be solved within the Kubernetes system without an overhaul. Instead, this is discussed in [Atomic Driver Installation](#atomic-driver-installation) as part of the deployment mechanism. As part of the solution, the Prober will ignore all files that begins with "." in the driver directory.
35+
There is a possibility that a Flexvolume command execution occurs at the same time as the DaemonSet updates the driver, which leads to a bad execution. This cannot be solved within the Kubernetes system without an overhaul. Instead, this is discussed in [Atomic Driver Installation](#atomic-driver-installation) as part of the deployment mechanism. As part of the solution, the Prober will **ignore all files that begins with "."** in the driver directory.
36+
37+
Word of caution about symlinks in the Flexvolume plugin directory: as a result of the recursive filesystem watch implementation, if a symlink links to a directory, unless the directory is visible to the prober (i.e. it's inside the Flexvolume plugin directory and does not start with '.'), the directory's files and subdirectories are not added to filesystem watch, thus their change will not trigger a probe.
3638

3739

3840
## **Alternative Designs**
@@ -102,6 +104,8 @@ set -o pipefail
102104
VENDOR=k8s.io
103105
DRIVER=nfs
104106

107+
# Assuming the single driver file is located at /$DRIVER inside the DaemonSet image.
108+
105109
driver_dir=$VENDOR${VENDOR:+"~"}${DRIVER}
106110
if [ ! -d "/flexmnt/$driver_dir" ]; then
107111
mkdir "/flexmnt/$driver_dir"

0 commit comments

Comments
 (0)