Bug 2086803 - When clonnig a template we need to update vm labels and annotaions to match new template
Summary: When clonnig a template we need to update vm labels and annotaions to match n...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Container Native Virtualization (CNV)
Classification: Red Hat
Component: User Experience
Version: 4.11.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 4.11.0
Assignee: Ugo Palatucci
QA Contact: Guohua Ouyang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-05-16 15:15 UTC by Ugo Palatucci
Modified: 2023-11-13 08:14 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-09-14 19:33:33 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Clone template modal (42.91 KB, image/png)
2022-05-16 16:53 UTC, Yifat Menchik
no flags Details
Updated Clone template modal (51.70 KB, image/png)
2022-05-17 16:53 UTC, Yifat Menchik
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github kubevirt-ui kubevirt-plugin pull 430 0 None open Bug 2086803: Update VM Labels on template cloning 2022-05-17 13:15:50 UTC
Red Hat Issue Tracker CNV-18304 0 None None None 2023-11-13 08:14:39 UTC
Red Hat Product Errata RHSA-2022:6526 0 None None None 2022-09-14 19:33:45 UTC

Description Ugo Palatucci 2022-05-16 15:15:46 UTC
Description of problem:

When cloning a template, the VM has labels and annotations referring to the original template and not the cloned one. 
Also, the cloned template has some annotations referring to the old template.

VM labels to edit:
  vm.kubevirt.io/template: ${NEW_TEMPLATE_NAME}
  vm.kubevirt.io/template.namespace: ${NEW_TEMPLATE_NAMESPACE}

VM labels to delete:
  vm.kubevirt.io/template.version


Template annotations to edit:
  openshift.io/display-name: ${USER_INPUT}


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

How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Ugo Palatucci 2022-05-16 16:20:29 UTC
Hey @yfrimanm,

There is an annotation that the user should be able to edit during the Clone Template process.
It's called 'display name' and is a string. 
Is it okay for you if we add an input text for this?

Comment 2 Yifat Menchik 2022-05-16 16:53:01 UTC
Created attachment 1880221 [details]
Clone template modal

Hi upalatuc I am not sure I understand what you mean by saying "during the Clone Template process". Do you mean adding an annotation input to the clone template modal? (please see attached)

Comment 3 Ugo Palatucci 2022-05-16 16:54:02 UTC
Yes exactly

Comment 4 Yifat Menchik 2022-05-17 06:20:39 UTC
Hi @Ugo Palatucci I think you can add the "Display name" input in the Clone template modal, below the "Template project" input.
Thank you.

Comment 5 Yifat Menchik 2022-05-17 16:53:27 UTC
Created attachment 1880542 [details]
Updated Clone template modal

Comment 6 Guohua Ouyang 2022-05-26 09:06:00 UTC
verified on v4.11.0-403(OCP v4.11.0-32)

Comment 9 errata-xmlrpc 2022-09-14 19:33:33 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 (Important: OpenShift Virtualization 4.11.0 Images security and bug fix update), 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/RHSA-2022:6526


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