Upgrade docker compose file version supported in DAppNode from 3.4 to 3.5.
Why?
Concerns
- ✔️ DAppNode compatibility with Docker compose file version upgrade 3.4 => 3.5
- ✔️ Docker engine compatibility
- Docker networks are persistant
- Comments:
- ? OS update
- ? docker update
- ✔️ Reboot
Update
Disconnect and connect containers works fine except for the following specific cases:
- VPN package
- Wifi package (only if wlan interface is present)
To reproduce the error:
docker network disconnect dncore_network DAppNodeCore-vpn.dnp.dappnode.eth
docker network connect dncore_network DAppNodeCore-vpn.dnp.dappnode.eth
The error:
Error response from daemon: failed to add interface vethe1f6a7e to sandbox: error setting interface "vethe1f6a7e" IP to 172.33.0.2/16: cannot program address 172.33.0.2/16 in sandbox interface because it conflicts with existing route {Ifindex: 3 Dst: 172.33.12.0/24 Src: 172.33.12.254 Gw: <nil> Flags: [] Table: 254}
To fix the error:
docker-compose -f /usr/src/dappnode/DNCORE/docker-compose-vpn.yml down
docker-compose -f /usr/src/dappnode/DNCORE/docker-compose-vpn.yml up -d
Due to the naturality of those packages, the issue might be the network configuration (ip routes table) that both packages have created and configured before disconnect to the dncore_network. Then when trying to connect them again to the network docker might attempt to create the same configuration and that is not allowed.
What solves the problem is to do docker-compose down and docker-compose up. This allows packages to connect back again to the dncore_network
Possible new roadmaps to solve this issue:
- Do a core update and update core docker compose files manually. Still do migration for non core packages
- Do
compose down and compose up for VPN and wifi and normal migration for other packages
Upgrade docker compose file version supported in DAppNode from 3.4 to 3.5.
Why?
Use of a new compose property to named networks instead of using the default compose naming protocol (use of project name followed by
_). This feature would simplify docker networking in DAppNode and would help to fix the issue Alias migration removes container network configuration #651Could be considered to avoid declaring external network creation in all core containers and assume it is already created. This will not break any dappnode already running (assuming docker networks persistence). To implement this would be necessary to add in the dappnode installer the creation of the
dncore_netowrkused in dappnode docker ecosystem. Add network creation when installing dappnode DAppNode_Installer#97Concerns
Update
Disconnect and connect containers works fine except for the following specific cases:
To reproduce the error:
docker network disconnect dncore_network DAppNodeCore-vpn.dnp.dappnode.ethdocker network connect dncore_network DAppNodeCore-vpn.dnp.dappnode.ethThe error:
Error response from daemon: failed to add interface vethe1f6a7e to sandbox: error setting interface "vethe1f6a7e" IP to 172.33.0.2/16: cannot program address 172.33.0.2/16 in sandbox interface because it conflicts with existing route {Ifindex: 3 Dst: 172.33.12.0/24 Src: 172.33.12.254 Gw: <nil> Flags: [] Table: 254}To fix the error:
docker-compose -f /usr/src/dappnode/DNCORE/docker-compose-vpn.yml downdocker-compose -f /usr/src/dappnode/DNCORE/docker-compose-vpn.yml up -dDue to the naturality of those packages, the issue might be the network configuration (ip routes table) that both packages have created and configured before disconnect to the
dncore_network. Then when trying to connect them again to the network docker might attempt to create the same configuration and that is not allowed.What solves the problem is to do
docker-compose downanddocker-compose up. This allows packages to connect back again to thedncore_networkPossible new roadmaps to solve this issue:
compose downandcompose upfor VPN and wifi and normal migration for other packages