Bug 1996360 - Targeted "must-gather" log collection for non-existent namespace, plan, or VM does not display errors
Summary: Targeted "must-gather" log collection for non-existent namespace, plan, or VM...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Migration Toolkit for Virtualization
Classification: Red Hat
Component: Must-Gather
Version: 2.1.0
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: ---
: 2.2.0
Assignee: Marek Aufart
QA Contact: Maayan Hadasi
Avital Pinnick
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-08-22 08:59 UTC by Maayan Hadasi
Modified: 2021-12-09 19:21 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-12-09 19:20:56 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2021:5066 0 None None None 2021-12-09 19:21:08 UTC

Description Maayan Hadasi 2021-08-22 08:59:04 UTC
Description of problem:

I have run a negative test and used unexisting namespace/plan/vm as command's arguments:
oc adm must-gather --image=quay.io/konveyor/forklift-must-gather:latest -- NS=ns1 PLAN=plan1 VM=vm-3345 /usr/bin/targeted

There were no errors regarding namespace and VM not found.
In addition, this file was created /must-gather/namespaces/crs/virtualmachine/ns1.yaml contains this line: Error from server (NotFound): namespaces "-o" not found


Command output:

[must-gather      ] OUT namespace/openshift-must-gather-qf4r8 created
[must-gather      ] OUT clusterrolebinding.rbac.authorization.k8s.io/must-gather-s88q8 created
[must-gather      ] OUT pod for plug-in image quay.io/konveyor/forklift-must-gather:latest created
[must-gather-ck8kl] POD 2021-08-18T07:41:59.808888958Z Targeted gathering for Forklift in namespaces [openshift-mtv]
[must-gather-ck8kl] POD 2021-08-18T07:41:59.823737626Z Targeted gathering for Namespace: ns1
[must-gather-ck8kl] POD 2021-08-18T07:41:59.823737626Z Targeted gathering for Plan: plan1
[must-gather-ck8kl] POD 2021-08-18T07:42:00.222258270Z Error from server (NotFound): plans.forklift.konveyor.io "plan1" not found
[must-gather-ck8kl] POD 2021-08-18T07:42:00.249318515Z Targeted gathering for VM ID: vm-3345
[must-gather-ck8kl] POD 2021-08-18T07:42:00.249789402Z Gathering virtualmachines..
[must-gather-ck8kl] POD 2021-08-18T07:42:01.119544513Z jq: error (at <stdin>:1): Cannot iterate over null (null)
[must-gather-ck8kl] POD 2021-08-18T07:42:01.121252597Z Dumping virtualmachine: ns1 from 
[must-gather-ck8kl] POD 2021-08-18T07:42:01.948873484Z Gathering logs for namespaces [openshift-mtv]
[must-gather-ck8kl] POD 2021-08-18T07:42:02.319702274Z [ns=openshift-mtv][pod=forklift-controller-7fdf79598d-58hrq] Collecting Pod logs...
[must-gather-ck8kl] POD 2021-08-18T07:42:02.328072931Z [ns=openshift-mtv][pod=forklift-operator-5c594c977b-wc8m6] Collecting Pod logs...
[must-gather-ck8kl] POD 2021-08-18T07:42:02.339160506Z [ns=openshift-mtv][pod=forklift-ui-564b5649c-xrsdm] Collecting Pod logs...
[must-gather-ck8kl] POD 2021-08-18T07:42:02.350617391Z [ns=openshift-mtv][pod=forklift-validation-7d7d47bc9-xw2zm] Collecting Pod logs...
[must-gather-ck8kl] POD 2021-08-18T07:42:02.368116897Z [ns=openshift-mtv][pod=virt-launcher-v2v-migration-rhel8-2disks2nics-p7ktv] Collecting Pod logs...
[must-gather-ck8kl] POD 2021-08-18T07:42:02.394691303Z [ns=openshift-mtv][pod=virt-launcher-v2v-migration-win2019-p4hfv] Collecting Pod logs...
[must-gather-ck8kl] POD 2021-08-18T07:42:03.392049890Z [ns=openshift-cnv][pod=cdi-apiserver-8649f9764b-9rrkh] Collecting Pod logs...
[must-gather-ck8kl] POD 2021-08-18T07:42:03.431665521Z [ns=openshift-cnv][pod=cdi-deployment-54b56d9fbf-2bbkv] Collecting Pod logs...
[must-gather-ck8kl] POD 2021-08-18T07:42:03.492650477Z [ns=openshift-cnv][pod=cdi-operator-759f4977cd-hfdzf] Collecting Pod logs...
[must-gather-ck8kl] POD 2021-08-18T07:42:03.522437841Z [ns=openshift-cnv][pod=cdi-uploadproxy-8f9c6b68b-jw99z] Collecting Pod logs...
[must-gather-ck8kl] POD 2021-08-18T07:42:04.558482428Z [ns=openshift-cnv][pod=vm-import-controller-7567c7b868-xhcz9] Collecting Pod logs...
[must-gather-ck8kl] POD 2021-08-18T07:42:04.572174370Z [ns=openshift-cnv][pod=vm-import-operator-7d555df844-5tb97] Collecting Pod logs...
[must-gather-ck8kl] POD 2021-08-18T07:42:05.947570726Z Tarring must-gather artifacts...
[must-gather-ck8kl] POD 2021-08-18T07:42:05.958534708Z tar: Removing leading `/' from member names
[must-gather-ck8kl] POD 2021-08-18T07:42:05.990574063Z Created /must-gather/must-gather.tar.gz
[must-gather-ck8kl] POD 2021-08-18T07:42:05.990574063Z Waiting for copy phase...
[must-gather-ck8kl] POD 2021-08-18T07:42:05.947570726Z Tarring must-gather artifacts...
[must-gather-ck8kl] POD 2021-08-18T07:42:05.958534708Z tar: Removing leading `/' from member names
[must-gather-ck8kl] POD 2021-08-18T07:42:05.990574063Z Created /must-gather/must-gather.tar.gz
[must-gather-ck8kl] POD 2021-08-18T07:42:05.990574063Z Waiting for copy phase...
[must-gather-ck8kl] OUT waiting for gather to complete
[must-gather-ck8kl] OUT downloading gather output
[must-gather-ck8kl] OUT receiving incremental file list
[must-gather-ck8kl] OUT ./
[must-gather-ck8kl] OUT must-gather.tar.gz
[must-gather-ck8kl] OUT 
[must-gather-ck8kl] OUT sent 46 bytes  received 1,068 bytes  742.67 bytes/sec
[must-gather-ck8kl] OUT total size is 946  speedup is 0.85
[must-gather      ] OUT clusterrolebinding.rbac.authorization.k8s.io/must-gather-s88q8 deleted
[must-gather      ] OUT namespace/openshift-must-gather-qf4r8 deleted



Version-Release number of selected component (if applicable):
MTV-2.1.0-52 iib 98758


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Fabien Dupont 2021-10-12 12:21:42 UTC
Please verify with mtv-operator-bundle-2.2.0-41 / iib:122011, or later.

Comment 2 Marek Aufart 2021-10-12 12:24:16 UTC
Note, up-to-date docs on supported targeted-gathering usage are at https://github.com/konveyor/forklift-must-gather#targeted-gathering

Comment 3 Marek Aufart 2021-10-13 09:39:03 UTC
I actually can reproduce this BZ, added fix: https://github.com/konveyor/forklift-must-gather/pull/13

Comment 4 Ilanit Stein 2021-10-14 13:11:53 UTC
Fixed in 2.2.0-46

Comment 5 Maayan Hadasi 2021-10-20 10:03:34 UTC
Verified as fixed in mtv-operator-bundle-2.2.0-57 / iib: 126435

Comment 8 errata-xmlrpc 2021-12-09 19:20:56 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.2.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-2021:5066


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