Skip to content

Block network removal with existing task-attachment (via --attachable) #1692

@mavenugo

Description

@mavenugo

swarmkit prevents any attempt to remove a network with an attached service. We should also provide a similar functionality for attached tasks.

madhu@Ubuntu-vm docker (npv2) $ sudo docker network create -d overlay --attachable  mhnet
8lp3i90vvdoydz4rj1qttqtya

madhu@Ubuntu-vm docker (npv2) $ sudo docker network ls
NETWORK ID          NAME                DRIVER              SCOPE
9856e7dac0b7        bridge              bridge              local
90775a09f418        docker_gwbridge     bridge              local
2fdd8797dd07        host                host                local
6jfzejzselnv        ingress             overlay             swarm
8lp3i90vvdoy        mhnet               overlay             swarm
908854bcd94f        none                null                local

madhu@Ubuntu-vm docker (npv2) $ sudo docker run --net=mhnet --net-alias=c1 --name=cont -itd busybox sh
b8e69ade126b7d448281bc6e8cc2dc1a6c929c49d9ad12578075d007300c111a

madhu@Ubuntu-vm docker (npv2) $ sudo docker network rm mhnet
mhnet

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions