Description of problem: ----------------------- While testing patch for rhbz1611016 upgrade failed: ... u'TASK [tripleo-ssh-known-hosts : Add hosts key in /etc/ssh/ssh_known_hosts for live/cold-migration] ***', u'Monday 06 August 2018 10:05:31 -0400 (0:00:00.521) 0:00:10.992 ********* ', u'fatal: [192.168.24.21]: FAILED! => {"failed": true, "msg": "|failed expects a dictionary"}', u'fatal: [192.168.24.24]: FAILED! => {"failed": true, "msg": "|failed expects a dictionary"}', u'fatal: [192.168.24.11]: FAILED! => {"failed": true, "msg": "|failed expects a dictionary"}', u'', u'NO MORE HOSTS LEFT *************************************************************', u'', u'PLAY RECAP *********************************************************************', u'192.168.24.11 : ok=4 changed=2 unreachable=0 failed=1 ', u'192.168.24.21 : ok=4 changed=2 unreachable=0 failed=1 ', u'192.168.24.24 : ok=4 changed=2 unreachable=0 failed=1 ', The problem seems to be with hostvar[item]['ansible_hostname'] statement. Version-Release number of selected component (if applicable): ------------------------------------------------------------- ceph-ansible-3.1.0-0.1.rc10.el7cp.noarch ansible-pacemaker-1.0.4-0.20180220234310.0e4d7c0.el7ost.noarch ansible-2.4.6.0-1.el7ae.noarch ansible-tripleo-ipsec-8.1.1-0.20180308133440.8f5369a.el7ost.noarch ansible-role-redhat-subscription-1.0.1-1.el7ost.noarch openstack-tripleo-heat-templates-8.0.4-4.el7ost.noarch Steps to Reproduce: ------------------- 1. Upgrade UC to RHOS-13 2. Apply patch https://review.openstack.org/#/c/584994/ 3. Prepare oc images/repos 4. Setup heat-outputs 5. Start upgrade with Controller role, e.g.: openstack overcloud upgrade run \ --stack overcloud \ --roles ControllerOpenstack --playbook all Actual results: --------------- Upgrade failed Expected results: ----------------- Upgrade succeeded Additional info: ---------------- Try to check hostvars statement with inventory generated by tripleo-ansible-inventory. Example of playbook: --- - name: check hostvars hosts: all become: true gather_facts: yes tasks: - name: print hostvar debug: msg: "{{ hostvars[item]['ansible_hostname'] + ' ssh-rsa ' + hostvars[item]['ansible_ssh_host_key_rsa_public'] }}" with_items: "{{ groups['all']|intersect(play_hosts) }}"
We are missing several patches related to openstack-tripleo-common/inventory.py in the downstream branch rhos-13.0-patches which are present in tripleo_common stable/queens branch upstream. To be more precise, all of these: [Include 'tripleo_role_name' in the inventory] https://github.com/openstack/tripleo-common/commit/f3970c2db0bb56b668da1ab82b557d52c458a28e#diff-354b2f588533c21d913db5dd03f9bade [Fix dynamic inventory] https://github.com/openstack/tripleo-common/commit/18324fb412267bfb113731d92c4bd92f8ed40ea4#diff-354b2f588533c21d913db5dd03f9bade [Use hostnames in inventory] https://github.com/openstack/tripleo-common/commit/7901fb43cb4db2d493349e649caf970ab72127bb#diff-354b2f588533c21d913db5dd03f9bade [Remove role_data from inventory ] https://github.com/openstack/tripleo-common/commit/1e4f49f5563f153c9ef0bdd1a38734395084b0dc#diff-354b2f588533c21d913db5dd03f9bade When generating the tripleo-ansible-inventory.yml using the current inventory.py ( https://raw.githubusercontent.com/openstack/tripleo-common/stable/queens/tripleo_common/inventory.py ) file from stable/queens, the errors dissapear and we can safely access hostvars variables in the playbooks. So, we would need to cherry-pick all those patches downstream, into rhos-13.0-patches, in order to solve this bug.
This bug is marked for inclusion in the errata but does not currently contain draft documentation text. To ensure the timely release of this advisory please provide draft documentation text for this bug as soon as possible. If you do not think this bug requires errata documentation, set the requires_doc_text flag to "-". To add draft documentation text: * Select the documentation type from the "Doc Type" drop down field. * A template will be provided in the "Doc Text" field based on the "Doc Type" value selected. Enter draft text in the "Doc Text" field.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2018:2574