Enforce zero plugin refcount during disable.

When plugins have a positive refcount, they were not allowed to be
removed. However, plugins could still be disabled when volumes
referenced it and containers using them were running.

This change fixes that by enforcing plugin refcount during disable.
A "force" disable option is also added to ignore reference refcounting.

Signed-off-by: Anusha Ragunathan <anusha@docker.com>
This commit is contained in:
Anusha Ragunathan 2016-12-20 08:26:58 -08:00 committed by Tibor Vass
parent 40f445d605
commit e31e2d5bd4
1 changed files with 4 additions and 2 deletions

View File

@ -21,11 +21,13 @@ Usage: docker plugin disable PLUGIN
Disable a plugin
Options:
-f, --force Force the disable of an active plugin
--help Print usage
```
Disables a plugin. The plugin must be installed before it can be disabled,
see [`docker plugin install`](plugin_install.md).
see [`docker plugin install`](plugin_install.md). Without the `-f` option,
a plugin that has references (eg, volumes, networks) cannot be disabled.
The following example shows that the `no-remove` plugin is installed