Commit 63e408ff authored by Arie Peterson's avatar Arie Peterson 🐚
Browse files

Move comment on mount point storage

parent 43442bb6
......@@ -207,13 +207,6 @@ ensureFileSystem() {
fi
}
# When Kubernetes wants us to unmount and detach a volume, it only passes us
# the path to the mount point. The mount point luckily does contain the PV name.
# To make it possible to reliably detach disks also in the case of failures, we
# store the mapping from mount point to cosmos disk ID when mounting. When
# unmounting, we can look up that mapping to learn the cosmos ID of the disk we
# need to detach.
# Extract the PV ID from the given mount point.
# Returns the PV ID in variable $pvID.
extractPV() {
......@@ -229,6 +222,13 @@ extractPV() {
}
# Create a symlink mapping from the given PV ID to the given cosmos ID.
#
# Background on why we need this: when Kubernetes wants us to unmount and
# detach a volume, it only passes us the path to the mount point. The mount
# point luckily does contain the PV name. To make it possible to reliably
# detach disks also in the case of failures, we store the mapping from mount
# point to cosmos disk ID when mounting. When unmounting, we can look up that
# mapping to learn the cosmos ID of the disk we need to detach.
storeMapping() {
local pvID=$1
local cosmosID=$2
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment