Skip to content

plugin rm is not prevented with an active network #29447

@mavenugo

Description

@mavenugo

Description

I installed a network plugin using the new plugin-v2 format and created a docker network with that plugin. When I tried to remove the plugin with the existing active network, it is not prevented with "is in use" error.

Steps to reproduce the issue:

$ sudo docker plugin install tiborvass/test-docker-netplugin
Plugin "tiborvass/test-docker-netplugin" is requesting the following privileges:
 - network: [host]
Do you grant the above permissions? [y/N] y
tiborvass/test-docker-netplugin

$ sudo docker plugin ls
ID                  NAME                              TAG                 DESCRIPTION                      ENABLED
516ae544b30e        tiborvass/test-docker-netplugin   latest              Test network plugin for Docker   true

$ sudo docker network create -d tiborvass/test-docker-netplugin:latest testnet
0872995221e6306d1f3a344ed59b221bf1c5e2b2e52592297048e36c6857701e
$ sudo docker network ls
NETWORK ID          NAME                DRIVER                                   SCOPE
84b387291afd        bridge              bridge                                   local
31a647648f49        docker_gwbridge     bridge                                   local
c332d4446d8c        host                host                                     local
r8lj8ptzb30c        ingress             overlay                                  swarm
f496c37f1c45        none                null                                     local
0872995221e6        testnet             tiborvass/test-docker-netplugin:latest   local

$ sudo docker plugin disable tiborvass/test-docker-netplugin:latest
tiborvass/test-docker-netplugin:latest

$ sudo docker plugin rm tiborvass/test-docker-netplugin:latest
tiborvass/test-docker-netplugin:latest

Describe the results you expected:

docker plugin rm must error out with "is in use" error when an active network is still using the plugin.

Output of docker version:

$ sudo docker version
Client:
 Version:      1.14.0-dev
 API version:  1.26
 Go version:   go1.7.3
 Git commit:   b7fe613
 Built:        Thu Dec  8 10:32:15 2016
 OS/Arch:      linux/amd64

Server:
 Version:      1.14.0-dev
 API version:  1.26 (minimum version 1.12)
 Go version:   go1.7.4
 Git commit:   5665c73-unsupported
 Built:        Tue Dec 13 21:38:49 2016
 OS/Arch:      linux/amd64
 Experimental: false

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions