Bug 1925019 - Common Templates - after upgrade, "template.kubevirt.io/deprecated" annotation should be added to older templates versions
Summary: Common Templates - after upgrade, "template.kubevirt.io/deprecated" annotatio...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Container Native Virtualization (CNV)
Classification: Red Hat
Component: SSP
Version: 2.6.0
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: ---
: 2.6.2
Assignee: Karel Šimon
QA Contact: Israel Pinto
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-02-04 08:25 UTC by Ruth Netser
Modified: 2021-05-04 20:09 UTC (History)
4 users (show)

Fixed In Version: kubevirt-ssp-operator-container-v2.6.1-5
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-05-04 20:09:13 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github kubevirt ssp-operator pull 127 0 None open add deprecated label to old templates 2021-03-02 12:30:09 UTC
Github kubevirt ssp-operator pull 141 0 None open move deprecated label to annotations 2021-03-31 09:01:54 UTC
Github kubevirt ssp-operator pull 142 0 None open backport deprecated annotation 2021-04-06 07:55:00 UTC
Red Hat Product Errata RHEA-2021:1502 0 None None None 2021-05-04 20:09:23 UTC

Description Ruth Netser 2021-02-04 08:25:33 UTC
Description of problem:
After upgrade, older, deprecated templates may exist.
"template.kubevirt.io/deprecated" annotation should be added to these templates 

(completion to bug 1924583 and bug 1859235)

Version-Release number of selected component (if applicable):
CNV 2.5.3->2.6.0

How reproducible:
100%

Steps to Reproduce:
1. Upgrade from CNV 2.5.z - > 2.6.0


Actual results:
Some templates are deprecated.
While the os-flavor-workload labels are removed, "template.kubevirt.io/deprecated" annotation should be added as well.

Expected results:


Additional info:

Comment 1 Ruth Netser 2021-03-30 13:02:41 UTC
Tested with SSP operator v2.6.1-5.
Annotation is not added to templates after upgrade, for example fedora-highperformance-medium-v0.11.3:


  annotations:
    defaults.template.kubevirt.io/disk: rootdisk
    description: |-
      Template for Fedora 31 VM or newer. A PVC with the Fedora disk image must be available.
      Recommended disk image: https://download.fedoraproject.org/pub/fedora/linux/releases/32/Cloud/x86_64/images/Fedora-Cloud-Base-32-1.6.x86_64.qcow2
    iconClass: icon-fedora
    name.os.template.kubevirt.io/fedora31: Fedora 31 or higher
    name.os.template.kubevirt.io/fedora32: Fedora 31 or higher
    name.os.template.kubevirt.io/silverblue31: Fedora 31 or higher
    name.os.template.kubevirt.io/silverblue32: Fedora 31 or higher
    openshift.io/display-name: Fedora 31+ 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
    operator-sdk/primary-resource: openshift-cnv/ssp-kubevirt-hyperconverged
    operator-sdk/primary-resource-type: SSP.ssp.kubevirt.io
    tags: hidden,kubevirt,virtualmachine,fedora
    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
        }
      ]

Comment 2 Fabian Deutsch 2021-03-31 14:16:23 UTC
We are moving this out to 2.6.2 as it's not urgent eoungh

Comment 3 Omer Yahud 2021-04-11 07:42:03 UTC
  
@ksimon I remember the PR was backported last week, can't this be moved to ON_QA?

Comment 4 Fabian Deutsch 2021-04-13 10:54:16 UTC
The PR got merged, moving to MODIFIED

Comment 5 Ruth Netser 2021-04-25 07:02:32 UTC
Verified with SSP v2.6.2-2.
Upgraded from 2.5.5 -> 2.6.0 - > 2.6.1 - > 2.6.2

Old templates have template.kubevirt.io/deprecated: "true"
New templates do not have the label.
The UI displays only active templates.

Comment 11 errata-xmlrpc 2021-05-04 20:09:13 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 (OpenShift Virtualization 2.6.2 Images), 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-2021:1502


Note You need to log in before you can comment on or make changes to this bug.