Bug 1686357 - [gluster-ansible] Fail at the very beginning, when pre-requisites for RHHI-V deployment is not met
Summary: [gluster-ansible] Fail at the very beginning, when pre-requisites for RHHI-V ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Gluster Storage
Classification: Red Hat Storage
Component: rhhi
Version: unspecified
Hardware: x86_64
OS: Linux
high
medium
Target Milestone: ---
: RHHI-V 1.6.z Async Update
Assignee: Sachidananda Urs
QA Contact: bipin
URL:
Whiteboard:
Depends On: 1686359 1724035
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-03-07 10:20 UTC by SATHEESARAN
Modified: 2019-10-03 12:24 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Previously, when deployment checks failed, deployment failed after some time instead of failing immediately. The checking method has changed so that any unmet prerequisites stop the deployment process immediately.
Clone Of:
: 1686359 1724035 (view as bug list)
Environment:
Last Closed: 2019-10-03 12:23:57 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2019:2963 0 None None None 2019-10-03 12:24:06 UTC

Description SATHEESARAN 2019-03-07 10:20:25 UTC
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

Comment 1 SATHEESARAN 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.

Comment 2 SATHEESARAN 2019-03-07 17:11:32 UTC
(In reply to SATHEESARAN from comment #1)
> 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.

As I got the information from Gobinda, this variable is already in the play, 
but still the play doesn't stop on encountering error on one of the host

Comment 3 SATHEESARAN 2019-03-07 17:12:51 UTC
This issue is not a high severity one, as the playbook ends up in failure, but the concern is that failure is late.
So targeting this bug for rhhi-1.7

Comment 4 Sachidananda Urs 2019-03-28 05:44:10 UTC
@sas, can you please try the solution we discussed yesterday?
Set, max_fail_percentage to 1 and any_errors_fatal: true

Comment 5 SATHEESARAN 2019-04-26 17:11:35 UTC
(In reply to Sachidananda Urs from comment #4)
> @sas, can you please try the solution we discussed yesterday?
> Set, max_fail_percentage to 1 and any_errors_fatal: true

The problem statement now looks different, its not about failing early. But check like non-512B disk, /var/log space constraint check
should happen at the very beginning and it should fail immediately, when the setup is not eligible for RHHI-V deployment

Comment 6 Sachidananda Urs 2019-04-29 03:45:35 UTC
(In reply to SATHEESARAN from comment #5)
> (In reply to Sachidananda Urs from comment #4)
> > @sas, can you please try the solution we discussed yesterday?
> > Set, max_fail_percentage to 1 and any_errors_fatal: true
> 
> The problem statement now looks different, its not about failing early. But
> check like non-512B disk, /var/log space constraint check
> should happen at the very beginning and it should fail immediately, when the
> setup is not eligible for RHHI-V deployment

sas, the pre-requisites are run first before any deployment starts.

Comment 7 Sahina Bose 2019-05-07 14:10:13 UTC
Sachi, I did notice the FQDN check was executed after the brick creation. Could the same be true for other validations too?

Comment 8 Sachidananda Urs 2019-05-07 14:27:33 UTC
(In reply to Sahina Bose from comment #7)
> Sachi, I did notice the FQDN check was executed after the brick creation.
> Could the same be true for other validations too?

Sahina yes. The FQDN and other pre-requisite checks we do are for RHHI deployments.
And brick creation is part of backend-setup role, which executes first then the role related to RHHI run.
If we put the pre-requisites as part of backend-setup role (which is run first), there might be users
who would not want these pre-requisites while setting up backend.

What is the expectation here?

Comment 9 SATHEESARAN 2019-05-14 01:45:57 UTC
(In reply to Sachidananda Urs from comment #8)
> (In reply to Sahina Bose from comment #7)
> > Sachi, I did notice the FQDN check was executed after the brick creation.
> > Could the same be true for other validations too?
> 
> Sahina yes. The FQDN and other pre-requisite checks we do are for RHHI
> deployments.
> And brick creation is part of backend-setup role, which executes first then
> the role related to RHHI run.
> If we put the pre-requisites as part of backend-setup role (which is run
> first), there might be users
> who would not want these pre-requisites while setting up backend.
> 
> What is the expectation here?

Sac,

The point is that preliminary checks decide whether the systems are reliable for RHHI-V installation.
These checks should be run before configuring anything on the system.

One and only if these checks are passed, configuration step should be initiated.
We need to satisfy this requirement

Comment 10 Sachidananda Urs 2019-05-14 04:44:28 UTC
sas, please setup a meeting with RHHI team (QE and devel) to come to an understand about this requirement. If we add RHHI specific pre-req to backend setup, we are limiting a lot of people who do not use RHHI.

Instead we have to implement these pre-requisites as pre_tasks in playbooks than in roles.

Comment 11 SATHEESARAN 2019-05-14 06:07:52 UTC
(In reply to Sachidananda Urs from comment #10)
> sas, please setup a meeting with RHHI team (QE and devel) to come to an
> understand about this requirement. If we add RHHI specific pre-req to
> backend setup, we are limiting a lot of people who do not use RHHI.
> 
> Instead we have to implement these pre-requisites as pre_tasks in playbooks
> than in roles.

Agreed! We have to discuss about that and finalize it

Comment 13 SATHEESARAN 2019-05-15 06:57:10 UTC
(In reply to SATHEESARAN from comment #11)
> (In reply to Sachidananda Urs from comment #10)
> > sas, please setup a meeting with RHHI team (QE and devel) to come to an
> > understand about this requirement. If we add RHHI specific pre-req to
> > backend setup, we are limiting a lot of people who do not use RHHI.
> > 
> > Instead we have to implement these pre-requisites as pre_tasks in playbooks
> > than in roles.
> 
> Agreed! We have to discuss about that and finalize it

It was decided after the discussion to have the prechecks in the form of
ansible prechecks

Comment 14 Sachidananda Urs 2019-05-15 07:01:36 UTC
(In reply to SATHEESARAN from comment #13)
> (In reply to SATHEESARAN from comment #11)
> > (In reply to Sachidananda Urs from comment #10)
> > > sas, please setup a meeting with RHHI team (QE and devel) to come to an
> > > understand about this requirement. If we add RHHI specific pre-req to
> > > backend setup, we are limiting a lot of people who do not use RHHI.
> > > 
> > > Instead we have to implement these pre-requisites as pre_tasks in playbooks
> > > than in roles.
> > 
> > Agreed! We have to discuss about that and finalize it
> 
> It was decided after the discussion to have the prechecks in the form of
> ansible prechecks

sas, I didn't get your point. This is what we decided to add the checks to pre_tasks.

Comment 15 SATHEESARAN 2019-05-15 08:37:55 UTC
(In reply to Sachidananda Urs from comment #14)
> sas, I didn't get your point. This is what we decided to add the checks to
> pre_tasks.

I just update this ticket to be consistent with information that we discussed.
Nothing more

Comment 18 SATHEESARAN 2019-06-26 06:14:48 UTC
The dependent gluster-ansible bug is verified, but this bug still available in RHHI-V, 
as the deployment module - cockpit-ovirt - needs to bring in this change

cockpit-ovirt bug - https://bugzilla.redhat.com/show_bug.cgi?id=1724035 have to be fixed

Comment 19 SATHEESARAN 2019-07-30 10:18:17 UTC
The dependent bug is on POST state

Comment 20 bipin 2019-08-27 07:44:22 UTC
Tested the bug with cockpit-ovirt-dashboard-0.13.6-1.el7ev.noarch.
The preflight check has been moved to ansible pre task, so moving the bug as verified.

Comment 22 errata-xmlrpc 2019-10-03 12:23:57 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/RHBA-2019:2963


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