Change docker0 network

Hi,

I need to change docker0 network from 172.17.0.1/16 to another network.

I found this in inventory:

Docker compose explicit subnet. Set to avoid overlapping your existing LAN networks.

docker_compose_subnet=“172.17.0.1/16”

This is exactly my case, our LAN is using 172.17.0.1/16

So I changed it with

docker_compose_subnet=“152.17.0.1/16”

Then re-run the installer, but unfortunately afer I still have :

3: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default
link/ether 02:42:cc:d1:61:08 brd ff:ff:ff:ff:ff:ff
inet 172.17.0.1/16 brd 172.17.255.255 scope global docker0
valid_lft forever preferred_lft forever

Why did it not change ?

How to force it to take in account the new “152.17.0.1/16” please ?

Regards

Yan

Hey Yan,

I had the same issue with mine when the network team created new networks that conflicted. Even after having updated that file with the docker_compose_subnet, and re-ran the deployment, it still hadn’t updated it. Please make sure you take a VM snapshot or backup prior to running the below commands.

To resolve, you would need to do the following:

docker stop $(docker ps -aq) This will stop all your containers so we can update the networking
docker network ls Find the current awx network listed, and copy the associated network id. We are going to want to delete this network
docker network rm
docker network create --driver bridge --subnet ‘192.168.168.0/24’ --gateway ‘192.168.168.1’ awxcompose_default create new network. Match whatever network is configured as your docker_compose_subnet

Once you have re-run the deployment, it should see the awxcompose_default network configuration, and use the networking provided in that.

https://github.com/ansible/awx/issues/750