community.docker icon indicating copy to clipboard operation
community.docker copied to clipboard

docker_compose: module failure

Open choppedpork opened this issue 4 years ago • 2 comments

SUMMARY

Occasionally the docker_compose module fails with a cryptic MODULE FAILURE message and no further information. Upon retrying the same task succeeds.

ISSUE TYPE
  • Bug Report
COMPONENT NAME

docker_compose

ANSIBLE VERSION
ansible 2.9.6
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/home/solid/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3/dist-packages/ansible
  executable location = /usr/bin/ansible
  python version = 3.6.9 (default, Apr 18 2020, 01:56:04) [GCC 8.4.0]
CONFIGURATION
ANSIBLE_PIPELINING(/var/lib/jenkins/workspace/xxx/ansible/ansible.cfg) = True
ANSIBLE_SSH_ARGS(/var/lib/jenkins/workspace/xxx/ansible/ansible.cfg) = -o ControlMaster=auto -o ControlPersist=60s -o PreferredAuthentications=publickey
ANSIBLE_SSH_CONTROL_PATH(/var/lib/jenkins/workspace/xxx/ansible/ansible.cfg) = ~/.ssh/mux-%%r@%%h:%%p
DEFAULT_FORKS(/var/lib/jenkins/workspace/xxx/ansible/ansible.cfg) = 15
DEFAULT_HOST_LIST(/var/lib/jenkins/workspace/xxx/ansible/ansible.cfg) = ['/var/lib/jenkins/workspace/xxx/ansible/hosts.txt']
DEFAULT_ROLES_PATH(/var/lib/jenkins/workspace/xxx/ansible/ansible.cfg) = ['/var/lib/jenkins/workspace/xxx/ansible/roles']
DEFAULT_TIMEOUT(/var/lib/jenkins/workspace/xxx/ansible/ansible.cfg) = 30
DEPRECATION_WARNINGS(/var/lib/jenkins/workspace/xxx/ansible/ansible.cfg) = False
DISPLAY_SKIPPED_HOSTS(/var/lib/jenkins/workspace/xxx/ansible/ansible.cfg) = False
HOST_KEY_CHECKING(/var/lib/jenkins/workspace/xxx/ansible/ansible.cfg) = False
OS / ENVIRONMENT

Source: Ubuntu 18.04 Target: Ubuntu 18.04

STEPS TO REPRODUCE

Unfortunately the issue is highly intermittent - we seem to currently be hitting this a few times a weeks (I would estimate we execute the same role / playbook ~10 times a day).

  - name: start registrator on all the nodes
    docker_compose:
      project_src: /xxx
      services:
        - registrator
      state: present
    any_errors_fatal: true
    tags:
      - start_registrator
      - quickstart
EXPECTED RESULTS

Either a successful completion of the task or a error message providing sufficient information to troubleshoot.

I believe MODULE FAILURE is caused by some error condition in the compose library which is not being caught. Unfortunately both stdout and stderr are empty so I'm at a bit of a loss as to how to move forward with investigating this :/ I believe the debug option of docker_compose only adds more items to the return values so isn't of much use here. Increasing verbosity for the entire playbook would be quite brutal for my usecase (272 tasks in total) and I have never managed to reproduce this issue manually. I'm fairly certain the actual problem is with the compose library (or even something specific to the container / host) but I'm raising this issue in hope the failure message can be improved.

Also secretly hoping someone else has hit the -13 error code and can point me in the right direction! If -vvvv is the only way to go we'll bite the bullet and enable it for as long as it takes to reproduce.

ACTUAL RESULTS
fatal: [10.20.22.69]: FAILED! => {"changed": false, "module_stderr": "", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": -13}

choppedpork avatar Sep 02 '20 11:09 choppedpork

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.

click here for bot help

ansibullbot avatar Sep 02 '20 11:09 ansibullbot

cc @DBendit @WojciechowskiPiotr @akshay196 @chouseknecht @danihodovic @dariko @felixfontein @jwitko @kassiansun @sluther @tbouvet click here for bot help

ansibullbot avatar Sep 02 '20 11:09 ansibullbot