Bug 1462500 - Add a check that ovirt_env_name is a valid OpenShift namespace identifier
Summary: Add a check that ovirt_env_name is a valid OpenShift namespace identifier
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine-metrics
Classification: oVirt
Component: RFEs
Version: 1.0.4.2
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ovirt-4.1.5
: 1.0.6
Assignee: Shirly Radco
QA Contact: Lukas Svaty
URL:
Whiteboard:
Depends On: 1419858
Blocks: oVirt-Metrics-and-Logs 1475125
TreeView+ depends on / blocked
 
Reported: 2017-06-18 07:22 UTC by Shirly Radco
Modified: 2017-09-03 09:22 UTC (History)
9 users (show)

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.
Clone Of:
Environment:
Last Closed: 2017-08-23 08:01:31 UTC
oVirt Team: Metrics
Embargoed:
rule-engine: ovirt-4.1?
rule-engine: planning_ack?
rule-engine: devel_ack+
lsvaty: testing_ack+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 79268 0 ovirt-engine-metrics-4.1 MERGED validate ovirt_env_name 2017-07-12 09:13:39 UTC
oVirt gerrit 79319 0 ovirt-engine-metrics-4.1 MERGED validate ovirt_env_name 2017-07-12 09:37:31 UTC
oVirt gerrit 79490 0 master MERGED added the ovirt_env_name to fail messages 2017-07-20 13:41:05 UTC
oVirt gerrit 79644 0 ovirt-engine-metrics-4.1 MERGED added the ovirt_env_name to fail messages 2017-07-20 14:14:08 UTC

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?


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