Open kaysond opened 4 years ago
Files identified in the description:
If these files are inaccurate, please update the component name
section of the description or use the !component
bot command.
cc @DBendit @WojciechowskiPiotr @akshay196 @chouseknecht @danihodovic @dariko @felixfontein @jwitko @kassiansun @keitwb @olsaki @tbouvet click here for bot help
For anyone interested in why this hasn't happened yet and what is necessary to implement this, see the discussion in ansible/ansible#65742.
Migrated from https://github.com/ansible/ansible/issues/65742
SUMMARY
docker_network
doesn't check if a network is connected to any services before trying to remove itISSUE TYPE
COMPONENT NAME
docker_network
ANSIBLE VERSION
CONFIGURATION
OS / ENVIRONMENT
Running ansible locally on Ubuntu 18.04
STEPS TO REPRODUCE
Create:
~/docker-compose.yml
:playbook.yml
:Run
ansible-playbook -i "127.0.0.1," -vvv ~/playbook.yml
EXPECTED RESULTS
testnet
network should be recreated with the updated ipam_config.Ideally, Ansible would also re-connect services based on the
connected
andappend
arguments, just as it would containers (I haven't tested this, but am guessing that because it does not appear to check services at all, the module will not do this)ACTUAL RESULTS
The task chokes because the module attempts to remove the network while it is still connected to the
test_test
service.The issue here is that services need to be updated to remove the network. The Docker command-line for this would be:
docker service update --network-rm testnet test_test
.