Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1869390

Summary: metrics role: redis service is not available on RHEL-7 or RHEL-6
Product: Red Hat Enterprise Linux 8 Reporter: Jan Kurik <jkurik>
Component: rhel-system-rolesAssignee: Pavel Cahyna <pcahyna>
Status: CLOSED ERRATA QA Contact: Jan Kurik <jkurik>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 8.3CC: pcahyna
Target Milestone: rcKeywords: Rebase
Target Release: 8.3Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: role:metrics
Fixed In Version: rhel-system-roles-1.0-18.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-11-04 04:03:58 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 Jan Kurik 2020-08-17 19:32:48 UTC
Description of problem:
When running a playbook with rhel-system-roles.metrics role on RHEL-7 or RHEL-6, ansible reports missing redis service

Version-Release number of selected component (if applicable):
* RHEL_7_8 or RHEL_6_10
* ansible-2.8 or ansible-2.9
* rhel-system-roles-1.0-16

How reproducible:
* Always

Steps to Reproduce:
1. On a system running the minimal rhel-7.8 or rhel-6.10 image install ansible 2.8 or ansible-2.9
2. Create a playbook using linux-system-roles.metrics role
3. Run the playbook


Actual results:
TASK [linux-system-roles.metrics : Ensure scalable query service is running and enabled on boot] ***
task path: /tmp/tmp.Q46FZPCbOz/roles/rhel-system-roles.metrics/tasks/redis.yml:4
fatal: [image.qcow2]: FAILED! => {"changed": false, "msg": "Could not find the requested service redis: host"}

Expected results:
The role works on RHEL_7_8 as well as on RHEL_6_10 with ansible-2.8 or ansible-2.9

Additional info:
IMO the issue is caused by missing/disabled repo where redis is located. On RHEL-7 as well as on RHEL-6 the repo is "epel" which is not enabled by default. The repo needs to be explicitly enabled, before usage in the role.

Comment 1 Pavel Cahyna 2020-08-18 11:15:29 UTC
I am not sure that enabling an unsupported repo is desirable in RHEL. We have no precedent for this in other system roles AFAIK, they are meant to configure RHEL, not an unsupported add-on like EPEL.

Comment 2 Jan Kurik 2020-08-18 11:54:47 UTC
(In reply to Pavel Cahyna from comment #1)
> I am not sure that enabling an unsupported repo is desirable in RHEL. We
> have no precedent for this in other system roles AFAIK, they are meant to
> configure RHEL, not an unsupported add-on like EPEL.

One possible solution I discussed with Nathan is to support only the basic metric role on all the RHELs, and have the "graph" and "query" scenarios supported on RHEL >= 8 only.
This solution reflects the availability of redis & grafana packages in different versions of RHEL.

Comment 3 Pavel Cahyna 2020-08-18 15:47:06 UTC
(In reply to Jan Kurik from comment #2)
> One possible solution I discussed with Nathan is to support only the basic
> metric role on all the RHELs, and have the "graph" and "query" scenarios
> supported on RHEL >= 8 only.

This solution would not require any code change, only clarification of support status in documentation?

Comment 4 Jan Kurik 2020-08-18 15:58:53 UTC
Right, no code changes are required if we document this as requirements constrains.
Will the "Role Variables" section documenting "metrics_graph_service" and "metrics_query_service" variables in https://github.com/linux-system-roles/metrics/blob/master/README.md be the right place ?

Comment 5 Nathan Scott 2020-08-19 06:20:58 UTC
(In reply to Jan Kurik from comment #4)
> Right, no code changes are required if we document this as requirements
> constrains.
> Will the "Role Variables" section documenting "metrics_graph_service" and
> "metrics_query_service" variables in
> https://github.com/linux-system-roles/metrics/blob/master/README.md be the
> right place ?

+1 seems like a good place to me.

Comment 6 Pavel Cahyna 2020-08-19 08:34:34 UTC
A "Limitations" section could be added for this, example https://github.com/linux-system-roles/firewall#limitations

Comment 7 Pavel Cahyna 2020-08-19 08:36:39 UTC
In addition to documentation it is needed to change the tests so they don't keep failing on RHEL-7 and RHEL-6.

Comment 8 Pavel Cahyna 2020-08-20 09:14:40 UTC
I added it to Requirements.

Comment 11 Jan Kurik 2020-08-31 11:02:59 UTC
Verified on rhel-system-roles-1.0-19.el8 build.

Comment 14 errata-xmlrpc 2020-11-04 04:03:58 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 (rhel-system-roles bug fix and enhancement update), 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/RHEA-2020:4809