does anyone know this and how to fix, thank you

1,057 views
Skip to first unread message

Gün Turhal

unread,
Jan 28, 2021, 12:55:33 PM1/28/21
to AWX Project

TASK [local_docker : Remove AWX containers before migrating postgres so that the old postgres container does not get used] ***
fatal: [localhost]: FAILED! => {"changed": false, "msg": "Cannot have both the docker-py and docker python modules (old and new version of Docker SDK for Python) installed together as they use the same namespace and cause a corrupt installation. Please uninstall both packages, and re-install only the docker-py or docker python module (for onex's Python /usr/bin/python3). It is recommended to install the docker module if no support for Python 2.6 is required. Please note that simply uninstalling one of the modules can leave the other module in a broken state."}
...ignoring

TASK [local_docker : Run migrations in task container] *************************
fatal: [localhost]: FAILED! => {"changed": true, "cmd": "docker-compose run --rm --service-ports task awx-manage migrate --no-input", "delta": "0:00:00.244683", "end": "2021-01-28 18:51:58.782691", "msg": "non-zero return code", "rc": 1, "start": "2021-01-28 18:51:58.538008", "stderr": "Traceback (most recent call last):\n  File \"/usr/local/bin/docker-compose\", line 8, in <module>\n    sys.exit(main())\n  File \"/usr/local/lib/python3.8/dist-packages/compose/cli/main.py\", line 71, in main\n    command()\n  File \"/usr/local/lib/python3.8/dist-packages/compose/cli/main.py\", line 124, in perform_command\n    project = project_from_options('.', options)\n  File \"/usr/local/lib/python3.8/dist-packages/compose/cli/command.py\", line 33, in project_from_options\n    return get_project(\n  File \"/usr/local/lib/python3.8/dist-packages/compose/cli/command.py\", line 121, in get_project\n    client = get_client(\n  File \"/usr/local/lib/python3.8/dist-packages/compose/cli/command.py\", line 92, in get_client\n    client = docker_client(\n  File \"/usr/local/lib/python3.8/dist-packages/compose/cli/docker_client.py\", line 127, in docker_client\n    client = APIClient(**kwargs)\n  File \"/usr/local/lib/python3.8/dist-packages/docker/api/client.py\", line 127, in __init__\n    self._auth_configs = auth.load_config(\nTypeError: load_config() got an unexpected keyword argument 'config_dict'", "stderr_lines": ["Traceback (most recent call last):", "  File \"/usr/local/bin/docker-compose\", line 8, in <module>", "    sys.exit(main())", "  File \"/usr/local/lib/python3.8/dist-packages/compose/cli/main.py\", line 71, in main", "    command()", "  File \"/usr/local/lib/python3.8/dist-packages/compose/cli/main.py\", line 124, in perform_command", "    project = project_from_options('.', options)", "  File \"/usr/local/lib/python3.8/dist-packages/compose/cli/command.py\", line 33, in project_from_options", "    return get_project(", "  File \"/usr/local/lib/python3.8/dist-packages/compose/cli/command.py\", line 121, in get_project", "    client = get_client(", "  File \"/usr/local/lib/python3.8/dist-packages/compose/cli/command.py\", line 92, in get_client", "    client = docker_client(", "  File \"/usr/local/lib/python3.8/dist-packages/compose/cli/docker_client.py\", line 127, in docker_client", "    client = APIClient(**kwargs)", "  File \"/usr/local/lib/python3.8/dist-packages/docker/api/client.py\", line 127, in __init__", "    self._auth_configs = auth.load_config(", "TypeError: load_config() got an unexpected keyword argument 'config_dict'"], "stdout": "", "stdout_lines": []}


Garrett Kelly

unread,
Jan 29, 2021, 2:30:37 AM1/29/21
to AWX Project
I believe the issue is "Cannot have both the docker-py and docker python modules (old and new version of Docker SDK for Python) installed together"

Run the below commands and you should be good to go:

pip uninstall docker docker-py docker-compose

pip install docker-compose


https://stackoverflow.com/questions/50151210/unable-to-run-docker-compose-in-an-ansible-playbook

Garrett Kelly

unread,
Jan 29, 2021, 2:33:19 AM1/29/21
to AWX Project
fyi, the AWX requirements for docker-compose were changed back in March 2019.

--
You received this message because you are subscribed to a topic in the Google Groups "AWX Project" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/awx-project/I_JlKTbYiB8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to awx-project...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/awx-project/8aa80766-9ba5-4336-9442-b31dc6f40d90n%40googlegroups.com.


--
Garrett Kelly, MS
gkel...@gmail.com - 626.502.8344
Reply all
Reply to author
Forward
0 new messages