Description of problem: We thought we could relay on getting the vm name for the virt-launcher pods, since we have it in the VM templates.But in case the user uses custom templates this label and others might be missing. We need to make sure we have a label for the vm name attached to the virt-launcher pods, so that we can filter kube-state-metrics by vm-name and join the virt-launcher container metrics with it by the vm name. Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info:
It looks like something for Virt team, can you please check?
Hi all, This is important for UI when displaying the "Top consumer ..." metrics where we want to show users the name of the VM that consume resource and not the name of the launcher pod. Currently in cases the VM name is missing we fall back to pod name witch is not optimal, @phillipcbailey please keep me honest here.
Opend a BZ to track on the UI side: https://bugzilla.redhat.com/show_bug.cgi?id=2041865
Yaacov, that's correct. =) It would be much more beneficial to the user to display the VM name, especially since we give them the option to view the results by VM. It's going to be a frustrating experience when they realize that the output isn't consistent.
Tested with CNV build v4.10.1-86[1] and the VM created with yaml file doesn't have the VM name label for virt-launcher pod. As I discussed with Joao Vilaca, the fix is available with upstream virt-controller version v0.51, but the CNV downstream build[1] consists of virt-controller v0.49 and the fix is not available in this build. Because of the above said reason, this bug is marked FailedQA. Moving this bug to ASSIGNED [1] - http://cnv-version-explorer.apps.cnv.engineering.redhat.com/BundleDetails?ver=v4.10.1-86
Verified with the CNV bundle 4.10.2-10 and virt-controller-v4.10.2-1 VM body was build with vm.yaml configuration without the label for VM name. Following is the VM configuration yaml <snip> --- apiVersion: kubevirt.io/v1 kind: VirtualMachine metadata: labels: name: vm-cirros spec: running: true template: spec: domain: devices: disks: - disk: bus: virtio name: containerdisk resources: requests: memory: 128Mi terminationGracePeriodSeconds: 0 volumes: - containerDisk: image: quay.io/kubevirt/cirros-container-disk-demo name: containerdisk </snip> When creating the vm with the above VM configuration, # oc apply -f <vm.yaml> then the virt-launcher pod had the label with the vm name []$ oc get pods virt-launcher-fedora-sas-template-uptight-skink-jgchw -n openshift -ojson | jq '.metadata.labels' | grep 'vm.kubevirt.io' "vm.kubevirt.io/name": "vm-cirros" <----------- VM name is available in the label Marking this bug as VERIFIED based on the above verification
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.10.2 Images security and bug fix 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-2022:5026