Bug 2167979

Summary: qemu.log are no longer getting collected for cnv must-gather (vm gather) in 4.13.0
Product: Container Native Virtualization (CNV) Reporter: Debarati Basu-Nag <dbasunag>
Component: LoggingAssignee: Simone Tiraboschi <stirabos>
Status: CLOSED ERRATA QA Contact: Debarati Basu-Nag <dbasunag>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 4.13.0CC: ocohen, stirabos
Target Milestone: ---   
Target Release: 4.13.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: CNV v4.13.0.rhel9-1410 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-05-18 02:57:25 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
must-gather none

Description Debarati Basu-Nag 2023-02-07 21:54:20 UTC
Created attachment 1942780 [details]
must-gather

Description of problem: for 4.13.0, when running vm gather (with various options), I no longer see qemu.log as a part of the collection.


Version-Release number of selected component (if applicable):
CNV-v4.13.0.rhel9-1385

How reproducible:
100%

Steps to Reproduce:
1. Run any vm gather command. e.g. oc adm must-gather --dest-dir=/tmp/pytest-5BRt7eYh5CACeD4eFYKbwJ/must_gather_scope_module0 --image=registry.redhat.io/container-native-virtualization/cnv-must-gather-rhel9@sha256:a9dda634718a3329a83a4f47be879871e42ef6bc3bcf1b79eebf0b3fc07159a9 -- /usr/bin/gather --vms_details
2. Check if the qemu.log was collected for any of the vms.
3.

Actual results:
Will attach must-gather command output
============
/tmp/pytest-5BRt7eYh5CACeD4eFYKbwJ/must_gather_scope_module0/registry-redhat-io-container-native-virtualization-cnv-must-gather-rhel9-sha256-99772bf90f9b7af80d4c5ae75f865b197ac15fe5d609b05867c4b9652b12c10a/namespaces/must-gather-alternate/vms/must-gather-vm-3-1675806440-1057985:
total 24
-rw-r--r--. 1 centos centos 1820 Feb  7 21:47 virt-launcher-must-gather-vm-3-1675806440-1057985-czqx2.ruletables.txt
-rw-r--r--. 1 centos centos 1133 Feb  7 21:47 virt-launcher-must-gather-vm-3-1675806440-1057985-czqx2.bridge.txt
-rw-r--r--. 1 centos centos 1288 Feb  7 21:47 virt-launcher-must-gather-vm-3-1675806440-1057985-czqx2.ip.txt
-rw-r--r--. 1 centos centos 8679 Feb  7 21:47 virt-launcher-must-gather-vm-3-1675806440-1057985-czqx2.dumpxml.xml



Expected results:
qemu.log would be included in cnv must-gather
Additional info:

Comment 1 Oren Cohen 2023-02-09 07:24:25 UTC
the qemu logs were not created because the must-gather script uses tar utility for the archive on the pod.
tar is included by default in the rhel8.6 base image (registry.redhat.io/rhel8-6-els/rhel), but is missing in the rhel9 one (registry.redhat.io/ubi9/ubi-minimal).
tar was added to virt-launcher Dockerfile:
https://pkgs.devel.redhat.com/cgit/containers/virt-launcher/diff/?id2=12046e85e0b176f0d764718312ca84c35432e719&id=63408a4c23ce72606993db12f98826e263479a2c

Comment 2 Debarati Basu-Nag 2023-03-27 18:37:03 UTC
Validated with CNV-v4.13.0.rhel9-1836:
================
total 36
drwxr-xr-x. 2 cloud-user cloud-user    6 Mar 27 14:29 log
-rw-r--r--. 1 cloud-user cloud-user 1822 Mar 27 14:29 virt-launcher-must-gather-vm-2-1679941614-426225-m6mm5.ruletables.txt
-rw-r--r--. 1 cloud-user cloud-user 2008 Mar 27 14:29 virt-launcher-must-gather-vm-2-1679941614-426225-m6mm5.bridge.txt
-rw-r--r--. 1 cloud-user cloud-user 2175 Mar 27 14:29 virt-launcher-must-gather-vm-2-1679941614-426225-m6mm5.ip.txt
-rw-r--r--. 1 cloud-user cloud-user 9340 Mar 27 14:29 virt-launcher-must-gather-vm-2-1679941614-426225-m6mm5.dumpxml.xml
-rw-------. 1 cloud-user cloud-user 9669 Mar 27 14:29 node-gather-unprivileged_must-gather-vm-2-1679941614-426225.log
[cloud-user@ocp-ipi-executor-xl must-gather-vm-2-1679941614-426225]$ pwd
/tmp/pytest-MFNGwZrL7x2QaMUS73K6MJ/must_gather_scope_module0/registry-redhat-io-container-native-virtualization-cnv-must-gather-rhel9-sha256-6814008b757cc139574baec396f385ecae21419212fac9bf613532e9163d6744/namespaces/node-gather-unprivileged/vms/must-gather-vm-2-1679941614-426225
[cloud-user@ocp-ipi-executor-xl must-gather-vm-2-1679941614-426225]$

Comment 4 errata-xmlrpc 2023-05-18 02:57:25 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 (Moderate: OpenShift Virtualization 4.13.0 Images security, bug fix, and enhancement update), 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/RHSA-2023:3205