-
Bug
-
Resolution: Not a Bug
-
Undefined
-
None
-
4.16.z
-
Quality / Stability / Reliability
-
False
-
-
None
-
None
-
None
-
None
-
None
-
None
-
CCXDEV Sprint 154
-
1
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Description of problem:
If a *virt-launcher* pod's logs contain more than one line with a target string, some log lines are overwritten and lost when data is recorded to files. This situation was not properly replicated in a standard procedure, but it may occur when creating VMs in a custom way.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Create a stub pod with custom logs (see below)
2. Trigger a new gathering from the Insights Operator
3. Check the archive generated
Stub Pod example:
apiVersion: v1
kind: Pod
metadata:
name: test-gather-custom-pod
namespace: openshift-insights
labels:
kubevirt.io: virt-launcher
spec:
containers:
- name: test
image: quay.io/openshifttest/busybox
imagePullPolicy: Always
command:
- sh
- -c
- |
echo '
{"component":"virt-launcher","level":"info","msg":"LC_ALL=C PATH=/usr/libexec/qemu-kvm -name guest=vm1,debug-threads=on ...","timestamp":"2025-10-30T06:01:20Z"}
{"component":"virt-launcher","level":"info","msg":"Starting QEMU process: /usr/libexec/qemu-kvm -machine pc-q35-rhel9.4.0,accel=kvm,usb=off ...","timestamp":"2025-10-30T06:01:21Z"}
{"component":"virt-launcher","level":"info","msg":"QEMU command line: /usr/libexec/qemu-kvm -cpu Cascadelake-Server -drive file=/var/run/kubevirt...","timestamp":"2025-10-30T06:01:22Z"}
' && sleep 600;
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
restartPolicy: Always
securityContext:
runAsNonRoot: true
seccompProfile:
type: RuntimeDefault
Actual results:
Only the last log line is recorded
Expected results:
All the log lines with the target string are gathered
Additional info:
This is a fictional scenario, but it could happen in real life.