This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 1462500 - Add a check that ovirt_env_name is a valid OpenShift namespace identifier
Add a check that ovirt_env_name is a valid OpenShift namespace identifier
Status: CLOSED CURRENTRELEASE
Product: ovirt-engine-metrics
Classification: oVirt
Component: RFEs (Show other bugs)
1.0.4.2
Unspecified Unspecified
medium Severity medium
: ovirt-4.1.5
: 1.0.6
Assigned To: Shirly Radco
Lukas Svaty
: FutureFeature
Depends On: 1419858
Blocks: oVirt-Metrics-and-Logs 1475125
  Show dependency treegraph
 
Reported: 2017-06-18 03:22 EDT by Shirly Radco
Modified: 2017-09-03 05:22 EDT (History)
9 users (show)

See Also:
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 04:01:31 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: Metrics
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
rule-engine: ovirt‑4.1?
rule-engine: planning_ack?
rule-engine: devel_ack+
lsvaty: testing_ack+


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
oVirt gerrit 79268 ovirt-engine-metrics-4.1 MERGED validate ovirt_env_name 2017-07-12 05:13 EDT
oVirt gerrit 79319 ovirt-engine-metrics-4.1 MERGED validate ovirt_env_name 2017-07-12 05:37 EDT
oVirt gerrit 79490 master MERGED added the ovirt_env_name to fail messages 2017-07-20 09:41 EDT
oVirt gerrit 79644 ovirt-engine-metrics-4.1 MERGED added the ovirt_env_name to fail messages 2017-07-20 10:14 EDT

  None (edit)
Description Shirly Radco 2017-06-18 03:22:52 EDT
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 05:18:24 EDT
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 07:21:22 EDT
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 09:13:18 EDT
Lukas, Please review the PR:
https://github.com/oVirt/ovirt-site/pull/1097/files
Comment 4 Lukas Svaty 2017-07-28 06:28:05 EDT
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 11:51:45 EDT
verified in ovirt-engine-metrics-1.0.6-1.el7ev.noarch
Comment 6 Tahlia Richardson 2017-08-30 03:13:38 EDT
> 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 05:22:56 EDT
(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.