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

Bug 1462500

Summary: Add a check that ovirt_env_name is a valid OpenShift namespace identifier
Product: [oVirt] ovirt-engine-metrics Reporter: Shirly Radco <sradco>
Component: RFEsAssignee: Shirly Radco <sradco>
Status: CLOSED CURRENTRELEASE QA Contact: Lukas Svaty <lsvaty>
Severity: medium Docs Contact:
Priority: medium    
Version: 1.0.4.2CC: bugs, didi, lsvaty, lveyde, pstehlik, rmeggins, sradco, trichard, ylavi
Target Milestone: ovirt-4.1.5Keywords: FutureFeature
Target Release: 1.0.6Flags: rule-engine: ovirt-4.1?
rule-engine: planning_ack?
rule-engine: devel_ack+
lsvaty: testing_ack+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ovirt-engine-metrics-1.0.6 Doc Type: Enhancement
Doc Text:
This release adds checks to the ovirt_env_name, to make sure it is a valid OpenShift namespace identifier. If it is not, the metrics script will now fail. The name must be valid in order for the records to be kept by the Elasticsearch running in OpenShift.
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-08-23 08:01:31 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Metrics RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1419858    
Bug Blocks: 1402901, 1475125    

Description Shirly Radco 2017-06-18 07:22:52 UTC
Description of problem:

ovirt_env_name - must be a valid OpenShift namespace identifier - alphanum + "-" character, cannot begin with "-" or a number, and cannot end with a “-”, up to 49 characters.
The length is opentshift limitation for the total text length. Total length should be up to 63 characters. "ovirt-metrics-" prefix is 14 characters.

We should add a validation that checks ovirt_env_name length and fails the ansible script if name does not follow the above limitation

Comment 1 Lukas Svaty 2017-07-25 09:18:24 UTC
Also you should note somewhere (comment in config.yml) about the prefix, without it people wont be aware there is any, except for logs in metrics, and would have to change namespaces.

Comment 2 Shirly Radco 2017-07-25 11:21:22 UTC
The user does not need to add a prefix. We add it.
I will add a comment with the prefixes that we add.

Comment 3 Shirly Radco 2017-07-26 13:13:18 UTC
Lukas, Please review the PR:
https://github.com/oVirt/ovirt-site/pull/1097/files

Comment 4 Lukas Svaty 2017-07-28 10:28:05 UTC
Commented inside PR. 

Few more comments:
- inside the document you are have diferent z-stream versions, I would prefer just to use y-stream version 4.1 so we wont have to change it.
- fqdn/of/engine/machine -> should rather be fqdn-of-engine-machine - its a hostname not path
- In the end "It should finish without errors." I would also mention "collectd and fluentd services should be running", this does not make user to check it however in case of issue they are able to debug it.

Comment 5 Lukas Svaty 2017-08-03 15:51:45 UTC
verified in ovirt-engine-metrics-1.0.6-1.el7ev.noarch

Comment 6 Tahlia Richardson 2017-08-30 07:13:38 UTC
> ovirt_env_name must be a valid OpenShift namespace identifier in order for 
> the records to be kept to the elasticsearch that is running in OpenShift.

Hi Shirly, looking at this again before we publish the Release Notes book, I'm not quite sure what the technical meaning is meant to be here (I'm not familiar with Elasticsearch, but looking it up suggests it searches rather than stores - I may be wrong). 

Does this mean:
* The name must be valid in order for the records to be kept by the Elasticsearch running on OpenShift"? 
* "The name must be valid in order for metrics to be gathered by the Elasticsearch running on Openshift"? 
* Something else?

Comment 7 Shirly Radco 2017-09-03 09:22:56 UTC
(In reply to Tahlia Richardson from comment #6)
> > ovirt_env_name must be a valid OpenShift namespace identifier in order for 
> > the records to be kept to the elasticsearch that is running in OpenShift.
> 
> Hi Shirly, looking at this again before we publish the Release Notes book,
> I'm not quite sure what the technical meaning is meant to be here (I'm not
> familiar with Elasticsearch, but looking it up suggests it searches rather
> than stores - I may be wrong). 
> 
> Does this mean:
> * The name must be valid in order for the records to be kept by the
> Elasticsearch running on OpenShift"? 

That is correct.

> * "The name must be valid in order for metrics to be gathered by the
> Elasticsearch running on Openshift"? 
> * Something else?