Test Project SCM Type git not working

1,096 views
Skip to first unread message

ri...@gmx.de

unread,
Jan 23, 2018, 9:18:29 AM1/23/18
to AWX Project
Hi,

I installed awx 1.0.2.70 and git CE 10.3.3 (https enabled) and can access both via localhost. After setting up a test project in awx (SCM URL https://localhost:50443/rickv/ansible-ae) and running "Start an SCM update" I see the following error messages in STANDARD OUT:

TASK [update project using git] ************************************************ fatal: [localhost]: FAILED! => {"changed": false, "cmd": "/usr/bin/git clone --origin origin 'https://$encrypted$:$encrypted$@localhost:50443/rickv/ansible-ae' /var/lib/awx/projects/_6__ansible_test_project", "msg": "Cloning into '/var/lib/awx/projects/_6__ansible_test_project'...\\nfatal: unable to access 'https://$encrypted$:$encrypted$@localhost:50443/rickv/ansible-ae/': Failed to connect to ::1: Cannot assign requested address", "rc": 128, "stderr": "Cloning into '/var/lib/awx/projects/_6__ansible_test_project'...\\nfatal: unable to access 'https://$encrypted$:$encrypted$@localhost:50443/rickv/ansible-ae/': Failed to connect to ::1: Cannot assign requested address\\n", "stderr_lines": ["Cloning into '/var/lib/awx/projects/_6__ansible_test_project'...", "fatal: unable to access 'https://$encrypted$:$encrypted$@localhost:50443/rickv/ansible-ae/': Failed to connect to ::1: Cannot assign requested address"], "stdout": "", "stdout_lines": []} PLAY RECAP ********************************************************************* localhost : ok=0 changed=0 unreachable=0 failed=1

The awx Demo Project SCM update is working fine. Looks like awx can't access my test project SCM URL but I don't understand why it can't?

Thanks,
Rick

Christopher Meyers

unread,
Jan 23, 2018, 12:39:38 PM1/23/18
to ri...@gmx.de, AWX Project
Rick,

localhost:50443 ... Since the git clone is happening in the AWX docker container; localhost is the container host.

--
You received this message because you are subscribed to the Google Groups "AWX Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to awx-project+unsubscribe@googlegroups.com.
To post to this group, send email to awx-p...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/awx-project/1e960d85-d5a5-418c-9b3a-da2eb74b4d07%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

CHRIS MEYERS

SENIOR SOFTWARE ENGINEER, TOWERREWARD ZONE AMBASSADOR

Red Hat 

cme...@redhat.com   


Ryan Petrello

unread,
Jan 23, 2018, 12:42:50 PM1/23/18
to AWX Project
Rick,

Assuming you've deployed awx with openshift, the git clone actually runs inside one of the containers, so `localhost` isn't going to resolve outside of the container where the `git clone` is running.  If your git server doesn't have a fully qualified domain name, you'll need to add a service definition for the external git server so that you can connect to it:  https://docs.openshift.com/enterprise/3.1/dev_guide/integrating_external_services.html

ri...@gmx.de

unread,
Jan 24, 2018, 8:21:54 AM1/24/18
to AWX Project
Thanks Christopher and Ryan for the helpful explanations/information.
I deployed AWX with standalone Docker daemon (not Openshift). The git server doesn't have a fully qualified domain name.

Do I need to set awx_container_search_domains in awx/installer/inventory?

# Container networking configuration
# Set the awx_task and awx_web containers' search domain(s)
#awx_container_search_domains=example.com,ansible.com

ri...@gmx.de

unread,
Jan 29, 2018, 8:13:16 AM1/29/18
to AWX Project
I was able to setup an awx test project/credential/inventory/template and run the template successfully. But I'm sure there is a better/correct way to setup such a test project. What I did:
In awx
Created "Ansible Test Project":


Created "Ansible Test Credential":


Created "Ansible Test Inventory" with one host (localhost):


Created "Ansible Test Job Template":


I configured the git container to use http and in order for awx to access it, I logged into each of the containers awx_web and awx_task and added the git container ip (determined using docker network inspect bridge) to the hosts file.

The hello_world.yml playbook on git:

---
- name: Hello World!
  hosts
: localhost

  tasks
:

 
- name: Hello World!
    shell
: echo "Hi! AWX is working."

 
- name: hostname
    command
: hostname

 
- name: pwd
    command
: pwd

 
- name: ls
    command
: ls


The template (playbook) ran successfully but I don't understand why the hostname command returns "awx" and not awx_task or how I can create/add another host to the inventory.
And I sure I could create a better/correct configuration so that I don't need to login to the awx containers to update the hosts file in order to access the git container. Still have a lot to learn about setting up container to container configuration I suppose.

 


On Tuesday, January 23, 2018 at 3:18:29 PM UTC+1, ri...@gmx.de wrote:
Auto Generated Inline Image 1
Auto Generated Inline Image 2
Auto Generated Inline Image 3
Auto Generated Inline Image 4
Reply all
Reply to author
Forward
0 new messages