Bug 2283629 - Must Gather collects redundant data in collection in odf mode
Summary: Must Gather collects redundant data in collection in odf mode
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenShift Data Foundation
Classification: Red Hat Storage
Component: must-gather
Version: 4.16
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ODF 4.16.0
Assignee: Niraj Yadav
QA Contact: Oded
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2024-05-28 11:33 UTC by Niraj Yadav
Modified: 2024-07-17 13:23 UTC (History)
4 users (show)

Fixed In Version: 4.16.0-113
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2024-07-17 13:23:49 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github red-hat-storage odf-must-gather pull 163 0 None Merged Negate overlapping args with `-o` flag 2024-05-29 07:51:02 UTC
Github red-hat-storage odf-must-gather pull 167 0 None open Bug 2283629: [release-4.16] Negate overlapping args with `-o` flag 2024-05-29 09:42:48 UTC
Red Hat Product Errata RHSA-2024:4591 0 None None None 2024-07-17 13:23:52 UTC

Description Niraj Yadav 2024-05-28 11:33:35 UTC
Description of problem (please be detailed as possible and provide log
snippests):

Right now if someone runs must-gather in odf mode by using -o or --odf flag and also issues one of -c, -cl, -ns or -cs, these scripts will be executed twice.

This leads to an increase in the collection time and creates redundant collection data.

Must gather should be patched to ignore these overlapping args.


Steps to Reproduce:
1. Run must-gather with -o and any of -c, -cl, -ns or -cs args.
2.
3.


Actual results:

The additional flags cause the script to run twice. Once by -o arg and once by the respective arg.

Expected results:

The gather should not call any script twice if it is already being called by another sub process.

Comment 9 Oded 2024-06-02 11:16:13 UTC
https://github.com/red-hat-storage/odf-must-gather/pull/167/files#diff-bad6eb3f5953b7f47f014fd8b04a48470c1d64d94bbd29566af842f0b60c909cR143
based on code, we call to  functions   gather_ceph_pod_logs , gather_ceph_logs ,  gather_namespaced_resources,  gather_clusterscoped_resources 
Why we need [--odf] flag?
(--odf) ==  (-c)  + (-cl) + (-ns) + (-cs)

SetUp:
OCP: 4.16
ODF: 4.16
Platform: Vsphere

Test Procedeure:
1.Running must-gather command with -c -cl -cs  flags
adm must-gather --image=quay.io/rhceph-dev/ocs-must-gather:latest-4.16 --dest-dir=/tmp/tmp2rbyavop_ocs_logs/oviner6-jun/ocs_must_gather -- /usr/bin/gather -c -cl -cs 
2.Make sure there are no duplicates in mg dir

Comment:
It is difficult to test it without debugging ["set -x"], because the second time the function is called, the existing files will be overwritten by the new files.

Comment 11 Sunil Kumar Acharya 2024-06-06 07:34:46 UTC
Please update the RDT flag/text appropriately.

Comment 12 errata-xmlrpc 2024-07-17 13:23:49 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 (Important: Red Hat OpenShift Data Foundation 4.16.0 security, enhancement & bug fix 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-2024:4591


Note You need to log in before you can comment on or make changes to this bug.