Open govint opened 6 years ago
Will post the change to provide volume status in the Get() response. Its impossible for the plugin to trigger migrating a container off a host if the volume isn't accessible. Neither does CSI support it (could do post 1.0). The container orchestrator Docker should include volume online/offline status in the default volume Get() response and be able to handle access issues with the volume.
Once the plugin has attached a volume (on request by Docker/K8s) the plugin doesn't play a role any longer till that volume is unmounted (on request by Docker/K8s). In the meantime, its entirely possible that when the container (read user app) is using the volume, the volume becomes unavailable for any specific reason (file server disconnects/exits - for example).
There is no definition or approach today of how the application that has lost access to its data can handle such an event. The application in the container has no recourse except to exit. Whats worse, the application may be logging to a persistent volume and that volume itself becomes inaccessible, preventing the app from being able to log even the occurrence of the event. Which will require the user/developer to figure out what happened later once the volume is accessible.
From a storage standpoint the volume plugin can do a bit to restore access to the volume in cases to the extent possible. Propose the below changes:
The above is about what the plugin can do to at least try and restore access to the volume and the application is able to continue running.