-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Should plugin DEL ever error? #309
Comments
@rosenhouse I agree. Two points in random order:
|
We could have |
Though we could just do this now by making the internal plugins do best-effort cleanup, without changing the spec... not sure if we'd consider that a material spec change or not. |
The phrasing "tries to clean-up any & all left-over resources" - is that meant to mean "... relating to the specific container ID supplied", or more broadly, clean up anything that seems to be left-over? The latter sounds dangerous. I think I'm ok with best-efforts meaning "I looked for resources assigned to that container ID; didn't find anything; returning success"; I would still like to error on a completely invalid parameter. |
@bboreham yes, I would expect that the operation would still be scoped to the specific container ID. |
+1 of adding this as a spec requirement, and we could still keep the error return of |
+1 on making this a spec requirement. It's very hard for container runtime to react if cleanup fails. It has no idea if it should proceed with the rest of the cleanup or not. |
The spec was changed in #346 to say "Plugins should generally complete a DEL action without error even if some resources are missing [...] even if the container network namespace no longer exists" So I think this should be closed. |
Agreed. Though there is still some outstanding work to make the plugins actually behave this way. |
FYI Kubernetes 1.6 beta seems to rely on plugins not erroring on DEL - see weaveworks/weave#2801 (comment) |
Issue #306 raises an interesting question that applies generally to all plugins: how should runtimes react if an
ADD
fails?One possibility is for
DEL
to be best-effort idempotent. It tries to clean-up any & all left-over resources and swallows any errors that might arise if a resource was never created in the first-place.Then we could recommend that a runtime call
DEL
after a failedADD
.The text was updated successfully, but these errors were encountered: