Uploaded image for project: 'OpenShift Virtualization'
  1. OpenShift Virtualization
  2. CNV-50275

Webhook rejects VirtualMachine creation if InstanceType doesn't exist

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done-Errata
    • Icon: Normal Normal
    • CNV v4.20.0
    • CNV v4.18.0
    • CNV Infrastructure
    • None
    • 3
    • CNV Infra 265, CNV Infra 269, CNV Infra 270
    • None

      Description of problem:

      When creating a VirtualMachine that references an InstanceType, the webhook currently rejects its creation if the InstanceType resource does not exist. The following error is shown:
      
      "admission webhook "virtualmachine-validator.kubevirt.io" denied the request: Failure to find instancetype: controllerrevisions.apps "vm-cirros-datavolume-example-instancetype-v1beta1-786ad661-0a0b-4537-861b-be41feda3147-1" not found"
      
      We should consider preventing VM start-up (VMI creation) when the associated InstanceType is missing. However, blocking the VM creation is overkill and goes against the declarative design we are aiming for.

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

      4.18.0

      How reproducible:

      Always

      Steps to Reproduce:

      1.Create a VM that references a instance type in its spec.
      2.Don't create instance type.
      3.Create fails.
      

      Actual results:

      VM creation is rejected by webhook.

      Expected results:

      VM creation should succeed. If the instance type is created in the future, the VM should be recoverable.

      Additional info:

       

              rhn-support-lyarwood Lee Yarwood
              rh-ee-alromero Alvaro Romero
              Geetika Kapoor Geetika Kapoor
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

                Created:
                Updated:
                Resolved: