Bug 1535468

Summary: OSP10 -> OSP13 FFU upgrade: upgrade_steps_playbook.yaml fails: The error was: error while evaluating conditional ((os_net_config_need_upgrade.stdout and os_net_config_has_config.rc == 0) and (step|int == 3)): 'dict object' has no attribute 'stdout'
Product: Red Hat OpenStack Reporter: Marius Cornea <mcornea>
Component: openstack-tripleo-heat-templatesAssignee: Emilien Macchi <emacchi>
Status: CLOSED ERRATA QA Contact: Marius Cornea <mcornea>
Severity: urgent Docs Contact:
Priority: high    
Version: 13.0 (Queens)CC: dbecker, jfrancoa, jschluet, mandreou, mbracho, mbultel, mburns, morazi, rhel-osp-director-maint, sathlang
Target Milestone: betaKeywords: Triaged
Target Release: 13.0 (Queens)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openstack-tripleo-heat-templates-8.0.0-0.20180304031149.el7ost Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-06-27 13:42: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:

Description Marius Cornea 2018-01-17 12:54:47 UTC
Newton -> Queens FFU upgrade: upgrade_steps_playbook.yaml fails: The error was: error while evaluating conditional ((os_net_config_need_upgrade.stdout and os_net_config_has_config.rc == 0) and (step|int == 3)): 'dict object' has no attribute 'stdout'

TASK [Check yum for rpm-python present] *******************************************************************************************************************************************************************************************************
ok: [192.168.24.9]

TASK [Fail when rpm-python wasn't present] ****************************************************************************************************************************************************************************************************
skipping: [192.168.24.9]

TASK [Check for os-net-config upgrade] ********************************************************************************************************************************************************************************************************
skipping: [192.168.24.9]

TASK [Check that os-net-config has configuration] *********************************************************************************************************************************************************************************************
skipping: [192.168.24.9]

TASK [Upgrade os-net-config] ******************************************************************************************************************************************************************************************************************
fatal: [192.168.24.9]: FAILED! => {"failed": true, "msg": "The conditional check '(os_net_config_need_upgrade.stdout and os_net_config_has_config.rc == 0) and (step|int == 3)' failed. The error was: error while evaluating conditional ((os_net_config_need_upgrade.stdout and os_net_config_has_config.rc == 0) and (step|int == 3)): 'dict object' has no attribute 'stdout'\n\nThe error appears to have been in '/home/stack/tripleo-40rIhX-config/Controller/upgrade_tasks.yaml': line 711, column 5, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n- block:\n - name: Upgrade os-net-config\n ^ here\n"}

The 'Upgrade os-net-config' task relies on os_net_config_need_upgrade.stdout to evaluate the when condition but the os_net_config_need_upgrade only gets registered at step 3 https://github.com/openstack/tripleo-heat-templates/blob/master/puppet/services/tripleo-packages.yaml#L55-L58 so the 'Upgrade os-net-config' task fails at any other step different than 3 as the os_net_config_need_upgrade var is undefined.

Attaching the rendered playbook as well: http://paste.openstack.org/show/646503/

Comment 2 Marios Andreou 2018-01-24 12:51:00 UTC
This is the same issue as reported in BZ  1535457 but for a different service, so the fix in https://review.openstack.org/#/c/536851/ applies here too (in this particular case, https://review.openstack.org/#/c/536851/1/puppet/services/tripleo-packages.yaml ). We might also consider the alternative of removing the step condition from the tasks that are registering the variable. Marking BZ triaged and assigning to lbezdick since he is working on /#/c/536851/

Comment 12 errata-xmlrpc 2018-06-27 13:42: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/RHEA-2018:2086