Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1991682

Summary: undercloud-debug validation fails due to ceilometer.conf not available
Product: Red Hat OpenStack Reporter: Eliad Cohen <elicohen>
Component: openstack-tripleo-validationsAssignee: Jiri Podivin <jpodivin>
Status: CLOSED NOTABUG QA Contact: nlevinki <nlevinki>
Severity: low Docs Contact:
Priority: low    
Version: 16.2 (Train)CC: alfrgarc, elicohen, gchamoul, jjoyce, jpodivin, jschluet, slinaber, tvignaud
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-08-11 14:58:46 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:

Description Eliad Cohen 2021-08-09 17:17:07 UTC
Description of problem:
The validation fails because 
/var/lib/config-data/puppet-generated/ceilometer/etc/ceilometer/ceilometer.conf can't be opened (it doesn't exists).

(Should we check if a service is enabled first?)

Version-Release number of selected component (if applicable):
RHOS-16.2-RHEL-8-20210804.n.0

How reproducible:
100%

Steps to Reproduce:
1. This was ran as part of the pre-deployment validations
2.source stackrc && \
openstack tripleo validator run --group pre-deployment
3.Alternatively: openstack tripleo validator run --validation undercloud-debug

Actual results:
"item": "/var/lib/config-data/puppet-generated/ceilometer/etc/ceilometer/ceilometer.conf",

"msg": "Could not open the ini file: '/var/lib/config-data/puppet-generated/ceilometer/etc/ceilometer/ceilometer.conf'",

"value": null


Expected results:
Shouldn't check for uninstalled components

Additional info:

Comment 2 Jiri Podivin 2021-08-11 11:13:29 UTC
I have attempted to replicated the faulty behavior on my machine, unfortunately although the validation did fail, the missing file was not a the culprit. 
At this time, the undercloud-debug validation shouldn't fail when encountering any number of missing configuration files,
unless specifically requested with 'extra_args'. 

Would it be possible to get a full logs of the failed validation run? 
The logs can be accessed either directly, in the dedicated validations log directory, 
or trough the validator CLI with `validator show run <uuid>`.

Comment 3 Eliad Cohen 2021-08-11 12:08:36 UTC
(In reply to Jiri Podivin from comment #2)
> I have attempted to replicated the faulty behavior on my machine,
> unfortunately although the validation did fail, the missing file was not a
> the culprit. 
> At this time, the undercloud-debug validation shouldn't fail when
> encountering any number of missing configuration files,
> unless specifically requested with 'extra_args'. 
> 
> Would it be possible to get a full logs of the failed validation run? 
> The logs can be accessed either directly, in the dedicated validations log
> directory, 
> or trough the validator CLI with `validator show run <uuid>`.

Yes, I'm redirecting this to @alfrgarc - Alfredo can you please provide these? I lost track of this

Thanks,
Eliad

Comment 5 Jiri Podivin 2021-08-11 14:58:46 UTC
Upon inspecting the log I can confirm that the validation is operating as it should. 

The reason for the failure is not the lack of 'ceilometer.conf', 
but the presence of the value 'True' for the key 'debug' in the other config files. 

As indicated by the validation description:
-------------------------------------------
    The undercloud's openstack services should _not_ have debug enabled.
    This will check if debug is enabled on undercloud services.
    If debug is enabled, the root filesystem can fill up quickly, and
    is not a good thing.

The setting can be overriden by supplying 'extra_args' to the validation.
So it can check for different value.

Comment 6 Alfredo 2021-08-11 15:14:56 UTC
Glad to hear that this isn't a bug! Could you please specify a bit more on how we can avoid hitting this failure? You mentioned that we could supply 'extra_args', can you provide an example?

This is what the stage looks like:
infrared ssh `ir workspace node-list -g undercloud -f json | jq -r .nodes[].name` \
"source stackrc && \
openstack tripleo validator run --group pre-deployment"

Comment 7 Jiri Podivin 2021-08-16 06:21:47 UTC
In general terms all validations with defined and imported variables can be adjusted. 
This is, for obvious reasons, most apparent in case of the basic common validations, like 'check-cpu', where you can supply your own number of cpu cores, for the validation to check.

In practice it's very straightforward. The run command has an 'extra-vars' and 'extra-vars-file' args.
Both expect key/value pairs, where keys are names of the validation variables you wish to override. The formatting is explained in the CLI help output. 
The 'extra_vars_file' option is more suited for stable and larger workloads, as file is easier to manage than a dictionary in the CLI.
Plus you can decorate the file with comments, which is always a good idea.
 
In your particular case, you might want to override either the 'debug_check' or the 'services_conf_files' variable.
In your workload, almost all of the tested services seem to have the 'debug' key set to 'true'. That's why the validation fails.
This might indicate that you should adjust them, set the validations 'debug_check' variable to false, or not run the validation at all.


To give you an example of the second option: 

    (undercloud) [stack@undercloud-0 ~]$ openstack tripleo validator run --validation undercloud-debug --extra-vars debug_check=false