Description of problem: The value of minimal-required-memory in common templates is taken from libosinfo. Currently the value is taken from ppc section (https://gitlab.com/libosinfo/osinfo-db/blob/master/data/os/redhat.com/rhel-8.0.xml.in#L121) and not from generic architecture section (https://gitlab.com/libosinfo/osinfo-db/blob/master/data/os/redhat.com/rhel-8.0.xml.in#L136) This is because https://github.com/kubevirt/common-templates/blob/master/templates/_linux.yaml#L29 directs to ".0" which selects ppc (the first section) Version-Release number of selected component (if applicable): CNV 2.1.0, OCP 4.2.0 How reproducible: 100% Steps to Reproduce: 1. Find Os system information for an OS template in https://gitlab.com/libosinfo/osinfo-db/blob/master/data/os For example, for RHEL8 - https://gitlab.com/libosinfo/osinfo-db/blob/master/data/os/redhat.com/rhel-8.0.xml.in 2. Check the minimum required RAM, under <resources arch="all"><minimum><ram> For example, for RHEL8 - https://gitlab.com/libosinfo/osinfo-db/blob/master/data/os/redhat.com/rhel-8.0.xml.in#L136 3. In the template, check the value of minimum memory in the validation section For example: oc get templates -n openshift rhel8-server-tiny-v0.6.2 -o yaml validations --> "name": "minimal-required-memory" Actual results: The value (2G) is taken from the first architecture section, which is ppc and not from the generic section (1G) which comes after. Expected results: The value should be taken from the generic (<resources arch="all">) section. Additional info: ====== libosinfo for RHEL8 ====== <resources arch="ppc64le"> <minimum> <n-cpus>1</n-cpus> <cpu>1000000000</cpu> <ram>2147483648</ram> <storage>10737418240</storage> </minimum> <recommended> <cpu>4000000000</cpu> <ram>2147483648</ram> <storage>21474836480</storage> </recommended> </resources> <resources arch="all"> <minimum> <n-cpus>1</n-cpus> <cpu>1000000000</cpu> <ram>1073741824</ram> <storage>10737418240</storage> </minimum> <recommended> <cpu>1000000000</cpu> <ram>1073741824</ram> <storage>10737418240</storage> </recommended> ============================================================================ ====== oc get templates -n openshift rhel8-server-tiny-v0.6.2 -o yaml ====== validations: | [ { "name": "minimal-required-memory", "path": "jsonpath::.spec.domain.resources.requests.memory", "rule": "integer", "message": "This VM requires more memory.", "min": 2147483648 }, ] ============================================================================
This is fixed in common-templates-0.8.0 upstream. Downstream will get it on the next d/s rebuild of SSP operator for 2.2.
Re-opening. Wrong minimum value for RHEL8. Template: "min": 1073741824 oslibinfo: 1610612736 =========================================== RHEL 8 template =============================================== $ oc get template -n openshift -oyaml rhel8-server-large-v0.7.0 apiVersion: template.openshift.io/v1 kind: Template metadata: annotations: defaults.template.kubevirt.io/disk: rootdisk description: This template can be used to create a VM suitable for Red Hat Enterprise Linux 7 and newer. The template assumes that a PVC is available which is providing the necessary RHEL disk image. iconClass: icon-rhel name.os.template.kubevirt.io/rhel8.0: Red Hat Enterprise Linux 8.0 name.os.template.kubevirt.io/rhel8.1: Red Hat Enterprise Linux 8.1 openshift.io/display-name: Red Hat Enterprise Linux 7.0+ VM openshift.io/documentation-url: https://github.com/kubevirt/common-templates openshift.io/provider-display-name: KubeVirt openshift.io/support-url: https://github.com/kubevirt/common-templates/issues tags: kubevirt,virtualmachine,linux,rhel template.kubevirt.io/editable: | /objects[0].spec.template.spec.domain.cpu.sockets /objects[0].spec.template.spec.domain.cpu.cores /objects[0].spec.template.spec.domain.cpu.threads /objects[0].spec.template.spec.domain.resources.requests.memory /objects[0].spec.template.spec.domain.devices.disks /objects[0].spec.template.spec.volumes /objects[0].spec.template.spec.networks template.kubevirt.io/version: v1alpha1 template.openshift.io/bindable: "false" validations: | [ { "name": "minimal-required-memory", "path": "jsonpath::.spec.domain.resources.requests.memory", "rule": "integer", "message": "This VM requires more memory.", "min": 1073741824 } ] creationTimestamp: "2019-12-18T05:54:11Z" labels: flavor.template.kubevirt.io/large: "true" os.template.kubevirt.io/rhel8.0: "true" os.template.kubevirt.io/rhel8.1: "true" template.kubevirt.io/type: base template.kubevirt.io/version: v0.8.1 workload.template.kubevirt.io/server: "true" name: rhel8-server-large-v0.7.0 namespace: openshift ownerReferences: - apiVersion: kubevirt.io/v1 kind: KubevirtCommonTemplatesBundle name: common-templates-hyperconverged-cluster uid: 19aaacad-4afe-48a3-b260-30e8bb7b767f resourceVersion: "697955" selfLink: /apis/template.openshift.io/v1/namespaces/openshift/templates/rhel8-server-large-v0.7.0 uid: fe2e81a4-4f92-4f63-8378-d8664e5945d9 objects: - apiVersion: kubevirt.io/v1alpha3 kind: VirtualMachine metadata: labels: app: ${NAME} vm.kubevirt.io/template: rhel8-server-large vm.kubevirt.io/template.revision: "1" vm.kubevirt.io/template.version: v0.8.1 name: ${NAME} spec: running: false template: metadata: labels: kubevirt.io/domain: ${NAME} kubevirt.io/size: large spec: domain: cpu: cores: 1 sockets: 2 threads: 1 devices: disks: - disk: bus: virtio name: rootdisk - disk: bus: virtio name: cloudinitdisk interfaces: - masquerade: {} name: default networkInterfaceMultiqueue: true rng: {} resources: requests: memory: 8G evictionStrategy: LiveMigrate networks: - name: default pod: {} terminationGracePeriodSeconds: 0 volumes: - name: rootdisk persistentVolumeClaim: claimName: ${PVCNAME} - cloudInitNoCloud: userData: |- #cloud-config password: redhat chpasswd: { expire: False } name: cloudinitdisk parameters: - description: VM name from: rhel8-[a-z0-9]{16} generate: expression name: NAME - description: Name of the PVC with the disk image name: PVCNAME required: true ================================= oslibinfo https://gitlab.com/libosinfo/osinfo-db/blob/master/data/os/redhat.com/rhel-8.0.xml.in#L128 ========================================================= <resources arch="all"> <minimum> <n-cpus>1</n-cpus> <cpu>1000000000</cpu> <ram>1610612736</ram> <storage>10737418240</storage> </minimum> ==========================================================================================
Re-opened on $ oc get csv -n openshift-cnv NAME DISPLAY VERSION REPLACES PHASE kubevirt-hyperconverged-operator.v2.2.0 Container-native virtualization Operator 2.2.0 kubevirt-hyperconverged-operator.v2.1.0 Succeeded
This just needs a rebuild and new release of templates. libosinfo was updated - https://gitlab.com/libosinfo/osinfo-db/commit/00a2aea54251e33bc20ed7fb5d0fab43e528b178
Closing, verified on kubevirt-hyperconverged-operator.v2.3.0 $ oc get template -n openshift -oyaml rhel8-server-large-v0.7.0 apiVersion: template.openshift.io/v1 kind: Template metadata: annotations: defaults.template.kubevirt.io/disk: rootdisk description: This template can be used to create a VM suitable for Red Hat Enterprise Linux 7 and newer. The template assumes that a PVC is available which is providing the necessary RHEL disk image. iconClass: icon-rhel name.os.template.kubevirt.io/rhel8.0: Red Hat Enterprise Linux 8.0 name.os.template.kubevirt.io/rhel8.1: Red Hat Enterprise Linux 8.1 openshift.io/display-name: Red Hat Enterprise Linux 7.0+ VM openshift.io/documentation-url: https://github.com/kubevirt/common-templates openshift.io/provider-display-name: KubeVirt openshift.io/support-url: https://github.com/kubevirt/common-templates/issues tags: kubevirt,virtualmachine,linux,rhel template.kubevirt.io/editable: | /objects[0].spec.template.spec.domain.cpu.sockets /objects[0].spec.template.spec.domain.cpu.cores /objects[0].spec.template.spec.domain.cpu.threads /objects[0].spec.template.spec.domain.resources.requests.memory /objects[0].spec.template.spec.domain.devices.disks /objects[0].spec.template.spec.volumes /objects[0].spec.template.spec.networks template.kubevirt.io/version: v1alpha1 template.openshift.io/bindable: "false" validations: | [ { "name": "minimal-required-memory", "path": "jsonpath::.spec.domain.resources.requests.memory", "rule": "integer", "message": "This VM requires more memory.", "min": 1610612736 } ]
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-2020:2011