Chapter 6. Troubleshooting Ansible Install/Upgrade Issues

6.1. 3-node MBaaS re-run stalling

Once the initial creation of the MongoDB ReplicaSet​​ in the rhmap-installer 3-node-mbaas playbook is complete, the MongoDB-Initiator Pod is deleted. Should the playbook now fail, it is not possible to re-run the playbook in an attempt to complete it - the playbook is not idempotent. The playbook will stall at the point of checking the MongoDB Initiator Pod has successfully completed.

To work-around this:

  1. Delete the existing project
  2. Re-run the 3-node-mbaas.yml playbook

6.2. Error Exception during Playbook Execution

In the event of an error exception in the installation or upgrade of RHMAP using the Ansible installer, use the following steps

  • Re-run the installer to see if the error persists (i.e that it’s not a timing issue).
  • Use the playbooks/seed-images.yaml playbook to seed the images.
  • Check the ansible.log file for error information.
  • Check the file /tmp/events_error.log for details (it saves the OpenShift event log).
  • View the current event log either via the web console or use the cli command oc get events -w
  • If the problems persist try running the Ansible installer with strict_mode=false -e strict_mode=false
  • Make use of the --skip-tags this will help isolating the problem and also decrease debugging time.
  • Add - debug: var="{{ variable_to_debug }}" in the template to help with debugging.
  • Enable the debug strategy - https://docs.ansible.com/ansible/playbooks_debugger.html

    1. If you cannot find the Ansible logs or if Ansible gives you a warning like following, it means Ansible cannot create the file specified in Ansible configuration because of insufficient user permissions.

      [WARNING]: log file at /some/path/ansible.log is not writeable and we cannot create it, aborting

      You can use a custom path for Ansible logs. In /opt/rhmap/x.x/rhmap-installer/ansible.cfg, you can change the log_path property to a value of your own choice.

      You can also use the ANSIBLE_LOG_PATH environment variable to achieve the same goal.

      ANSIBLE_LOG_PATH="/another/path/ansible.log" ansible-playbook some-playbook.yml

      Note that ANSIBLE_LOG_PATH environment variable has a precedence over the ansible.cfg log_path property.