Bug 1914215

Summary: must-gather fails to delete the completed state compute-xx-debug pods after successful completion
Product: [Red Hat Storage] Red Hat OpenShift Container Storage Reporter: Neha Berry <nberry>
Component: must-gatherAssignee: Pulkit Kundra <pkundra>
Status: CLOSED ERRATA QA Contact: Neha Berry <nberry>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.7CC: muagarwa, ocs-bugs, pkundra, sabose
Target Milestone: ---Keywords: AutomationBackLog
Target Release: OCS 4.7.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 4.7.0-721.ci Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-05-19 09:17:47 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 Neha Berry 2021-01-08 11:34:02 UTC
Description of problem (please be detailed as possible and provide log
snippests):
----------------------------------------------------------
SInce OCS 4.7, it is seen in multiple clusters that the debug pods created as part of must-gather collection are not deleted and stay on the cluster forever.. till a new must-gather is initiated or manually deleted.



NAME                                                              READY   STATUS      RESTARTS   AGE     IP             NODE        NOMINATED NODE   READINESS GATES
compute-0-debug                                                   0/1     Completed   0          17h     10.1.161.41    compute-0   <none>           <none>
compute-1-debug                                                   0/1     Completed   0          17h     10.1.160.196   compute-1   <none>           <none>
compute-2-debug                                                   0/1     Completed   0          17h     10.1.161.44    compute-2   <none>           <none>
compute-3-debug                                                   0/1     Completed   0          17h     10.1.160.209   compute-3   <none>           <none>
compute-4-debug                                                   0/1     Completed   0          17h     10.1.161.31    compute-4   <none>           <none>
compute-5-debug                                                   0/1     Completed   0          17h     10.1.160.210   compute-5   <none>           <none>


Version of all relevant components (if applicable):
=====================================================
OCP: 4.7.0-0.nightly-2021-01-07-181010
OCS: ocs-operator.v4.7.0-229.ci , 4.7.0-228.ci, etc

Does this issue impact your ability to continue to work with the product
(please explain in detail what is the user impact)?
=================================================
No

Is there any workaround available to the best of your knowledge?
========================================================
We can delete it manually, but cleanup should be part of must-gather.

Rate from 1 - 5 the complexity of the scenario you performed that caused this
bug (1 - very simple, 5 - very complex)?
================================================================
2

Can this issue reproducible?
===========================
Yes

Can this issue reproduce from the UI?
===========================================
NA

If this is a regression, please provide more details to justify this:
=================================================
These pods used to get removed in 4.6 IIRC

Steps to Reproduce:
=======================
1. Install OCS 4.7
2. Initiate a must-gather log collection for ocs
>>oc adm must-gather --image=quay.io/rhceph-dev/ocs-must-gather:latest-4.7 |tee terminal-must-gather
3. check if debug pods are left behind even after successful MG completion

#oc get pods -o wide -n openshift-storage


Actual results:
=================
the debug pods are left behind in completed state.

Expected results:

====================
All resources created as part of MG should be deleted by MG.

Must gather should delete all resources created by it, even completed pods, once log collection completes.

Additional info:
=====================

Comment 9 errata-xmlrpc 2021-05-19 09:17:47 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: Red Hat OpenShift Container Storage 4.7.0 security, 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/RHSA-2021:2041