How to collect diagnostics data from Ansible Automation Platform running on OpenShift?
Environment
- Ansible Automation Platform 2.1+
- OpenShift Container Platform 4.7+
Issue
- An issue has occurred within Ansible Automation Platform instance, deployed within OpenShift Container Platform, and Red Hat Support needs additional information in order to troubleshoot.
Resolution
Access to registry.redhat.io
If the OpenShift environment does have access to registry.redhat.io, then follow these steps.
-
Log into OpenShift environment
oc login $OPENSHIFT_URL -
Use the oc adm must-gather command with the appropriate Ansible Automation Platform (AAP) image version to create the must-gather archive
# AAP 2.2 oc adm must-gather --image=registry.redhat.io/ansible-automation-platform-22/aap-must-gather-rhel8# AAP 2.3 oc adm must-gather --image=registry.redhat.io/ansible-automation-platform-23/aap-must-gather-rhel8# AAP 2.4 oc adm must-gather --image=registry.redhat.io/ansible-automation-platform-24/aap-must-gather-rhel8# AAP 2.5 oc adm must-gather --image=registry.redhat.io/ansible-automation-platform-25/aap-must-gather-rhel8# AAP 2.6 oc adm must-gather --image=registry.redhat.io/ansible-automation-platform-26/aap-must-gather-rhel9 -
Compress the must-gather directory using either
tarorzip -
Provide the must-gather archive to the support case
No access to registry.redhat.io (Only needed If your environment does not has direct access to the RedHat registry)
In the event that the OpenShift environment does not have access to registry.redhat.io, then follow these steps.
-
Log into OpenShift environment
oc login $OPENSHIFT_URL -
Run the oc adm inspect command to gather debug information
oc adm inspect ns/$NAMESPACE -
Compress the inspect directory using either
tarorzip -
Provide the inspect archive to the support case
-
Run following commad to provided CR definitions:
cr_list=( "ansibleautomationplatforms.aap.ansible.com" "ansibleautomationplatformbackups.aap.ansible.com" "ansibleautomationplatformrestores.aap.ansible.com" "automationcontrollers.automationcontroller.ansible.com" "automationcontrollerbackups.automationcontroller.ansible.com" "automationcontrollerrestores.automationcontroller.ansible.com" "automationhubs.automationhub.ansible.com" "automationhubbackups.automationhub.ansible.com" "automationhubrestores.automationhub.ansible.com" "edas.eda.ansible.com" "edabackups.eda.ansible.com" "edarestores.eda.ansible.com" ) for cr in "${cr_list[@]}"; do echo -e "\n--------------- $cr ---------------\n" >> cr-outputs.txt; oc get $cr -o yaml >> cr-outputs.txt; done -
Provide cr-outputs.txt file to the support case
API Outputs
Below is additional information that will help Red Hat Support understand the issue better and how the environment is configured.
Automation Controller
-
Go to
https://$CONTROLLER_URL/api/login/and log in with local admin credentials -
Provide the output from the following API endpoints
https://$CONTROLLER_URL/api/v2/ping/https://$CONTROLLER_URL/api/v2/instances/https://$CONTROLLER_URL/api/v2/settings/all/
-
Provide the outputs from the following API endpoints if the issue is related to a job
https://$CONTROLLER_URL/api/v2/jobs/$JOB_ID/https://$CONTROLLER_URL/api/v2/jobs/$JOB_ID/stdout/
Automation Hub
-
Provide the output from the following API endpoints
https://$AUTOMATION_HUB_URL/pulp/api/v3/status/https://$AUTOMATION_HUB_URL/pulp/api/v3/tasks/
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.