Bug 2231839

Summary: Importer pod's priority is not the same as the VM's PriorityClass, and not the same as the DV's PriorityClass
Product: Container Native Virtualization (CNV) Reporter: Jenia Peimer <jpeimer>
Component: StorageAssignee: Alexander Wels <awels>
Status: CLOSED ERRATA QA Contact: Jenia Peimer <jpeimer>
Severity: high Docs Contact:
Priority: unspecified    
Version: 4.14.0CC: dafrank
Target Milestone: ---Keywords: Regression
Target Release: 4.14.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: CNV v4.14.0.rhel9-1772 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-11-08 14:06:16 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:

Description Jenia Peimer 2023-08-14 11:48:57 UTC
Description of problem:
Importer pod's priority is not the same as the VM's PriorityClass, and not the same as the DV's PriorityClass

Version-Release number of selected component (if applicable):
4.14

How reproducible:
Always


Steps to Reproduce:

FLOW 1:

1. Create a PriorityClass

apiVersion: scheduling.k8s.io/v1
kind: PriorityClass
metadata:
  name: vm-priority
value: 1000000


2. Create a VM with 'priorityClassName: vm-priority'

apiVersion: kubevirt.io/v1
kind: VirtualMachine
metadata:
  name: vm-rhel
spec:
  dataVolumeTemplates:
  - metadata:
      name: dv-rhel
    spec:
      storage:
        resources:
          requests:
            storage: 20Gi
        storageClassName: hostpath-csi-basic
      source:
        http:
          url: <rhel-88.qcow2>
  running: true
  template:
    spec:
      domain:
        devices:
          disks:
          - disk:
              bus: virtio
            name: datavolume
        machine:
          type: ""
        resources:
          requests:
            memory: 1.5Gi
      terminationGracePeriodSeconds: 0
      priorityClassName: vm-priority
      volumes:
      - dataVolume:
          name: dv-rhel
        name: datavolume


3. See the priority of the importer pod:

   $ oc get pods importer-prime-25f14350-9bae-4e64-a523-cb631ce1fda5 -ojson | jq .spec.priority
   0
   $ 


FLOW 2:
 
1. Create a PriorityClass for the VM (vm-priority: 2000000) and for the DV (dv-priority: 1000000)

2. Create a VM like in FLOW 1, but also add 'priorityClassName' to the dataVolumeTemplates:

spec:
  dataVolumeTemplates:
  - spec:
      priorityClassName: dv-priority

3. See the priority of the importer pod:

   $ oc get pods importer-prime-d0ca7996-d5f0-4bc1-b2e8-4c6d1a5146dd -ojson | jq .spec.priority
   0
   $ 


Actual results:
The priority of the importer pod is '0'


Expected results:
FLOW 1: The priority of the importer pod should match the 'vm-priority'
FLOW 2: The priority of the importer pod should match the 'dv-priority' and not the 'vm-priority'


Additional info:
Regression

Comment 1 Natalie Gavrielov 2023-08-16 12:27:44 UTC
Hi Jenia, what is the impact of this issue? just priorities being differnet?

Comment 2 Jenia Peimer 2023-08-23 12:25:01 UTC
If there are enough resources, it's not a big issue. Only in case resources are scarce it can be noticeable. 
But it is the loss of functionality that was there

Comment 3 Jenia Peimer 2023-09-07 12:34:40 UTC
Verified on CNV v4.14.0.rhel9-1880

Comment 5 errata-xmlrpc 2023-11-08 14:06:16 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 (Important: OpenShift Virtualization 4.14.0 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-2023:6817