Bug 1916580

Summary: Default yaml is broken for VM and VM template
Product: OpenShift Container Platform Reporter: Guohua Ouyang <gouyang>
Component: Console Kubevirt PluginAssignee: Rastislav Wagner <rawagner>
Status: CLOSED ERRATA QA Contact: Guohua Ouyang <gouyang>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.7CC: aos-bugs, gouyang, oyahud, rawagner, yzamir
Target Milestone: ---   
Target Release: 4.7.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-02-24 15:53:46 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:
Attachments:
Description Flags
create vm from template
none
create vm from yaml none

Description Guohua Ouyang 2021-01-15 06:34:44 UTC
Created attachment 1747689 [details]
create vm from template

Description of problem:
Login with a normal user 'test' and create a template via template wizard, then create a vm from this template, it shows an error:

Error "Authorization failed, message is: User system:serviceaccount:test:default has insufficient permissions in clone source namespace ${SRC_PVC_NAMESPACE}" for field "spec.dataVolumeTemplates[0]".

Version-Release number of selected component (if applicable):
OCP 4.7

How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Rastislav Wagner 2021-01-15 14:36:09 UTC
Can you please provide exact steps how you created the template ? It seems to work fine for me, so Im apparently missing something.

can you post template YAML too ?

Comment 2 Omer Yahud 2021-01-17 08:05:56 UTC
To me it looks like parameter substitution is not happening, ${SRC_PVC_NAMESPACE} should have been replaced with the actual namespace name (openshift-virualization-os-images)

Comment 3 Guohua Ouyang 2021-01-18 02:34:22 UTC
Created attachment 1748348 [details]
create vm from yaml

Comment 4 Guohua Ouyang 2021-01-18 02:35:43 UTC
(In reply to Rastislav Wagner from comment #1)
> Can you please provide exact steps how you created the template ? It seems
> to work fine for me, so Im apparently missing something.
> 
> can you post template YAML too ?

It can be simply reproduced by creating vm from the default yaml(without a change), see the new attachment, it should be the same issue.

Comment 6 Guohua Ouyang 2021-01-21 05:49:57 UTC
fixed on latest UI

Comment 9 errata-xmlrpc 2021-02-24 15:53:46 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 (Moderate: OpenShift Container Platform 4.7.0 security, bug fix, and enhancement 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-2020:5633