Docker: Can't remove macvlan configuration network

Viewed 2506

Using portainer, I created a macvlan configuration network. Now, I want to remove this network. However, for some reason, I can't. I do receive the following error msg: Error response from daemon: error while removing network: configuration network "my_macvlan_config" is in use. The weird thing is that I don't think that the network is in use. There is no container attached to it. When inspecting the network, I get the following results:

~$ sudo docker network inspect my_macvlan_config
[
    {
        "Name": "my_macvlan_config",
        "Id": "5d95270684516484632c4505e15ba8253bbe8d780b2c41a84a07fbbe09d7a9b6",
        "Created": "2020-05-18T20:59:03.472260896+02:00",
        "Scope": "local",
        "Driver": "null",
        "EnableIPv6": false,
        "IPAM": {
            "Driver": "default",
            "Options": null,
            "Config": [
                {
                    "Subnet": "192.168.13.0/24",
                    "IPRange": "192.168.13.200/29",
                    "Gateway": "192.168.13.1"
                }
            ]
        },
        "Internal": false,
        "Attachable": false,
        "Ingress": false,
        "ConfigFrom": {
            "Network": ""
        },
        "ConfigOnly": true,
        "Containers": {},
        "Options": {
            "parent": "eth0"
        },
        "Labels": {}
    }
]

Docker itself is running on my Synology Diskstation, fwiw.

EDIT: There's another network called macvlan that is connected to my_macvlan_config.

~$ sudo docker network inspect macvlan
[
    {
        "Name": "macvlan",
        "Id": "8a831afa776475b01ca240f4b6b2434c820b8a03910b402760e3cd988e7ddb5c",
        "Created": "2020-05-23T23:11:17.738229138+02:00",
        "Scope": "local",
        "Driver": "macvlan",
        "EnableIPv6": false,
        "IPAM": {
            "Driver": "default",
            "Options": null,
            "Config": [
                {
                    "Subnet": "192.168.13.0/24",
                    "IPRange": "192.168.13.210/29",
                    "Gateway": "192.168.13.1"
                }
            ]
        },
        "Internal": false,
        "Attachable": false,
        "Ingress": false,
        "ConfigFrom": {
            "Network": "macvlan_config"
        },
        "ConfigOnly": false,
        "Containers": {
            "6f025749fe99a22fa3729bebfa72d6329b363fe8f6589d9147d0d58a9934dd42": {
                "Name": "tvheadend",
                "EndpointID": "bc827cb2fddc4374fde7634534efd0c8c110af5a70aa9b16a319b770dfe7a0f2",
                "MacAddress": "02:42:c0:a8:0d:d3",
                "IPv4Address": "192.168.13.211/24",
                "IPv6Address": ""
            }
        },
        "Options": {
            "parent": "eth0"
        },
        "Labels": {}
    }
]

And there's one more network, which is apparently unrelated.

~$ sudo docker network inspect macvlan_config
[
    {
        "Name": "macvlan_config",
        "Id": "644a15c6b9e653ec3f48c4a2e290f996b41361170d5ab63053b87a301168345f",
        "Created": "2020-05-23T23:10:54.880348491+02:00",
        "Scope": "local",
        "Driver": "null",
        "EnableIPv6": false,
        "IPAM": {
            "Driver": "default",
            "Options": null,
            "Config": [
                {
                    "Subnet": "192.168.13.0/24",
                    "IPRange": "192.168.13.210/29",
                    "Gateway": "192.168.13.1"
                }
            ]
        },
        "Internal": false,
        "Attachable": false,
        "Ingress": false,
        "ConfigFrom": {
            "Network": ""
        },
        "ConfigOnly": true,
        "Containers": {},
        "Options": {
            "parent": "eth0"
        },
        "Labels": {}
    }
]

I then removed the tvheadend container. I was then able to delete all networks but my_macvlan_config.

0 Answers
Related