-
Notifications
You must be signed in to change notification settings - Fork 137
Open
Description
Due to this pull request moby/moby#35441, now requests to volume plugin may be canceled by client, but sdk here doesn't provide a context for that, which is very risky.
For example, if the timeout duration set by a plugin (e.g. 300s) is longer than that of the daemon (i.e. 60s or 120s depending on request type), and in fact a mount request would cost ~200s, then the plugin may create a mount point successfully while the daemon will regard it as timeout. In that case, an unexpected mount point will be created and become out of control.
Related code:
- fixed timeout set in the daemon:
moby/moby@b15f8d2#diff-c67d588225dded3cafa5ef6cc304c7ad8cd5e2fcda17eb7842d1f8baf3f36934 - sdk here doesn't decode request's context:
https://github.com/docker/go-plugins-helpers/blob/master/sdk/encoder.go#L14-L19
My opinion:
- If the fixed timeout set by the daemon is necessary, then the server (plugin) needs to be aware of that
- It would be better to make timeout in the daemon configurable, and it will resolve this issue Volume plugin Mount operation timeout limited by
plugin enable--timeoutoption moby/moby#37426
Metadata
Metadata
Assignees
Labels
No labels