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

Bug 1897731

Summary: logging must gather should use fully qualified resource names
Product: OpenShift Container Platform Reporter: Matthew Robson <mrobson>
Component: LoggingAssignee: Matthew Robson <mrobson>
Status: CLOSED ERRATA QA Contact: Anping Li <anli>
Severity: high Docs Contact: Rolfe Dlugy-Hegwer <rdlugyhe>
Priority: unspecified    
Version: 4.6CC: anli, aos-bugs, jcantril, periklis, rdlugyhe
Target Milestone: ---   
Target Release: 4.7.0   
Hardware: All   
OS: All   
Whiteboard: logging-core
Fixed In Version: Doc Type: Bug Fix
Doc Text:
* Previously, if a cluster had multiple custom resources with the same name, the resource would get selected alphabetically when not fully qualified with the API group. As a result, if you installed both Red Hat’s OpenShift Elasticsearch Operator alongside the OpenShift Elasticsearch Operator, you would see failures when collected data via a must-gather report. The current release fixes this issue by ensuring must-gathers now use the full API group when gathering information about the cluster's custom resources. (link:https://bugzilla.redhat.com/show_bug.cgi?id=1897731[*BZ#1897731*])
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-02-24 11:22:27 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 Matthew Robson 2020-11-13 22:09:26 UTC
Description of problem:

In case there is a duplicate CR of the same name, it gets selected alphabetically when not fully qualified.

-- Gather Elasticsearch CR
Error from server (NotFound): elasticsearches.elasticsearch.k8s.elastic.co "elasticsearch" not found

-- Gather Kibana CR
Error from server (NotFound): kibanas.kibana.k8s.elastic.co "kibana" not found

./must-gather/collection-scripts/gather_install_resources:oc get -n ${NAMESPACE} subscription -o yaml > "$install_folder/subscription"
./must-gather/collection-scripts/gather_install_resources:oc get -n ${NAMESPACE} installplan -o yaml > "$install_folder/install_plan"
./must-gather/collection-scripts/gather_logstore_resources:  oc get -n $NAMESPACE elasticsearch elasticsearch -o yaml > $es_folder/cr
./must-gather/collection-scripts/gather_visualization_resources:  oc get -n ${NAMESPACE} kibana -o yaml > $kibana_folder/cr


Version-Release number of selected component (if applicable):
master

How reproducible:
100%

Steps to Reproduce:
1. Install logging and the elastic operator
2.
3.

Actual results:

m-g fails to collect the CR


Expected results:

collects the CR


Additional info:

Comment 2 Anping Li 2020-12-03 12:20:56 UTC
Verified on clusterlogging.4.7.0-202012021027.p0

Comment 7 errata-xmlrpc 2021-02-24 11:22:27 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 (Errata Advisory for Openshift Logging 5.0.0), 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/RHBA-2021:0652