Bug 2019307

Summary: "Error from server (NotFound)" message is displayed in VM log downloaded from web console
Product: Migration Toolkit for Virtualization Reporter: kpunwatk
Component: Must-GatherAssignee: Marek Aufart <maufart>
Status: CLOSED ERRATA QA Contact: Maayan Hadasi <mguetta>
Severity: medium Docs Contact: Avital Pinnick <apinnick>
Priority: high    
Version: 2.2.0CC: fdupont, maufart, mguetta
Target Milestone: ---   
Target Release: 2.2.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: 2021-12-09 19:21:12 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:
Attachments:
Description Flags
virtualmachine log none

Description kpunwatk 2021-11-02 07:39:06 UTC
Created attachment 1839099 [details]
virtualmachine log

Description of problem:

Get logs downloaded for Migration Plan status  "Succeeded/Canceled".
The VM log contains the Error. 
Inside must-gather-plan-<plan-name>-->must-gather-->namespaces-->crs-->virtualmachine contains yaml file with "Error from server (NotFound): namespaces "-o" not found"

forklift-must-gather-api pod's log http://pastebin.test.redhat.com/1005353


Version-Release number of selected component (if applicable):
MTV-2.2.0-69 / iib:130005
CNV-4.9.0-249

Comment 1 Marek Aufart 2021-11-03 08:45:10 UTC
Thanks for reporting this and providing log. If the migration plan haven't finished correctly or was cancelled, there could be missing objects (VM, VMI, DV), so it seems to me, that there no missing data, just an enhancement of error handling during objects dump process is needed. Going to work on that.

Comment 2 Maayan Hadasi 2021-11-03 10:32:24 UTC
Hi @

Comment 3 Maayan Hadasi 2021-11-03 10:41:11 UTC
Hi @maufart 

As mentioned in bug description, the issue is relevant also for a successful migration plan - the VM CR is corrupted.
I have noticed that the corrupted file is under /namespace/crs - could it be that the script looks for it under unexisting namespace?


$ tree 
.
└── namespaces
    ├── crs
    │   └── virtualmachine
    │       └── openshift-mtv.yaml
    ├── openshift-cnv
    │   └── logs
    │       └── cdi-operator-65cc78d844-mbchc
    │           └── current.log
    └── openshift-mtv
        ├── crs
        │   └── plan
        │       └── mtv-api-tests-21-03-11-12-22-02-f6d-plan.yaml
        └── logs
            ├── forklift-controller-95b9496f4-g7hvr
            │   └── current.log
            ├── mtv-api-tests-21-03-11-12-22-02-f6d-plan-vm-8036-jngrg
            │   └── current.log
            └── mtv-api-tests-21-03-11-12-22-02-f6d-plan-vm-8037-jsgb9
                └── current.log

Comment 4 Marek Aufart 2021-11-03 11:52:14 UTC
Thanks for clarification Maayan, seems to be relevant bug in targeted gathering - I will work on that!

Comment 5 Marek Aufart 2021-11-09 10:13:39 UTC
Fix merged and backported https://github.com/konveyor/forklift-must-gather/pull/22

Comment 6 Ilanit Stein 2021-11-14 14:30:51 UTC
Fixed in MTV-2.2.0-84

Comment 7 Maayan Hadasi 2021-11-15 09:42:24 UTC
Verified as fixed.

The VM's yaml looks good for a successful plan.
Regarding a failed/canceled plan - the VM's yaml contains the following message in case there is no VM resource:
"Error from server (NotFound): virtualmachines.kubevirt.io "<vm_name>" not found"

Versions:
MTV 2.2.0-84 / iib:133381
CNV 4.9.1-23 /iib: 133012

Comment 10 errata-xmlrpc 2021-12-09 19:21:12 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