-
Bug
-
Resolution: Unresolved
-
Undefined
-
None
-
None
-
None
-
0.42
-
False
-
-
False
-
None
-
---
-
---
-
-
CNV I/U Operators Sprint 267
-
Critical
-
None
Description of problem:
Customer is getting VMStorageClassWarning without Windows VMs in 4.16.6
Version-Release number of selected component (if applicable):
4.16.6
The customer is using 4.16.6.
Their SSP operator Pod is using [1], which from the Dockerfile is based on v0.20:
LABEL com.redhat.component="kubevirt-ssp-operator-rhel9-container" \ name="container-native-virtualization/kubevirt-ssp-operator-rhel9" \ version="v4.16.6" \ upstream-version="api/v0.20.0-33-g47604cb9" \ upstream-vcs-ref="47604cb946b06afd9626054a968551c26ff783e6"
\
The patch that fixes the issues by only filtering for Windows VMs is:
commit 15711102ec3ce7cd72cce9a5b236b3482cf146c5
Author: machadovilaca <machadovilaca@gmail.com>
Date: Wed May 15 11:55:56 2024 +0100
Alert VMStorageClassWarning only for Windows VMs
I cannot see it on v0.20, its only in 4.17 (0.21) and 4.18 (0.22):
% git branch --contains=15711102e main origin/release-v0.21 * origin/release-v0.22
Manually inspecting the relevant code line in v0.20 the logic to filter for Windows is not there:
% git checkout origin/release-v0.20 Switched to branch 'origin/release-v0.20' Your branch is up to date with 'remotes/origin/release-v0.20'. % grep kubevirt_ssp_vm_rbd_block_volume_without_rxbounce pkg/monitoring/rules/alerts/operator.go Expr: intstr.FromString("(count(kubevirt_ssp_vm_rbd_block_volume_without_rxbounce > 0) or vector(0)) > 0"),
It should look like this to filter only Windows VMs, like in 4.17/0.21
% git checkout origin/release-v0.21 Switched to branch 'origin/release-v0.21' Your branch is up to date with 'remotes/origin/release-v0.21'. % grep kubevirt_ssp_vm_rbd_block_volume_without_rxbounce pkg/monitoring/rules/alerts/operator.go Expr: intstr.FromString("(count(kubevirt_ssp_vm_rbd_block_volume_without_rxbounce * on(name, namespace) (kubevirt_vmi_info{guest_os_name=\"Microsoft Windows\"} > 0 or kubevirt_vmi_info{os=~\"windows.*\"} > 0) > 0) or vector(0)) > 0"),
Same thing when going directly to the commit of the build from 4.16.6 ssp-operator:
% git checkout 47604cb946b06afd9626054a968551c26ff783e6 HEAD is now at 47604cb9 Merge pull request #1207 from kubevirt-bot/cherry-pick-1204-to-release-v0.20 % grep kubevirt_ssp_vm_rbd_block_volume_without_rxbounce pkg/monitoring/rules/alerts/operator.go Expr: intstr.FromString("(count(kubevirt_ssp_vm_rbd_block_volume_without_rxbounce > 0) or vector(0)) > 0"),
I don't think this was actually backported at all, the original CNV-38482 Jira suggests it was, and we even shipped errata RHEA-2024:132355. But I cannot see the logic in 4.15, 4.14 or 4.13, and customers have alerts firing. There is also CNV-50785 complaining about some regression in 4.14, but I suspect 4.14 never saw the backport as well.