Description of problem: ----------------------- gluster-ansible roles executes even after the error is encountered. For example, 512b validation has failed on the disk and ansible task of creating thinpool, lv, creating XFS, just continues even though it identified that the disk is not suitable for RHHI deployment Version-Release number of selected component (if applicable): -------------------------------------------------------------- cockpit-ovirt-dashboard-0.12.4 How reproducible: ------------------ Always Steps to Reproduce: ------------------- 1. Provide a non 512b logical-sized brick for RHHI deployment Actual results: --------------- thinpool creation, lv creation, and XFS creation happens on the disk, eventhoughh the flow identifies that the disk is not suitable for RHHI deployment Expected results: ----------------- Ansible flow should abort further tasks execution once it finds out an error in the deployment --- Additional comment from SATHEESARAN on 2019-03-07 10:22:40 UTC --- Ansible has this option to abort the execution on failure. Thanks Sac for letting us know about it. https://docs.ansible.com/ansible/latest/user_guide/playbooks_error_handling.html#aborting-the-play 'any_errors_fatal: true' aborts the execution of any other tasks, once the error is encountered.
The discussion keep happening in the dependent bug, the last comment is to test with max_fail_percentage to 1 and any_errors_fatal: true
@sas Have you got chance to test with max_fail_percentage: 1 ?
(In reply to Gobinda Das from comment #2) > @sas Have you got chance to test with max_fail_percentage: 1 ? Looks like all these prechecks are defined as part of ansible pretasks. This change will be in gluster-ansible component of RHGS. I will move this bug accordingly
https://github.com/gluster/gluster-ansible/pull/70 https://github.com/gluster/gluster-ansible-features/pull/27
Test case for this bug will involve: 1. Make sure all the pre-check fails much ahead before real deployment rather than attempting for deployment and then failing during deployment
Tested with RHVH 4.3.5 + RHEL 7.7 + RHGS 3.4.4 ( interim build - glusterfs-6.0-6 ) with ansible 2.8.1-1 with: gluster-ansible-features-1.0.5-2.el7rhgs.noarch gluster-ansible-roles-1.0.5-2.el7rhgs.noarch gluster-ansible-infra-1.0.4-3.el7rhgs.noarch Pre-flight tests are now moved in ansible pre-tasks
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:2557