Bug 1630975

Summary: [RFE] Validate group_vars at the beginning of the playbook invocation.
Product: [Red Hat Storage] Red Hat Ceph Storage Reporter: Christina Meno <gmeno>
Component: Ceph-AnsibleAssignee: Andrew Schoen <aschoen>
Status: CLOSED ERRATA QA Contact: Vasishta <vashastr>
Severity: high Docs Contact: Bara Ancincova <bancinco>
Priority: high    
Version: 3.2CC: anharris, aschoen, ceph-eng-bugs, gmeno, hnallurv, kdreyer, nthomas, sankarshan, shan
Target Milestone: rcKeywords: FutureFeature
Target Release: 3.2   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: RHEL: ceph-ansible-3.2.0-0.1.rc2.el7cp Ubuntu: ceph-ansible_3.2.0~rc2-2redhat1 Doc Type: Enhancement
Doc Text:
.Variables are now validated at the beginning of an invocation of `ceph-ansible` playbooks The `ceph-ansible` utility now validates variables specified in configuration files located in the `group_vars` or `host_vars` directories at the beginning of playbooks invocation. This change makes it easier to discover misconfigured variables.
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-01-03 19:01:53 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:
Bug Depends On: 1635314, 1638325, 1648168, 1719023    
Bug Blocks: 1629656    

Description Christina Meno 2018-09-19 15:50:18 UTC
Description of problem:

When the user mis-configures variables they will sometimes wait 10s of minutes before discovering the error and many times the error is not clear.

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

How reproducible:
100%

Steps to Reproduce:
1. Enable non-default config and skip a step
2. invoke playbook
3. observe description

Actual results:
playbook runs for more than a minute and appears to be working.
then the playbook halts due to misconfig in step 2.

Expected results:
playbook invocation runs for a minute or less and fails with mis-configurations before making changes to the system

Additional info:
https://github.com/ceph/ceph-ansible/pull/2555

Comment 3 Ken Dreyer (Red Hat) 2018-10-02 18:28:25 UTC
For the initial v3.2.0beta2 ceph-ansible builds, I forgot to add the python-notario dependency to ceph-ansible.spec and debian/control downstream. I'll fix that after the next ceph-ansible upstream tag (probably 3.2.0beta3).

Comment 5 Vasishta 2018-10-30 08:26:11 UTC
Hi,

While trying to bring up containerized cluster though playbook is failing in step ceph-validate : validate provided configuration trying to validate ceph_repository_type. 

msg- Validation failed for variable: ceph_repository_type\n[magna024] Reason: ceph_repository_type must be either 'cdn' or 'iso'\n[magna024] Given value for ceph_repository_type: dummy"

I think we don't need to validate the repository type when user wants containerized scenario. Please let me know your views.

Moving back to ASSIGNED state.


Regards,
Vasishta Shatsry
QE, Ceph

Comment 6 Andrew Schoen 2018-10-31 15:28:58 UTC
Upstream pull request opened at https://github.com/ceph/ceph-ansible/pull/3287

Comment 14 Vasishta 2018-12-06 16:03:38 UTC
All planned testcases are completed.
Issue found during testing 
> Bug 1648168 - ceph-validate : devices are not validated in non-collocated and lvm_batch scenario

is being release noted as known issue.

Moving this RFE to VERIFIED state.

Comment 16 errata-xmlrpc 2019-01-03 19:01:53 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:0020