gluster / gluster-subvol

Subdirectories of Gluster volumes as PVs in Kubernetes and OpenShift
Apache License 2.0
11 stars 6 forks source link

Improve safety of recycler #5

Closed JohnStrunk closed 6 years ago

JohnStrunk commented 6 years ago

Currently, the recycler has cluster IP and volume name passed in as arguments, and these must match the PV/PVC to which it gets attached. If an admin misconfigures this, there is a possibility of either data loss (wrong directory being wiped) or data leakage (failing to wipe the directory).

volcreator could be enhanced to annotate the root directory with the cluster IP and volume name such that we avoid having to pass it to the recycler. On startup, the recycler could read these parameters and use them when looking up the PVs.

This would reduce the amount of configuration as well as improve safety.

JohnStrunk commented 6 years ago

Decided to create a UUID in the supervol root and add that as a label to each subvol PV. Fixed via dc1f4628b8209d812a5aec60e4297b2241f6df06