Bug 2152627

Summary: CNV must-gather should collect virt-launcher logs
Product: Container Native Virtualization (CNV) Reporter: Vladik Romanovsky <vromanso>
Component: LoggingAssignee: Simone Tiraboschi <stirabos>
Status: CLOSED ERRATA QA Contact: Ahmad <ahafe>
Severity: high Docs Contact:
Priority: high    
Version: 4.11.0CC: kmajcher, stirabos
Target Milestone: ---   
Target Release: 4.12.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: hco-bundle-registry-container-v4.12.1-11 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-02-28 20:06:27 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 Vladik Romanovsky 2022-12-12 14:32:04 UTC
Description of problem:

Currently, virt-launcher logs are not being collected as part of the CNV must-gather image.

In order to collect these, users must run a generic OCP must-gather on the namespace where Virtual Machines are run.

virt-launcher(s) logs are needed to troubleshoot any VM-related issue and should be collected with the already collected controller logs.

We should preserve the path structure and the content when collecting these logs.
These logs should be collected in an expected path, similar to the path an OCP must-gather would use to store the files together with the yaml of the pod.
Such as :
[must-gather]/namespaces/[namespace]/pods/virt-launcher-[name]/compute/compute/logs/current.log






Version-Release number of selected component (if applicable):


How reproducible:
always

Steps to Reproduce:
1. run oc adm must-gather --image=registry.redhat.io/container-native-virtualization/cnv-must-gather-rhel8:v4.11.0 ( -- gather_vms_details)

Actual results:
No virt-launcher logs are collected 

Expected results:
virt-launcher logs should be collected in an expected path (similar to OCP must-gather) together with the virt-launcher pod yaml.


Additional info:

Comment 2 Ahmad 2023-02-01 16:45:08 UTC
QE:
I was unable to reproduce for both:

oc adm must-gather --image=registry.redhat.io/container-native-virtualization/cnv-must-gather-rhel8:v4.11.0

oc adm must-gather --image=registry.redhat.io/container-native-virtualization/cnv-must-gather-rhel8:v4.12.0


Actual results:
http://pastebin.test.redhat.com/1090224

virt-launcher logs are being displayed in the report

Comment 3 Ahmad 2023-02-02 11:23:34 UTC
QE steps reproduce:
cluster version 4.12.1

run command:
oc adm must-gather    --image=quay.io/kubevirt/must-gather    -- /usr/bin/gather --vms_details
link: http://pastebin.test.redhat.com/1090337



a new folder was created : must-gather.local.2495810264157557978 

logs under must-gather.local.2495810264157557978   link: http://pastebin.test.redhat.com/1090339



virt-launcher logs:
namespaces/default/pods/virt-launcher-rhel8-gfhquqp8e1p5nrku-8fn4t/compute/compute/logs/current.log

link: http://pastebin.test.redhat.com/1090333

Comment 4 Ahmad 2023-02-06 16:45:10 UTC
verified against build  v4.12.1-3

must_gather log file:

ls -ltr must-gather.local.3705485383590099656/registry-redhat-io-container-native-virtualization-cnv-must-gather-rhel8-sha256-8b470d844b63cb367b463d4574815f1593a65827b3f8c1f61479bd7929c01a33/namespaces/default/pods/virt-launcher-vm-cirros-datavolumes-94jxs/compute/compute/logs/
total 176
-rwxr-xr-x. 1 centos centos      0 Feb  5 14:34 previous.log
-rwxr-xr-x. 1 centos centos      0 Feb  5 14:34 previous.insecure.log
-rwxr-xr-x. 1 centos centos 179911 Feb  5 14:34 current.log

Comment 10 errata-xmlrpc 2023-02-28 20:06:27 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 (OpenShift Virtualization 4.12.1 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-2023:1023