Bug 1535442 - OSP10 -> OSP13 FFU upgrade: upgrade_steps_playbook.yaml fails: The error was: error while evaluating conditional ((httpd_enabled.rc == 0) and (httpd_running.rc == 0) and (step|int == 2)): 'httpd_enabled' is undefined
Summary: OSP10 -> OSP13 FFU upgrade: upgrade_steps_playbook.yaml fails: The error was:...
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-tripleo-common
Version: 13.0 (Queens)
Hardware: Unspecified
OS: Unspecified
Target Milestone: beta
: 13.0 (Queens)
Assignee: Ryan Brady
QA Contact: Alexander Chuzhoy
Depends On:
TreeView+ depends on / blocked
Reported: 2018-01-17 12:03 UTC by Marius Cornea
Modified: 2018-06-27 13:43 UTC (History)
12 users (show)

Fixed In Version: openstack-tripleo-common-8.4.1-0.20180224032817.d51ed49.el7ost
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2018-06-27 13:42:25 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Launchpad 1743758 0 None None None 2018-01-17 12:03:01 UTC
OpenStack gerrit 529369 0 None master: MERGED tripleo-common: Remove step_tags_to_when from config download and fix sorting (I68c032c5f23393a77109f182541cc6bfcc019a41... 2018-03-21 18:43:18 UTC
Red Hat Product Errata RHEA-2018:2086 0 None None None 2018-06-27 13:43:05 UTC

Description Marius Cornea 2018-01-17 12:03:01 UTC
Description of problem:

OSP10 -> OSP13 FFU upgrade: upgrade_steps_playbook.yaml fails: The error was: error while evaluating conditional ((httpd_enabled.rc == 0) and (httpd_running.rc == 0) and (step|int == 2)): 'httpd_enabled' is undefined

The problems is caused by the upgrade tasks with 'common' tags are rendered _after_ the tasks which use conditions including variables registered by the 'common' tasks.

In this particular case the failure shows:

TASK [Stop and disable aodh service (running under httpd)] ************************************************************************************************************************************************************************************
fatal: []: FAILED! => {"failed": true, "msg": "The conditional check '(httpd_enabled.rc == 0) and (httpd_running.rc == 0) and (step|int == 2)' failed. The error was: error while evaluating conditional ((httpd_enabled.rc == 0) and (httpd_running.rc == 0) and (step|int == 2)): 'httpd_enabled' is undefined\n\nThe error appears to have been in '/home/stack/tripleo-40rIhX-config/Controller/upgrade_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- name: Stop and disable aodh service (running under httpd)\n ^ here\n"}

We can see the content of the playbook here: http://paste.openstack.org/show/646497/

The first task( Stop and disable aodh service (running under httpd)) has the following condition:
when: (httpd_enabled.rc == 0) and (httpd_running.rc == 0) and (step|int == 2)

Nor httpd_enabled or are httpd_running defined at this point. They are defined at line 496 and line 501 respectively.

We need to run the tasks with 'common' tags before the reset of the tasks so the vars registered in 'common' tasks are available.

Comment 2 Marios Andreou 2018-01-23 16:57:54 UTC
o/ took this one for triage during the call yesterday. I think the change at https://review.openstack.org/#/c/529369/ is relevant **. From yesterday the output looks like (while it lasts) http://paste.openstack.org/raw/650076/ - scroll to bottom for example sorted_tasks. 

Tasks without a 'when' (like the common ones) come first, then ordering is on the step value.

I will mark as triaged and attach that review for now thanks.

** there is another ordering issue, being addressed by https://review.openstack.org/#/c/536851/ but going on comment #0 here I think /#/c/529369/ is more relevant in this case.

Comment 11 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.


Note You need to log in before you can comment on or make changes to this bug.