Bug 1423542

Summary: Include gdeploy preflight check
Product: [oVirt] cockpit-ovirt Reporter: SATHEESARAN <sasundar>
Component: GdeployAssignee: Ramesh N <rnachimu>
Status: CLOSED CURRENTRELEASE QA Contact: SATHEESARAN <sasundar>
Severity: high Docs Contact:
Priority: unspecified    
Version: 0.10.7-0.0.6CC: bugs, sabose, surs, trichard
Target Milestone: ovirt-4.1.1Flags: rule-engine: ovirt-4.1+
rule-engine: exception+
rule-engine: planning_ack+
rnachimu: devel_ack+
sasundar: testing_ack+
Target Release: 0.10.7-0.0.13   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: cockpit-ovirt-0.10.7-0.0.11 Doc Type: Enhancement
Doc Text:
Gdeploy has a script to validate basic network setup and storage configuration before deploying Gluster. This script is now included in the generated gdeploy configuration for HyperConverged deployment so that users can deploy a cleaner HyperConverged environment.
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-04-21 09:45:55 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Gluster RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1277939    

Description SATHEESARAN 2017-02-17 13:49:18 UTC
Description of problem:
-----------------------
gdeploy provides the script that checks for the following:
1. Whether the disks are GPT partitioned
2. Whether all the hosts are reachable from all other hosts

If any of the above condidion is false, gdeploy stops and doesn't proceeds
This preflight check should be added to the gdeploy configuration files generate by cockpit-gdeploy

Version-Release number of selected component (if applicable):
-------------------------------------------------------------
cockpit-ovirt-dashboard-0.10.7-0.0.6

How reproducible:
-----------------
Always

Steps to Reproduce:
-------------------
Not applicable

Actual results:
---------------
Preflight configuration check is not part of gdeploy configuration file generated by cockpit-gdeploy plugin

Expected results:
-----------------
Preflight configuration check should be part of gdeploy configuration file generated by cockpit-gdeploy plugin

Additional info:
-----------------
This configuration check is available with gdeploy-2.0.1-11.el7rhgs with effect of the bug - https://bugzilla.redhat.com/show_bug.cgi?id=1405447

Gdeploy config would go like this:

[script1]
action=execute
file=/usr/share/ansible/gdeploy/scripts/grafton-sanity-check.sh -d sdb,sdc -h host1,host2,host3
ignore_script_errors=no

Comment 1 Ramesh N 2017-02-19 17:13:57 UTC
I have added following section to the generated gdeploy configuration.

[script1]
action=execute
file=/usr/share/gdeploy/scripts/grafton-sanity-check.sh
ignore_script_errors=no

sac: Do we need to pass the host names and disk names explicitly to this script or gdeploy will figure out those details since it is available in other sections?. I am not seeing these values explicitly passed in sample config at https://github.com/gluster/gdeploy/blob/master/examples/hc.conf. Also do we need to add ignore_script_errors=no? This is also not there in the sample config.

Comment 2 Sachidananda Urs 2017-02-20 07:04:50 UTC
The syntax is something like:

[script1]
action=execute
file=/usr/share/ansible/gdeploy/scripts/grafton-sanity-check.sh -d disk1,disk2 -h host1,host2
ignore_script_errors=no

I have committed example upstream: https://github.com/gluster/gdeploy/commit/73df3720b5c5

Comment 3 Ramesh N 2017-02-20 07:15:08 UTC
(In reply to Sachidananda Urs from comment #2)
> The syntax is something like:
> 
> [script1]
> action=execute
> file=/usr/share/ansible/gdeploy/scripts/grafton-sanity-check.sh -d
> disk1,disk2 -h host1,host2
> ignore_script_errors=no
> 
> I have committed example upstream:
> https://github.com/gluster/gdeploy/commit/73df3720b5c5

Thanks Sac for confirming. I have updated the patch with host and disk list.

Comment 4 SATHEESARAN 2017-03-07 10:32:28 UTC
Tested with cockpit-ovirt-0.10.7-0.0.11

gdeploy config file includes the check for disks and hosts.

[script1]
action=execute
ignore_script_errors=no
file=/usr/share/ansible/gdeploy/scripts/grafton-sanity-check.sh -d sdb -h host1,host2,host3