-
Notifications
You must be signed in to change notification settings - Fork 108
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
driver: handle non existing volumes and nodes
According to the spec we should return a `NOT_FOUND` in various method. We always assume the volume or node exist, however this might not the case. For example the user might delete the volume externally from the UI or make a HTTP call to the DigitalOcean API to delete the volume. Actions like this are outside the Kubernetes system, so the plugin needs to handle these edge cases by signaling back that the resources don't exist. We return `NOT_FOUND` for any creation actions, such as creating a volume, attaching a volume, formatting, etc.. Because we really need to return an error as there is no way to recover from this We don't return `NOT_FOUND` for any destroy actions, such as deleting, detaching, unmounting, etc.. Because in all these cases it doesn't matter if the volume doesn't exist. There is not much to do and assuming it's "done" makes the overall system more stable
- Loading branch information
Showing
3 changed files
with
66 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.