Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions docs/gathered-data.md
Original file line number Diff line number Diff line change
Expand Up @@ -1811,14 +1811,14 @@ None
### Released version
- 4.20.0

### Backported versions (TBD)
- 4.19.z
- 4.18.z
- 4.17.z
- 4.16.z
### Backported versions
- 4.19.12+
- 4.18.25+
- 4.17.41+
- 4.16.49+

### Changes
None
4.21 - bugfix: virt-launcher pods on 'Pending' status caused a gathering error


## SAPConfig
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@ import (
// ### Released version
// - 4.20.0
//
// ### Backported versions (TBD)
// - 4.19.z
// - 4.18.z
// - 4.17.z
// - 4.16.z
// ### Backported versions
// - 4.19.12+
// - 4.18.25+
// - 4.17.41+
// - 4.16.49+
//
// ### Changes
// None
// 4.21 - bugfix: virt-launcher pods on 'Pending' status caused a gathering error
func (g *Gatherer) GatherQEMUKubeVirtLauncherLogs(ctx context.Context) ([]record.Record, []error) {
// Setting a fixed value for the maximum number of VMs pods
const maxVMs int = 100
Expand Down Expand Up @@ -102,10 +102,12 @@ func getQEMUArgsMessageFilter() common.LogMessagesFilter {

// getQEMUArgsContainerFilter creates a LogContainersFilter for selecting KubeVirt virt-launcher pods.
// It targets all namespaces using the label selector "kubevirt.io=virt-launcher" to identify relevant containers.
// Adding the field selector "status.phase=Running" filters out pending pods with no compute container or logs.
func getQEMUArgsContainerFilter(maxContainers int) common.LogContainersFilter {
return common.LogContainersFilter{
Namespace: metav1.NamespaceAll,
LabelSelector: "kubevirt.io=virt-launcher",
FieldSelector: "status.phase=Running",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you also consider gathering data from containers that are marked as Succeeded or Failed? Or is the Running phase sufficient for us?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that's the work I'm checking on other ticket → OCPBUGS-63396

MaxNamespaceContainers: maxContainers,
}
}