Bug 1816518 - [SSP] Common templates - template name under objects -> metadata -> labels should be identical to the template actual name
Summary: [SSP] Common templates - template name under objects -> metadata -> labels s...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Container Native Virtualization (CNV)
Classification: Red Hat
Component: SSP
Version: 2.3.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 2.4.0
Assignee: Omer Yahud
QA Contact: Ruth Netser
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-03-24 08:09 UTC by Ruth Netser
Modified: 2020-07-28 19:09 UTC (History)
3 users (show)

Fixed In Version: kubevirt-ssp-operator-container-v2.4.0-41
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-07-28 19:09:44 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2020:3194 0 None None None 2020-07-28 19:09:55 UTC

Description Ruth Netser 2020-03-24 08:09:30 UTC
Description of problem:
Common template name under objects -> metadata -> labels -> vm.kubevirt.io/template contains only a partial name of the actual template name.

When adding a namespace to the template (so that template validator would be used in CLI), VM creation fails.

Version-Release number of selected component (if applicable):
OCP 4.4.0-rc.2
CNV 2.3 (v0.26.3)

How reproducible:
100%

Steps to Reproduce:
1. Edit a common template - add under objects - > metadata -> labels:
vm.kubevirt.io/template.namespace: openshift

2. Create a VM which uses the edited template


Actual results:

In the template:
objects - > metadata -> labels -> vm.kubevirt.io/template = rhel7-server-tiny (template name is rhel7-server-tiny-v0.7.0)

VM creation fails on:

E           kubernetes.client.rest.ApiException: (400)
E           Reason: Bad Request
E           HTTP response headers: HTTPHeaderDict({'Audit-Id': '66d879b0-eda6-430a-8776-cffa7440d10c', 'Content-Type': 'application/json', 'Date': 'Mon, 23 Mar 2020 17:25:45 GMT', 'Content-Length': '241'})
E           HTTP response body: b'{"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"admission webhook \\"virt-template-admission.kubevirt.io\\" denied the request: missing parent template (key=openshift/rhel7-server-tiny) for rhel-7-6","code":400}\n'

Expected results:
VM creation should succeed.


Additional info:
Workaround - edit the template, set objects - > metadata -> labels -> vm.kubevirt.io/template = full template name (e.g rhel7-server-tiny-v0.7.0)
VM creation will succeed.

Comment 1 Karel Šimon 2020-05-06 07:20:06 UTC
Will be fixed by: https://github.com/kubevirt/common-templates/pull/147

Comment 2 Ruth Netser 2020-06-25 13:39:38 UTC
Verified on CNV-2.4.0, OCP: 4.5.0-rc.2, SSP build 58.
Template objects - > metadata -> labels -> vm.kubevirt.io/template match the template name.

Comment 6 errata-xmlrpc 2020-07-28 19:09:44 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/RHSA-2020:3194


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