Bug 2007757

Summary: must-gather extracts imagestreams in the "openshift" namespace, but not Templates
Product: OpenShift Container Platform Reporter: Adam Kaplan <adam.kaplan>
Component: SamplesAssignee: David Peraza <dperaza>
Status: CLOSED ERRATA QA Contact: Jitendar Singh <jitsingh>
Severity: high Docs Contact:
Priority: unspecified    
Version: 4.8CC: aos-bugs, gmontero, mfojtik, wking
Target Milestone: ---   
Target Release: 4.10.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-03-12 04:38:40 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:
Bug Depends On:    
Bug Blocks: 2010136    

Description Adam Kaplan 2021-09-24 18:52:15 UTC
Description of problem:

When must-gather is run, the imagestreams in the "openshift" namespace are extracted, but Templates in the same namespace are not extracted.

The entire openshift namespace is listed as a "related object" by the openshift-samples ClusterOperator.


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


How reproducible: Always


Steps to Reproduce:
1. Install OpenShift, ensuring that the Samples operator bootstraps itself as "Managed"
2. Run oc adm must-gather on the cluster
3. Inspect the contents of the openshift namespace

Actual results:

Imagestreams are extracted from the openshift namespace, but Templates are not.

Expected results:

Imagestreams and templates are extracted.


Additional info:

Comment 1 Maciej Szulik 2021-09-27 14:28:05 UTC
This is coming from the fact that must-gather scrapes `all` resources for openshift namespace. 
If you need any particular resources I suggest you add necessary resources in your operator's .status.relatedObjects:

https://github.com/openshift/cluster-samples-operator/blob/31fb491fc14faed6ebbe41a526764947069ff0a2/manifests/07-clusteroperator.yaml#L11

you should add there Templates and whichever resources you care about for debugging.

Comment 2 David Peraza 2021-09-27 17:12:13 UTC
Taking a look a this one today.

Comment 4 Gabe Montero 2021-10-04 12:36:13 UTC
Both David and I were able to verify from all the PR e2e's that the new must gather for samples now has templates 

Saving QE some cycles and marking verified.

Comment 8 errata-xmlrpc 2022-03-12 04:38:40 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 (Moderate: OpenShift Container Platform 4.10.3 security 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/RHSA-2022:0056