Bug 1614322

Summary: Can not create windows-server-2012r2 preset from demo-content.yaml
Product: Container Native Virtualization (CNV) Reporter: Lukas Bednar <lbednar>
Component: VirtualizationAssignee: Petr Kotas <pkotas>
Status: CLOSED ERRATA QA Contact: Nelly Credi <ncredi>
Severity: medium Docs Contact:
Priority: medium    
Version: 1.1CC: fsimonce, rhallise, zpeng
Target Milestone: ---   
Target Release: 1.2   
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: 2018-10-22 13:28:54 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 Lukas Bednar 2018-08-09 12:05:01 UTC
Description of problem:
When trying to create demo-content.yaml creation fails on error
```
spec.domain.devices in body is required
spec.selector in body is required
```

Version-Release number of selected component (if applicable):
kubevirt-manifests-0.6.3-1.9d48bd1.noarch


How reproducible:
100%


Steps to Reproduce:
1. Deploy OCP-3.10
2. Deploy kubevirt-apb-1.1-16
3. Install kubevirt-manifests-0.6.3-1.9d48bd1.noarch
4. oc create -f /usr/share/kubevirt/manifests/release/demo-content.yaml

Actual results:

[root@cnv-executor-lbednar-master1 ~]# oc create -f /usr/share/kubevirt/manifests/release/demo-content.yaml 
The VirtualMachineInstancePreset "windows-server-2012r2" is invalid: []: Invalid value: map[string]interface {}{"apiVersion":"kubevirt.io/v1alpha2", "kind":"VirtualMachineInstancePreset", "metadata":map[string]interface {}{"selector":map[string]interface {}{"matchLabels":map[string]interface {}{"kubevirt.io/os":"win2k12r2"}}, "generation":1, "creationTimestamp":"2018-08-09T10:13:51Z", "uid":"ea2a641e-9bbc-11e8-a759-fa163e2901a4", "selfLink":"", "clusterName":"", "name":"windows-server-2012r2", "namespace":"default"}, "spec":map[string]interface {}{"domain":map[string]interface {}{"features":map[string]interface {}{"acpi":map[string]interface {}{}, "apic":map[string]interface {}{}, "hyperv":map[string]interface {}{"relaxed":map[string]interface {}{}, "spinlocks":map[string]interface {}{"spinlocks":8191}, "vapic":map[string]interface {}{}}}, "resources":map[string]interface {}{"requests":map[string]interface {}{"memory":"2G"}}, "clock":map[string]interface {}{"timer":map[string]interface {}{"hpet":map[string]interface {}{"present":false}, "hyperv":map[string]interface {}{}, "pit":map[string]interface {}{"tickPolicy":"delay"}, "rtc":map[string]interface {}{"tickPolicy":"catchup"}}, "utc":map[string]interface {}{}}, "cpu":map[string]interface {}{"cores":2}}}}: validation failure list:
spec.domain.devices in body is required
spec.selector in body is required



Expected results:

VirtualMachineInstancePreset "windows-server-2012r2" created.


Additional info:

Comment 1 Ryan Hallisey 2018-08-09 13:15:55 UTC
This also occurred when using the manifests to deploy kubevirt.

Comment 2 Petr Kotas 2018-08-28 09:41:58 UTC
The bug is fixed. Link to the patch: https://github.com/kubevirt/kubevirt/pull/1473

This bug applies only for cnv 1.0 and cnv 1.1. Also it is already fixed in the upstream, since we did changes to the way of how presets are represented internally.

Comment 3 zhe peng 2018-10-08 05:38:48 UTC
I can reproduce this with build kubevirt-manifests-0.6.3-1.9d48bd1.noarch

verify with build kubevirt-manifests-0.8.0-2.6136939.noarch

$ rpm -qa |grep kubevirt-manifests
kubevirt-manifests-0.8.0-2.6136939.noarch

$ oc create -f /usr/share/kubevirt/manifests/release/demo-content.yaml
virtualmachineinstancepreset.kubevirt.io/windows-server-2012r2 created

$ oc get VirtualMachineInstancePreset
NAME                    AGE
windows-server-2012r2   26s

$ oc delete VirtualMachineInstancePreset windows-server-2012r2
virtualmachineinstancepreset.kubevirt.io "windows-server-2012r2" deleted


the preset can be created/deleted, move to verified.

Comment 6 errata-xmlrpc 2018-10-22 13:28:54 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, 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/RHEA-2018:2952