Bug 1678235

Summary: FFU: error while evaluating conditional (tripleo_role_name == \\'Compute\\' and ansible_hostname == Compute[0]):
Product: Red Hat OpenStack Reporter: Ronnie Rasouli <rrasouli>
Component: openstack-tripleo-heat-templatesAssignee: Lukas Bezdicka <lbezdick>
Status: CLOSED ERRATA QA Contact: Raviv Bar-Tal <rbartal>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 13.0 (Queens)CC: amodi, dbecker, lbezdick, mburns, morazi, rbartal, sathlang, slinaber, supadhya
Target Milestone: z5Keywords: Regression, Triaged, ZStream
Target Release: 13.0 (Queens)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openstack-tripleo-heat-templates-8.2.0-6.1.el7ost Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-03-14 13:55:25 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
FFU upgrade run ansible log none

Description Ronnie Rasouli 2019-02-18 10:52:35 UTC
Created attachment 1535884 [details]
FFU upgrade run ansible log

Description of problem:

FFU fails on run ffu upgrade.
error while evaluating conditional (tripleo_role_name == \\'Compute\\' and ansible_hostname == Compute[0]):
error appears to have been in \\'/var/lib/mistral/69019ca8-89a4-4741-af85-0088758c813f/fast_forward_upgrade_bootstrap_role_tasks.yaml
Version-Release number of selected component (if applicable):


How reproducible:
100%

Steps to Reproduce:
1. deploy rhos10
2. run FFU undercloud upgrade
3. prepare docker images
4. run ffu prepare step
5. run the ffu upgrade run

Actual results:
the FFU process fails with the error above.

Expected results:

The stage, step to pass with no errors

Additional info:
u'TASK [include_tasks] ***********************************************************',", " u'Sunday 17 February 2019  13:27:18 -0500 (0:00:01.428)       0:12:15.360 ******* ',", " u'fatal: [controller-2]: FAILED! => {\"msg\": \"The conditional check \\'tripleo_role_name == \\'Controller\\' and ansible_hostname == Controller[0]\\' failed. The error was: error while evaluating conditional (tripleo_role_name == \\'Controller\\' and ansible_hostname == Controller[0]): \\'Controller\\' is undefined\\\\n\\\\nThe error appears to have been in \\'/var/lib/mistral/69019ca8-89a4-4741-af85-0088758c813f/fast_forward_upgrade_bootstrap_role_tasks.yaml\\': line 1, column 3, but may\\\\nbe elsewhere in the file depending on the exact syntax problem.\\\\n\\\\nThe offending line appears to be:\\\\n\\\\n\\\\n- include_tasks: Controller/fast_forward_upgrade_tasks.yaml\\\\n  ^ here\\\\n\"}',", " u'fatal: [controller-1]: FAILED! => {\"msg\": \"The conditional check \\'tripleo_role_name == \\'Controller\\' and ansible_hostname == Controller[0]\\' failed. The error was: error while evaluating conditional (tripleo_role_name == \\'Controller\\' and ansible_hostname == Controller[0]): \\'Controller\\' is undefined\\\\n\\\\nThe error appears to have been in \\'/var/lib/mistral/69019ca8-89a4-4741-af85-0088758c813f/fast_forward_upgrade_bootstrap_role_tasks.yaml\\': line 1, column 3, but may\\\\nbe elsewhere in the file depending on the exact syntax problem.\\\\n\\\\nThe offending line appears to be:\\\\n\\\\n\\\\n- include_tasks: Controller/fast_forward_upgrade_tasks.yaml\\\\n  ^ here\\\\n\"}',", " u'fatal: [controller-0]: FAILED! => {\"msg\": \"The conditional check \\'tripleo_role_name == \\'Controller\\' and ansible_hostname == Controller[0]\\' failed. The error was: error while evaluating conditional (tripleo_role_name == \\'Controller\\' and ansible_hostname == Controller[0]): \\'Controller\\' is undefined\\\\n\\\\nThe error appears to have been in \\'/var/lib/mistral/69019ca8-89a4-4741-af85-0088758c813f/fast_forward_upgrade_bootstrap_role_tasks.yaml\\': line 1, column 3, but may\\\\nbe elsewhere in the file depending on the exact syntax problem.\\\\n\\\\nThe offending line appears to be:\\\\n\\\\n\\\\n- include_tasks: Controller/fast_forward_upgrade_tasks.yaml\\\\n  ^ here\\\\n\"}',", " u'skipping: [compute-1] => {\"changed\": false, \"skip_reason\": \"Conditional result was False\"}',", " u'skipping: [compute-0] => {\"changed\": false, \"skip_reason\": \"Conditional result was False\"}',", " u'skipping: [ceph-1] => {\"changed\": false, \"skip_reason\": \"Conditional result was False\"}',", " u'skipping: [ceph-0] => {\"changed\": false, \"skip_reason\": \"Conditional result was False\"}',", " u'skipping: [ceph-2] => {\"changed\": false, \"skip_reason\": \"Conditional result was False\"}',", " u'',", " u'TASK [include_tasks] ***********************************************************',",

Comment 1 Sofer Athlan-Guyot 2019-02-18 14:01:58 UTC
Reproduced using 

- become: true
  hosts: overcloud
  tasks:
    - debug:
        var: Controller
    - include_tasks: Controller/fast_forward_upgrade_tasks.yaml
      when: ansible_hostname == Controller[0]


Switching back to ansible 2.4 "solves" the issue.

Comment 9 errata-xmlrpc 2019-03-14 13:55:25 UTC
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-2019:0448