Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1707306

Summary: Forward logging to haproxy.log file task failing in dry-run mode
Product: Red Hat OpenStack Reporter: Victor Voronkov <vvoronko>
Component: openstack-tripleo-heat-templatesAssignee: Cédric Jeanneret <cjeanner>
Status: CLOSED ERRATA QA Contact: Victor Voronkov <vvoronko>
Severity: high Docs Contact:
Priority: medium    
Version: 15.0 (Stein)CC: bperkins, cjeanner, gchamoul, jjoyce, jschluet, mburns, mcornea, ramishra, slinaber, tvignaud
Target Milestone: betaKeywords: Triaged, ZStream
Target Release: 15.0 (Stein)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openstack-tripleo-heat-templates-10.5.1-0.20190606110437.b9992d9.el8ost Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-09-21 11:21:58 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 Victor Voronkov 2019-05-07 08:59:32 UTC
Description of problem:
Running deployment in dry run mode (only validating config files without actually deploying, performed by running ansible playbooks in check mode) fails while trying to run Forward logging to haproxy.log file task, here the log:

TASK [Forward logging to haproxy.log file] *************************************
fatal: [controller-2]: FAILED! => {"msg": "The conditional check 'rsyslog_config.rc == 0' failed. The error was: error while evaluating conditional (rsyslog_config.rc == 0): 'dict object' has no attribute 'rc'\n\nThe error appears to have been in '/home/stack/config-download/Controller/host_prep_tasks.yaml': line 479, 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  - blockinfile:\n    ^ here\n"}

Version-Release number of selected component (if applicable):


How reproducible:
Run overcloud deployment with dry-run flag

Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Gaël Chamoulaud 2019-05-07 09:15:04 UTC
This ansible task seems to be part of tripleo-heat-templates and not tripleo-validations.

Comment 2 Cédric Jeanneret 2019-05-07 09:17:51 UTC
I'll give it to Delivery, we're just lacking a new puddle with the patch, apparently.

Comment 4 Cédric Jeanneret 2019-05-07 09:28:03 UTC
Dear ReleaseDelivery Team,

basically we need a new stable puddle in order to ensure this commit is present for Phase1 tests:
https://code.engineering.redhat.com/gerrit/#/c/167995/

The tests are currently using "Latest=core_puddle_version": "RHOS_TRUNK-15.0-RHEL-8-20190426.n.1" and it apparently doesn't have the wanted patch.

Care to tell us when a new release is done?

Thanks!

Comment 5 Victor Voronkov 2019-05-13 06:10:36 UTC
Dry run continues to fail on RHOS_TRUNK-15.0-RHEL-8-20190509.n.1

Looks like additional condition fails in block at config-download/Controller/host_prep_tasks.yaml line 525: 
  when: rsyslog_config.rc == 0

Here is the log:
...
TASK [Forward logging to haproxy.log file] *************************************
fatal: [controller-0]: FAILED! => {"msg": "The conditional check 'rsyslog_config.rc == 0' failed. The error was: error while evaluating conditional (rsyslog_config.rc == 0): 'dict object' has no attribute 'rc'\n\nThe error appears to be in '/home/stack/config-download/Controller/host_prep_tasks.yaml': line 507, 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  - blockinfile:\n    ^ here\n"}
fatal: [controller-1]: FAILED! => {"msg": "The conditional check 'rsyslog_config.rc == 0' failed. The error was: error while evaluating conditional (rsyslog_config.rc == 0): 'dict object' has no attribute 'rc'\n\nThe error appears to be in '/home/stack/config-download/Controller/host_prep_tasks.yaml': line 507, 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  - blockinfile:\n    ^ here\n"}
fatal: [controller-2]: FAILED! => {"msg": "The conditional check 'rsyslog_config.rc == 0' failed. The error was: error while evaluating conditional (rsyslog_config.rc == 0): 'dict object' has no attribute 'rc'\n\nThe error appears to be in '/home/stack/config-download/Controller/host_prep_tasks.yaml': line 507, 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  - blockinfile:\n    ^ here\n"}
skipping: [compute-0]
skipping: [compute-1]

NO MORE HOSTS LEFT *************************************************************

PLAY RECAP *********************************************************************
compute-0                  : ok=79   changed=32   unreachable=0    failed=0    skipped=172  rescued=0    ignored=3   
compute-1                  : ok=79   changed=32   unreachable=0    failed=0    skipped=172  rescued=0    ignored=3   
controller-0               : ok=113  changed=58   unreachable=0    failed=1    skipped=137  rescued=0    ignored=3   
controller-1               : ok=113  changed=58   unreachable=0    failed=1    skipped=137  rescued=0    ignored=3   
controller-2               : ok=113  changed=58   unreachable=0    failed=1    skipped=137  rescued=0    ignored=3   
undercloud                 : ok=3    changed=0    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0

Comment 6 Cédric Jeanneret 2019-05-13 06:27:56 UTC
Care to check the host_prep_tasks.yaml content? especially around line 525... Would be good to ensure you have the 2 conditions that should prevent this issue.

Also, having a proper way to run this dry-run at will would be good. I didn't find any doc on a way to get the thing you're doing.

Comment 7 Cédric Jeanneret 2019-05-13 07:54:17 UTC
After some more discussions, it appears the tested env is with HA, involving pacemaker. This involves a second template from t-h-t that was overlooked: deployment/haproxy/haproxy-pacemaker-puppet.yaml

The following patch should help in this case: https://review.opendev.org/658742

Comment 8 Cédric Jeanneret 2019-05-29 12:02:45 UTC
I manually backported the patch - upstream CI has some issues preventing the merge.

Comment 12 Victor Voronkov 2019-06-25 20:55:33 UTC
Verified on compose RHOS_TRUNK-15.0-RHEL-8-20190619.n.1

Comment 14 errata-xmlrpc 2019-09-21 11:21:58 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-2019:2811