Make disk mapping store resilient to reboots
Since !11 (merged), the driver tracks what disks are attached to the current node, using some local files and symlinks.
This could be problematic in the face of node reboots:
- in case of a non-containerised kubelet, the files from the previous run are still there (they are stored in
/var/lib/ghost
). If the same disks are still attached that is OK, but if the node was started with less or no ghost disks attached right from boot, the driver will wrongly think that its disks are attached, while they are not. - In case of a containerised kubelet, the files from the previous run are no longer there. This sounds less dangerous, as ghost will simply start from a blank slate. However, if disks are already attached from boot and ghost doesn't know about that, it might try to attach those disks again, which would probably fail.
On possibility is to store the mapping files on ephemeral storage, so they do not survive a reboot even on non-containerised kubelet, and then make sure that the driver can deal with the situation that a disk that it is asked to attach was in fact already present from boot.