¿Do i need to setup Tower/AWX to enable Embedded Ansible?

gaprindashvili

#1

Hi Friends

Im still having problems enabling Embedded Ansible. Im wondering myself why the appliance does not has all the deps… sigh…

¿Do i need to setup/deploy Ansible Tower or AWX in the appliance to enable it?

I see the docker daemon and containers coming up and down.

This is the last error i have from the logs (evm.log). Please help

[----] E, [2018-11-19T15:27:04.636775 #4965:9335f14] ERROR – : /usr/local/lib/ruby/gems/2.3.0/gems/ansible_tower_client-0.17.0/lib/ansible_tower_client/middleware/raise_tower_error.rb:21:in `on_complete’
[----] E, [2018-11-19T15:27:06.686622 #4965:9335f14] ERROR – : MIQ(EmbeddedAnsibleWorker::Runner) ID [680] PID [4965] GUID [96868890-706a-4cff-8936-a0e5b6b14e8e] {“detail”:“A server error has occurred.”} Worker exiting.


#2

Sort of. Embedded Ansible is a version of AWX running on the Appliance, however as a user, this should be an implementation detail you do not need to care about.

There should be a installation log for AWX somewhere in /var/log telling you what went wrong


#3

thnx buc ! follows what i can see in /var/log

pwd

/var/log

tree -d

.
├── anaconda
├── audit
├── chrony
├── httpd
├── journal
│ └── 9e01372d8d304dab92f4142026ede701
├── manageiq
│ └── apache
├── ntpstats
├── qemu-ga
├── repmgr
├── rhsm
├── samba
│ └── old
├── sssd
├── tower
└── tuned

17 directories

ls -1 manageiq/*log

manageiq/api.log
manageiq/appliance_console.log
manageiq/audit.log
manageiq/automation.log
manageiq/aws.log
manageiq/azure.log
manageiq/container_monitoring.log
manageiq/datawarehouse.log
manageiq/evm.log
manageiq/fog.log
manageiq/kubernetes.log
manageiq/lenovo.log
manageiq/middleware.log
manageiq/nuage.log
manageiq/policy.log
manageiq/production.log
manageiq/rhevm.log
manageiq/scvmm.log
manageiq/top_output.log
manageiq/vcloud.log
manageiq/vim.log
manageiq/vmstat_output.log
manageiq/websocket.log

ls -1 tower/*log

tower/callback_receiver.log
tower/fact_receiver.log
tower/task_system.log
tower/tower.log
tower/tower_rbac_migrations.log
tower/tower_system_track_migrations.log

grep -ril error manageiq/

manageiq/apache/ssl_error.log
manageiq/last_settings.txt
manageiq/evm.log
manageiq/production.log
manageiq/api.log
manageiq/package_list_rpm.txt
manageiq/last_startup.txt

grep -ril error tower/

Where do i should take a look ? I ve been reviewing evm.log

rgds


#4

A side note, i have a http proxy on the network that i must use.
Guillermo


#5

[----] E, [2018-11-19T06:54:22.656270 #11964:9d1be5c] ERROR – : [ArgumentError]: can’t find user for awx Method:[block in method_missing]

was my first catch, then i started to follow another thread about Embedded Ansible setup…(relevants actions from my history file)

78 export http_proxy=http://10.199.101.40:888

80 groupadd -g 989 awx
81 grep awx /etc/group
82 groupadd -g 999 awx
83 groupadd -g 979 awx
84 useradd -u 979 -g 979 -d /var/lib/awx -s /bin/bash awx

88 yum install ansible

91 install -o awx -g awx -d /etc/tower
92 cat > /etc/sysconfig/ansible-tower << EOF
93 TOWER_SERVICES=“rabbitmq-server nginx supervisord”
94 EOF
95 install -o awx -g awx -m 0755 -d /var/log/tower
96 install -o awx -g awx -m 0644 /dev/null /var/log/tower/callback_receiver.log
97 install -o awx -g awx -m 0644 /dev/null /var/log/tower/fact_receiver.log
98 install -o awx -g awx -m 0644 /dev/null /var/log/tower/task_system.log
99 install -o awx -g awx -m 0644 /dev/null /var/log/tower/tower.log
100 install -o awx -g awx -m 0644 /dev/null /var/log/tower/tower_rbac_migrations.log
101 install -o awx -g awx -m 0644 /dev/null /var/log/tower/tower_system_track_migrations.log

Rebooted the server
106 systemctl restart evmserverd.service

That let me in the actual situation:

[----] I, [2018-11-19T17:21:23.493409 #16757:6cd7cb4] INFO – : MIQ(DockerEmbeddedAnsible#start) Waiting for Ansible container to respond
[----] I, [2018-11-19T17:21:27.723127 #16757:6cd7cb4] INFO – : MIQ(EmbeddedAnsibleWorker::Runner#setup_ansible) Finished starting embedded ansible service.
[----] E, [2018-11-19T17:21:30.321124 #16757:6cd7cb4] ERROR – : [AnsibleTowerClient::ClientError]: {“detail”:“A server error has occurred.”} Method:[block in method_missing]
[----] E, [2018-11-19T17:21:30.321487 #16757:6cd7cb4] ERROR – : /usr/local/lib/ruby/gems/2.3.0/gems/ansible_tower_client-0.17.0/lib/ansible_tower_client/middleware/raise_tower_error.rb:21:in on_complete' /usr/local/lib/ruby/gems/2.3.0/gems/faraday-0.9.2/lib/faraday/response.rb:9:inblock in call’
/usr/local/lib/ruby/gems/2.3.0/gems/faraday-0.9.2/lib/faraday/response.rb:57:in on_complete' /usr/local/lib/ruby/gems/2.3.0/gems/faraday-0.9.2/lib/faraday/response.rb:8:incall’
/usr/local/lib/ruby/gems/2.3.0/gems/faraday-0.9.2/lib/faraday/request/url_encoded.rb:15:in call' /usr/local/lib/ruby/gems/2.3.0/gems/faraday_middleware-0.10.1/lib/faraday_middleware/response/follow_redirects.rb:76:inperform_with_redirection’
/usr/local/lib/ruby/gems/2.3.0/gems/faraday_middleware-0.10.1/lib/faraday_middleware/response/follow_redirects.rb:64:in call' /usr/local/lib/ruby/gems/2.3.0/gems/faraday_middleware-0.10.1/lib/faraday_middleware/request/encode_json.rb:23:incall’
/usr/local/lib/ruby/gems/2.3.0/gems/faraday-0.9.2/lib/faraday/rack_builder.rb:139:in build_response' /usr/local/lib/ruby/gems/2.3.0/gems/faraday-0.9.2/lib/faraday/connection.rb:377:inrun_request’
/usr/local/lib/ruby/gems/2.3.0/gems/faraday-0.9.2/lib/faraday/connection.rb:177:in post' /usr/local/lib/ruby/gems/2.3.0/gems/ansible_tower_client-0.17.0/lib/ansible_tower_client/api.rb:120:inmethod_missing’
/usr/local/lib/ruby/gems/2.3.0/gems/ansible_tower_client-0.17.0/lib/ansible_tower_client/base_model.rb:57:in create!' /usr/local/lib/ruby/gems/2.3.0/gems/ansible_tower_client-0.17.0/lib/ansible_tower_client/collection.rb:35:increate!’
/var/www/miq/vmdb/app/models/embedded_ansible_worker/object_management.rb:127:in create_playbook_project' /var/www/miq/vmdb/app/models/embedded_ansible_worker/object_management.rb:71:inensure_plugin_playbooks_project_seeded’
/var/www/miq/vmdb/app/models/embedded_ansible_worker/object_management.rb:11:in ensure_initial_objects' /var/www/miq/vmdb/app/models/embedded_ansible_worker/runner.rb:52:inupdate_embedded_ansible_provider’
/var/www/miq/vmdb/app/models/embedded_ansible_worker/runner.rb:13:in do_before_work_loop' /var/www/miq/vmdb/app/models/embedded_ansible_worker/runner.rb:5:inprepare’
/var/www/miq/vmdb/app/models/miq_worker/runner.rb:126:in start' /var/www/miq/vmdb/app/models/miq_worker/runner.rb:22:instart_worker’
/var/www/miq/vmdb/app/models/embedded_ansible_worker.rb:20:in `block in start_monitor_thread’
[----] I, [2018-11-19T17:21:32.338604 #16757:6cd7cb4] INFO – : MIQ(EmbeddedAnsibleWorker#log_status) [Embedded Ansible Worker] Worker ID [834], PID , GUID [a2a6681c-326c-4fe7-954c-1a336ab37917], Last Heartbeat [2018-11-19 22:20:48 UTC], Process Info: Memory Usage , Memory Size , Proportional Set Size: , Unique Set Size: , Memory % , CPU Time , CPU % , Priority
[----] E, [2018-11-19T17:21:32.339061 #16757:6cd7cb4] ERROR – : MIQ(EmbeddedAnsibleWorker::Runner) ID [834] PID [16757] GUID [a2a6681c-326c-4fe7-954c-1a336ab37917] {“detail”:“A server error has occurred.”} Worker exiting.
[----] I, [2018-11-19T17:21:32.339282 #16757:6cd7cb4] INFO – : MIQ(EmbeddedAnsibleWorker#start_monitor_thread) SystemExit received, exiting monitoring Thread

rgds
Guillermo


#6

Hi @gomix

Currently GUI way to enable embedded AWX failed.
I had to use external AWX instance in CentOS 7.5 to add it as Tower provider.

image

See https://github.com/ManageIQ/manageiq/issues/17738 for the bug.