Bug 2023260 - [Targeted must-gather] Problem handling not-existent MTV resources before log collection
Summary: [Targeted must-gather] Problem handling not-existent MTV resources before log...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Migration Toolkit for Virtualization
Classification: Red Hat
Component: Must-Gather
Version: 2.2.0
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: ---
: 2.3.0
Assignee: Marek Aufart
QA Contact: Igor Braginsky
Avital Pinnick
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-11-15 10:31 UTC by Maayan Hadasi
Modified: 2022-04-04 18:03 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-04-04 18:03:40 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2022:1183 0 None None None 2022-04-04 18:03:53 UTC

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


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