{"action":"created","issue":{"url":"https://api.github.com/repos/docker/libnetwork/issues/779","repository_url":"https://api.github.com/repos/docker/libnetwork","labels_url":"https://api.github.com/repos/docker/libnetwork/issues/779/labels{/name}","comments_url":"https://api.github.com/repos/docker/libnetwork/issues/779/comments","events_url":"https://api.github.com/repos/docker/libnetwork/issues/779/events","html_url":"https://github.com/docker/libnetwork/issues/779","id":119093650,"number":779,"title":"Unable to create docker0 if VPN is active","user":{"login":"Manouchehri","id":7232674,"avatar_url":"https://avatars.githubusercontent.com/u/7232674?v=3","gravatar_id":"","url":"https://api.github.com/users/Manouchehri","html_url":"https://github.com/Manouchehri","followers_url":"https://api.github.com/users/Manouchehri/followers","following_url":"https://api.github.com/users/Manouchehri/following{/other_user}","gists_url":"https://api.github.com/users/Manouchehri/gists{/gist_id}","starred_url":"https://api.github.com/users/Manouchehri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Manouchehri/subscriptions","organizations_url":"https://api.github.com/users/Manouchehri/orgs","repos_url":"https://api.github.com/users/Manouchehri/repos","events_url":"https://api.github.com/users/Manouchehri/events{/privacy}","received_events_url":"https://api.github.com/users/Manouchehri/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-11-26T19:17:52Z","updated_at":"2016-02-21T07:56:41Z","closed_at":null,"body":"```\r\n~ > ip route\r\n0.0.0.0/1 via 10.8.0.5 dev tun0 \r\ndefault via 192.168.1.1 dev wlp3s0  proto dhcp  src 192.168.1.191  metric 10 \r\ndefault via 192.168.1.1 dev enp2s0  proto dhcp  src 192.168.1.181  metric 20 \r\n10.8.0.1 via 10.8.0.5 dev tun0 \r\n10.8.0.5 dev tun0  proto kernel  scope link  src 10.8.0.6 \r\n23.196.166.175 via 192.168.1.1 dev wlp3s0 \r\n128.0.0.0/1 via 10.8.0.5 dev tun0 \r\n192.168.1.0/24 dev enp2s0  proto kernel  scope link  src 192.168.1.181 \r\n192.168.1.0/24 dev wlp3s0  proto kernel  scope link  src 192.168.1.191 \r\n192.168.1.1 dev wlp3s0  proto dhcp  scope link  src 192.168.1.191  metric 10 \r\n192.168.1.1 dev enp2s0  proto dhcp  scope link  src 192.168.1.181  metric 20 \r\n~ > sudo docker -d\r\nWarning: '-d' is deprecated, it will be removed soon. See usage.\r\nWARN[0000] please use 'docker daemon' instead.          \r\nINFO[0000] API listen on /var/run/docker.sock           \r\nINFO[0000] [graphdriver] using prior storage driver \"btrfs\" \r\nINFO[0000] Firewalld running: false                     \r\nFATA[0000] Error starting daemon: Error initializing network controller: Error creating default \"bridge\" network: failed to parse pool request for address space \"LocalDefault\" pool \"\" subpool \"\": could not find an available predefined network \r\n```\r\n\r\nIf I stop my VPN, then I'm able to create the interface.\r\n\r\n```\r\n~ > sudo systemctl stop openvpn@primary.service\r\n~ > ip route\r\ndefault via 192.168.1.1 dev wlp3s0  proto dhcp  src 192.168.1.191  metric 10 \r\ndefault via 192.168.1.1 dev enp2s0  proto dhcp  src 192.168.1.181  metric 20 \r\n23.196.166.175 via 192.168.1.1 dev wlp3s0 \r\n192.168.1.0/24 dev enp2s0  proto kernel  scope link  src 192.168.1.181 \r\n192.168.1.0/24 dev wlp3s0  proto kernel  scope link  src 192.168.1.191 \r\n192.168.1.1 dev wlp3s0  proto dhcp  scope link  src 192.168.1.191  metric 10 \r\n192.168.1.1 dev enp2s0  proto dhcp  scope link  src 192.168.1.181  metric 20 \r\n~ > sudo docker -d\r\nWarning: '-d' is deprecated, it will be removed soon. See usage.\r\nWARN[0000] please use 'docker daemon' instead.          \r\nINFO[0000] API listen on /var/run/docker.sock           \r\nINFO[0000] [graphdriver] using prior storage driver \"btrfs\" \r\nINFO[0000] Firewalld running: false                     \r\nINFO[0000] Default bridge (docker0) is assigned with an IP address 172.17.0.0/16. Daemon option --bip can be used to set a preferred IP address \r\nINFO[0000] Loading containers: start.                   \r\n\r\nINFO[0000] Loading containers: done.                    \r\nINFO[0000] Daemon has completed initialization          \r\nINFO[0000] Docker daemon                                 commit=a34a1d5-dirty execdriver=native-0.2 graphdriver=btrfs version=1.9.1\r\n^CINFO[0003] Processing signal 'interrupt'  \r\n```\r\n\r\nAfter the interface is created, then there's no issues with starting the daemon while my VPN is active.\r\n\r\n```\r\n~ > sudo systemctl start openvpn@primary.service\r\n~ > ip route\r\n0.0.0.0/1 via 10.8.0.5 dev tun0 \r\ndefault via 192.168.1.1 dev wlp3s0  proto dhcp  src 192.168.1.191  metric 10 \r\ndefault via 192.168.1.1 dev enp2s0  proto dhcp  src 192.168.1.181  metric 20 \r\n10.8.0.1 via 10.8.0.5 dev tun0 \r\n10.8.0.5 dev tun0  proto kernel  scope link  src 10.8.0.6 \r\n23.196.166.175 via 192.168.1.1 dev wlp3s0 \r\n128.0.0.0/1 via 10.8.0.5 dev tun0 \r\n172.17.0.0/16 dev docker0  proto kernel  scope link  src 172.17.0.1 \r\n192.168.1.0/24 dev enp2s0  proto kernel  scope link  src 192.168.1.181 \r\n192.168.1.0/24 dev wlp3s0  proto kernel  scope link  src 192.168.1.191 \r\n192.168.1.1 dev wlp3s0  proto dhcp  scope link  src 192.168.1.191  metric 10 \r\n192.168.1.1 dev enp2s0  proto dhcp  scope link  src 192.168.1.181  metric 20 \r\n~ > sudo docker -d\r\nWarning: '-d' is deprecated, it will be removed soon. See usage.\r\nWARN[0000] please use 'docker daemon' instead.          \r\nINFO[0000] API listen on /var/run/docker.sock           \r\nINFO[0000] [graphdriver] using prior storage driver \"btrfs\" \r\nINFO[0000] Firewalld running: false                     \r\nINFO[0000] Default bridge (docker0) is assigned with an IP address 172.17.0.1/16. Daemon option --bip can be used to set a preferred IP address \r\nINFO[0000] Loading containers: start.                   \r\n\r\nINFO[0000] Loading containers: done.                    \r\nINFO[0000] Daemon has completed initialization          \r\nINFO[0000] Docker daemon                                 commit=a34a1d5-dirty execdriver=native-0.2 graphdriver=btrfs\r\n```"},"comment":{"url":"https://api.github.com/repos/docker/libnetwork/issues/comments/186771656","html_url":"https://github.com/docker/libnetwork/issues/779#issuecomment-186771656","issue_url":"https://api.github.com/repos/docker/libnetwork/issues/779","id":186771656,"user":{"login":"kostya0shift","id":2418596,"avatar_url":"https://avatars.githubusercontent.com/u/2418596?v=3","gravatar_id":"","url":"https://api.github.com/users/kostya0shift","html_url":"https://github.com/kostya0shift","followers_url":"https://api.github.com/users/kostya0shift/followers","following_url":"https://api.github.com/users/kostya0shift/following{/other_user}","gists_url":"https://api.github.com/users/kostya0shift/gists{/gist_id}","starred_url":"https://api.github.com/users/kostya0shift/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kostya0shift/subscriptions","organizations_url":"https://api.github.com/users/kostya0shift/orgs","repos_url":"https://api.github.com/users/kostya0shift/repos","events_url":"https://api.github.com/users/kostya0shift/events{/privacy}","received_events_url":"https://api.github.com/users/kostya0shift/received_events","type":"User","site_admin":false},"created_at":"2016-02-21T07:56:41Z","updated_at":"2016-02-21T07:56:41Z","body":"Same workaround using systemd drop-ins:\r\n\r\n    # ensure that openvpn connections are started after openvpn.service\r\n    mkdir -p /lib/systemd/system/openvpn@.service.d\r\n    cat > /lib/systemd/system/openvpn@.service.d/10-openvpn.conf << EOF\r\n    [Unit]\r\n    After=openvpn.service\r\n    EOF\r\n\r\n    # ensure that docker is started before openvpn.service\r\n    mkdir -p /lib/systemd/system/docker.service.d\r\n    cat > /lib/systemd/system/docker.service.d/10-openvpn.conf << EOF\r\n    [Unit]\r\n    Before=openvpn.service\r\n    EOF\r\n\r\n    systemctl daemon-reload\r\n    systemctl show docker | grep Before  # should have openvpn.service listed"}}