ansible/awx

Error starting project unknown cause

Open

#3956 aperta il 28 mag 2019

Vedi su GitHub
 (31 commenti) (0 reazioni) (0 assegnatari)Python (3333 fork)batch import
component:installerhelp wantedtype:bug

Metriche repository

Star
 (13.071 star)
Metriche merge PR
 (Merge medio 24g 6h) (30 PR mergiate in 30 g)

Descrizione

ISSUE TYPE
  • Bug Report
SUMMARY

AWX Installation failed with unknow error

ENVIRONMENT
  • AWX version: 4.0.0
  • AWX install method: docker on linux
  • Ansible version: 2.8.0
  • Operating System: CentOS 7.6.1810
  • Web Browser: Chrome
STEPS TO REPRODUCE

I had AWX 3.0.1 running and then I tried to install AWX 4.0.0 on top, the same procedure worked fine to upgrade AWX 3.0.0. to AWX 3.0.1

`# ansible-playbook -i inventory install.yml -vvvv

.
.
TASK [local_docker : Start the containers] **************************************************************************************************************************************************************************************************
task path: /root/awx-4/installer/roles/local_docker/tasks/compose.yml:25
<localhost> ESTABLISH LOCAL CONNECTION FOR USER: root
<localhost> EXEC /bin/sh -c 'echo ~root && sleep 0'
<localhost> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /root/.ansible/tmp/ansible-tmp-1559049469.25-220943567830274 `" && echo ansible-tmp-1559049469.25-220943567830274="` echo /root/.ansible/tmp/ansible-tmp-1559049469.25-220943567830274 `" ) && sleep 0'
Using module file /usr/lib/python2.7/site-packages/ansible/modules/cloud/docker/_docker_service.py
<localhost> PUT /root/.ansible/tmp/ansible-local-60293Nj0BSi/tmpiVJnh7 TO /root/.ansible/tmp/ansible-tmp-1559049469.25-220943567830274/AnsiballZ__docker_service.py
<localhost> EXEC /bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-tmp-1559049469.25-220943567830274/ /root/.ansible/tmp/ansible-tmp-1559049469.25-220943567830274/AnsiballZ__docker_service.py && sleep 0'
<localhost> EXEC /bin/sh -c '/usr/bin/env python /root/.ansible/tmp/ansible-tmp-1559049469.25-220943567830274/AnsiballZ__docker_service.py && sleep 0'
<localhost> EXEC /bin/sh -c 'rm -f -r /root/.ansible/tmp/ansible-tmp-1559049469.25-220943567830274/ > /dev/null 2>&1 && sleep 0'
The full traceback is:
WARNING: The below traceback may *not* be related to the actual failure.
  File "/tmp/ansible_docker_service_payload_Dj9vLs/__main__.py", line 764, in cmd_up
    timeout=self.timeout)
  File "/usr/lib/python2.7/site-packages/compose/project.py", line 559, in up
    'Encountered errors while bringing up the project.'

[DEPRECATION WARNING]: The 'docker_service' module has been renamed to 'docker_compose'.. This feature will be removed in version 2.12. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.
fatal: [localhost]: FAILED! => {
    "changed": false,
    "errors": [],
    "invocation": {
        "module_args": {
            "api_version": "auto",
            "build": false,
            "ca_cert": null,
            "client_cert": null,
            "client_key": null,
            "debug": false,
            "definition": null,
            "dependencies": true,
            "docker_host": "unix://var/run/docker.sock",
            "files": null,
            "hostname_check": false,
            "nocache": false,
            "project_name": null,
            "project_src": "/var/lib/awx",
            "pull": false,
            "recreate": "smart",
            "remove_images": null,
            "remove_orphans": false,
            "remove_volumes": false,
            "restarted": false,
            "scale": null,
            "services": null,
            "ssl_version": null,
            "state": "present",
            "stopped": false,
            "timeout": 10,
            "tls": false,
            "tls_hostname": "localhost",
            "validate_certs": false
        }
    },
    "module_stderr": "Creating awx_web ... \r\n\r\u001b[1B",
    "module_stdout": "",
    "msg": "Error starting project unknown cause"
}

PLAY RECAP **********************************************************************************************************************************************************************************************************************************
localhost                  : ok=8    changed=0    unreachable=0    failed=1    skipped=77   rescued=0    ignored=0

`

more dockers are created:

`# docker ps
CONTAINER ID        IMAGE                        COMMAND                  CREATED             STATUS              PORTS                                                 NAMES
6b20e23a0be7        ansible/awx_rabbitmq:3.7.4   "docker-entrypoint.s…"   7 minutes ago       Up 6 seconds        4369/tcp, 5671-5672/tcp, 15671-15672/tcp, 25672/tcp   awx_rabbitmq
5d25e036cd96        memcached:alpine             "docker-entrypoint.s…"   7 minutes ago       Up 6 seconds        11211/tcp                                             awx_memcached
695c8aa6d2b7        postgres:9.6                 "docker-entrypoint.s…"   7 minutes ago       Up 5 seconds        5432/tcp                                              awx_postgres
8246270599a5        ansible/awx_task:3.0.1       "/tini -- /bin/sh -c…"   About an hour ago   Up 4 seconds        8052/tcp                                              awx_task
cb18997147ae        ansible/awx_web:3.0.1        "/tini -- /bin/sh -c…"   About an hour ago   Up 4 seconds        0.0.0.0:8052->8052/tcp                                awx_web
1580ef93f47d        memcached:alpine             "docker-entrypoint.s…"   21 hours ago        Up 6 seconds        11211/tcp                                             memcached
97c10bb0b7ac        ansible/awx_rabbitmq:3.7.4   "docker-entrypoint.s…"   21 hours ago        Up 6 seconds        4369/tcp, 5671-5672/tcp, 15671-15672/tcp, 25672/tcp   rabbitmq
4c527a00794b        postgres:9.6                 "docker-entrypoint.s…"   21 hours ago        Up 6 seconds        5432/tcp                                              postgres`
EXPECTED RESULTS

AWX Installed successfully

ACTUAL RESULTS

    "module_stderr": "Creating awx_web ... \r\n\r\u001b[1B",
    "module_stdout": "",
    "msg": "Error starting project unknown cause"
ADDITIONAL INFORMATION
`# cat inventory
localhost ansible_connection=local ansible_python_interpreter="/usr/bin/env python"

[all:vars]

# Remove these lines if you want to run a local image build
# Otherwise the setup playbook will install the official Ansible images. Versions may
# be selected based on: latest, 1, 1.0, 1.0.0, 1.0.0.123
# by default the base will be used to search for ansible/awx_web and ansible/awx_task
dockerhub_base=ansible

# Openshift Install
# Will need to set -e openshift_password=developer -e docker_registry_password=$(oc whoami -t)
#           or set -e openshift_token=TOKEN
# openshift_host=127.0.0.1:8443
# openshift_project=awx
# openshift_user=developer
# openshift_skip_tls_verify=False
# openshift_pg_emptydir=True

# Kubernetes Install
# kubernetes_context=test-cluster
# kubernetes_namespace=awx
# tiller_namespace=kube-system
# Optional Kubernetes Variables
# pg_persistence_storageClass=StorageClassName
# pg_cpu_limit=1000
# pg_mem_limit=2

# Kubernetes and Openshift Install Resource Requests
# This are the request and limit values for a pod's container for task/web/rabbitmq/memcached/management.
# The total amount of requested resources for a pod is the sum of all
# resources requested by all containers in the pod
# A cpu_request of 1500 is 1.5 cores for the container to start out with.
# A cpu_limit defines the maximum cores that that container can reserve.
# A mem_request of 2 is for 2 gigabytes of memory for the container
# A mem_limit defines the maximum memory that that container can reserve.
# Default values for these entries can be found in ./roles/kubernetes/defaults/main.yml
# task_cpu_request=1500
# task_mem_request=2
# task_cpu_limit=2000
# task_mem_limit=4
# web_cpu_limit=1000
# web_mem_limit=2
# rabbitmq_cpu_limit=1000
# rabbitmq_mem_limit=3
# memcached_cpu_limit=1000
# memcached_mem_limit=2
# management_cpu_limit=2000
# management_mem_limit=2

# Common Docker parameters
awx_task_hostname=awx
awx_web_hostname=awxweb
postgres_data_dir=/ansible/pgdocker
host_port=8052

# Docker Compose Install
# use_docker_compose=false
# The docker_compose.yml file will be created in this directory
# The name of the directory (here "awx") will be the prefix of the docker containers
docker_compose_dir=/var/lib/awx

# Required for Openshift when building the image on your own
# Optional for Openshift if using Dockerhub or another prebuilt registry
# Required for Standalone Docker Install if building the image on your own
# Optional for Standalone Docker Install if using Dockerhub or another prebuilt registry
# Required for Docker Compose Install if building the image on your own
# Optional for Docker Compose Install if using Dockerhub or another prebuilt registry
# Define if you want the image pushed to a registry. The container definition will also use these images
# docker_registry=172.30.1.1:5000
# docker_registry_repository=awx
# docker_registry_username=developer


# Docker_image will not attempt to push to remote if the image already exists locally
# Set this to true to delete images from docker on the build host so that they are pushed to the remote repository
# docker_remove_local_images=False

# Set pg_hostname if you have an external postgres server, otherwise
# a new postgres service will be created
# pg_hostname=postgresql
pg_username=xxxx
# pg_password should be random 10 character alphanumeric string, when postgresql is running on kubernetes
# NB: it's a limitation of the "official" postgres helm chart
pg_password=xxxx$$
pg_database=xxxx_db
pg_port="5432"

# RabbitMQ Configuration
rabbitmq_password=XXXX
rabbitmq_erlang_cookie=XXXX

# Use a local distribution build container image for building the AWX package
# This is helpful if you don't want to bother installing the build-time dependencies as
# it is taken care of already.
# NOTE: IMPORTANT: If you are running a mininshift install, using this container might not work
#                  if you are using certain drivers like KVM where the source tree can't be mapped
#                  into the build container.
#                  Thus this setting must be set to False which will trigger a local build. To view the
#                  typical dependencies that you might need to install see:
#                  installer/image_build/files/Dockerfile.sdist
# use_container_for_build=true

# This will create or update a default admin (superuser) account in AWX, if not provided
# then these default values are used
admin_user=admin
admin_password=XXXXX

# Whether or not to create preload data for demonstration purposes
create_preload_data=True

# AWX Secret key
# It's *very* important that this stay the same between upgrades or you will lose the ability to decrypt
# your credentials
secret_key=XXXXX

# Build AWX with official logos
# Requires cloning awx-logos repo into the project root.
# Review the trademark guidelines at https://github.com/ansible/awx-logos/blob/master/TRADEMARKS.md
# awx_official=false

# Proxy
#http_proxy=http://proxy:3128
#https_proxy=http://proxy:3128
#no_proxy=mycorp.org

# Container networking configuration
# Set the awx_task and awx_web containers' search domain(s)
#awx_container_search_domains=example.com,ansible.com
# Alternate DNS servers
#awx_alternate_dns_servers="10.1.2.3,10.2.3.4"

# AWX project data folder. If you need access to the location where AWX stores the projects
# it manages from the docker host, you can set this to turn it into a volume for the container.
#project_data_dir=/var/lib/awx/projects
project_data_dir=/ansible/projects

# CA Trust directory. If you need to provide custom CA certificates, supplying
# this variable causes this directory on the host to be bind mounted over
# /etc/pki/ca-trust in the awx_task and awx_web containers.
# NOTE: only obeyed in local_docker install
#ca_trust_dir=/etc/pki/ca-trust/source/anchors

# Include /etc/nginx/awx_extra.conf
# Note the use of glob pattern for nginx
# which makes include "optional" - i.e. not fail
# if file is absent
#extra_nginx_include="/etc/nginx/awx_extra[.]conf"`

Guida contributor