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.
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.
Please update the RDT flag/text appropriately.
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