Awx: AWX fails to start with docker-compose after upgrade to 10.0.0

Created on 4 Apr 2020  路  1Comment  路  Source: ansible/awx

ISSUE TYPE
  • Bug Report
SUMMARY

When I try to upgrade a 9.3.0 installation to 10.0.0 the ansible playbook fails at starting containers as it found an orphan rabbitmq around.
This happens because the docker-compose module is running without remove_orphans parameter, as suggested by the error docker-compose returned.

ENVIRONMENT
  • AWX version: 10.0.0
  • AWX install method: docker on linux
  • Ansible version: 2.9.6
  • Operating System: RHEL 7.8
  • Web Browser: N/A (fails at installation)
STEPS TO REPRODUCE

Upgrade a docker-based installation to 10.0.0 to see the error at task: "local_docker : Start the containers".

EXPECTED RESULTS

AWX will start properly and the obsolete rabbitmq container will be removed removed.

ACTUAL RESULTS

Here's the output of the failed task:

TASK [local_docker : Start the containers] *******************************************************************************************************************************
fatal: [localhost]: FAILED! => {"changed": false, "errors": [], "module_stderr": "Found orphan containers (awx_rabbitmq) for this project. If you removed or renamed this service in your compose file, you can run this command with the --remove-orphans flag to clean it up.\nStarting awx_memcached ... \nStarting awx_redis     ... \n\u001b[1A\u001b[2K\nStarting awx_redis     ... \n\u001b[1B\u001b[2A\u001b[2K\nStarting awx_memcached ... \n\u001b[2BRecreating e25d3db44023_awx_web ... \nHost is already in use by another container\n\u001b[1A\u001b[2K\nRecreating e25d3db44023_awx_web ... \n\u001b[1B", "module_stdout": "", "msg": "Error starting project Encountered errors while bringing up the project."}
ADDITIONAL INFORMATION

Modifying the task in the local_docker role, by adding the "remove_orphans: yes" parameter to the "docker_compose" module solves the problem.

- name: Start the containers
  docker_compose:
    project_src: "{{ docker_compose_dir }}"
    restarted: "{{ awx_compose_config is changed or awx_secret_key is changed }}"
    remove_orphans: yes
  register: awx_compose_start
TASK [local_docker : Start the containers] *******************************************************************************************************************************
changed: [localhost]
bug

>All comments

Hey @ldepandis,

This issue tracker is for tracking feature enhancements and bugs to AWX itself.

If you need help troubleshooting an AWX install, try our mailing list or IRC channel:

http://webchat.freenode.net/?channels=ansible-awx
https://groups.google.com/forum/#!forum/awx-project

Was this page helpful?
0 / 5 - 0 ratings