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:
This ansible task seems to be part of tripleo-heat-templates and not tripleo-validations.
I'll give it to Delivery, we're just lacking a new puddle with the patch, apparently.
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!
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
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.
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
I manually backported the patch - upstream CI has some issues preventing the merge.
Verified on compose RHOS_TRUNK-15.0-RHEL-8-20190619.n.1
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