-
Bug
-
Resolution: Done-Errata
-
Major
-
CNV v4.16.0
-
None
-
Quality / Stability / Reliability
-
2
-
False
-
-
False
-
None
-
-
CNV Virtualization Sprint 258
-
No
Description of problem:
When applying the following manifest, the VirtualMachinePool validating webhook panics:
Note: this is a copy of examples/vm-pool-cirros.yaml from upstream
---
apiVersion: pool.kubevirt.io/v1alpha1
kind: VirtualMachinePool
metadata:
name: vm-pool-cirros
spec:
replicas: 3
selector:
matchLabels:
kubevirt.io/vmpool: vm-pool-cirros
virtualMachineTemplate:
metadata:
creationTimestamp: null
labels:
kubevirt.io/vmpool: vm-pool-cirros
spec:
running: true
template:
metadata:
creationTimestamp: null
labels:
kubevirt.io/vmpool: vm-pool-cirros
spec:
domain:
devices:
disks:
- disk:
bus: virtio
name: containerdisk
resources:
requests:
memory: 128Mi
terminationGracePeriodSeconds: 0
volumes:
- containerDisk:
image: registry:5000/kubevirt/cirros-container-disk-demo:devel
name: containerdisk
Version-Release number of selected component (if applicable):
4.16
How reproducible:
100%
Steps to Reproduce:
1. Apply the VirtualMachinePool manifest described above
Actual results:
An error occurred Error "failed calling webhook "virtualmachinepool-validator.kubevirt.io": failed to call webhook: Post "https://virt-api.openshift-cnv.svc:443/virtualmachinepool-validate?timeout=10s": EOF" for field "undefined".
Expected results:
The manifest should be accepted.
Additional info:
Tested the same scenario on a VirtualMachine object with a similar spec, it does not reproduce. The problem probably occurs because domain.cpu is not checked to be not nil in https://github.com/kubevirt/kubevirt/blob/8afd73767402724039f1d3547b9c2140560a19a9/pkg/virt-api/webhooks/validating-webhook/admitters/vms-admitter.go#L445
- links to
-
RHEA-2024:133097
OpenShift Virtualization 4.17.0 Images