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: Adam Litke <alitke>
Status: NEW --- QA Contact: Natalie Gavrielov <ngavrilo>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 4.14.0Keywords: Regression
Target Milestone: ---Flags: ngavrilo: needinfo? (jpeimer)
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 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?