Care about container-shutdown
Closed this issue · 1 comments
EugenMayer commented
Using this playbook:
- name: Bring up docker containers for docker connection inventory iface
hosts: localhost
roles:
- role: provision_docker
provision_docker_privileged: true,
provision_docker_inventory_group: "{{ groups['robots'] }}"
provision_docker_use_docker_connection: true
- name: Run tests for docker connection inventory iface
hosts: robots
gather_facts: false
tasks:
- name: "test command"
command: cat /var/log/dmesg
and running it 2 times, i will stall on the second time, since the container is already started. You should debootstrap the containers, so remove (stop) them and all their volumes ( dangling? ) so the test can be repeatet
chrismeyersfsu commented
provision_docker
does stop the running container. However, the timeout is set to 120 seconds. I have a PR to reduce the timeout to 1 second to fix this issue. We don't care about a graceful shutdown so 1 second force stop is acceptable.