Bug 2023260

Summary: [Targeted must-gather] Problem handling not-existent MTV resources before log collection
Product: Migration Toolkit for Virtualization Reporter: Maayan Hadasi <mguetta>
Component: Must-GatherAssignee: Marek Aufart <maufart>
Status: CLOSED ERRATA QA Contact: Igor Braginsky <ibragins>
Severity: medium Docs Contact: Avital Pinnick <apinnick>
Priority: high    
Version: 2.2.0CC: fdupont, istein, maufart, rhoch
Target Milestone: ---   
Target Release: 2.3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-04-04 18:03: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:

Description Maayan Hadasi 2021-11-15 10:31:31 UTC
Description of problem:
In case that a resource does not exist - there should be an appropriate message or not to collect the yaml/log of that resource
For example, when the virt-launcher pod does not exist because the destination VM is not running, the following unexpected log is present in the archive logs file, downloaded from UI:

[mguetta@localhost must-gather]$ cat ./namespaces/openshift-mtv/logs/current.log
error: expected 'logs [-f] [-p] (POD | TYPE/NAME) [-c CONTAINER]'.
POD or TYPE/NAME is a required argument for the logs command
See 'oc logs -h' for help and examples


Version-Release number of selected component (if applicable):
MTV 2.2.0-84 / iib:133381


How reproducible:
100%


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 3 Marek Aufart 2022-02-10 10:49:00 UTC
Confirmed with Maayan on mig05 environment. There is still an issue in UI-executed must-gather targeted to non-existing VM (Plan is OK). Since VM and relared CRs are missing, the process of gathering logs should be stopped instead of providing not relevant files with grep/gathering logs error. Will work on this.

Comment 5 Marek Aufart 2022-02-15 09:22:44 UTC
Backported to 2.3 by https://github.com/konveyor/forklift-must-gather/pull/43

Comment 6 Ilanit Stein 2022-02-16 07:43:25 UTC
Fixed in MTV-2.3.0-30
Index image v4.9: iib:177398
Index image v4.10: iib:177400

Comment 7 Igor Braginsky 2022-03-09 15:00:09 UTC
Verified on MTV 2.3.0-37, if particular resource is missing - respective log file just doesn't exist in the archive, LGTM

Comment 10 errata-xmlrpc 2022-04-04 18:03: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 (MTV 2.3.0 images), 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/RHEA-2022:1183