Bug 1918112

Summary: Flavor is not editable if a customize VM is created from cli
Product: OpenShift Container Platform Reporter: Guohua Ouyang <gouyang>
Component: Console Kubevirt PluginAssignee: Phillip Bailey <phbailey>
Status: CLOSED ERRATA QA Contact: Guohua Ouyang <gouyang>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.7CC: aos-bugs, gouyang, phbailey, rawagner, tjelinek, yzamir
Target Milestone: ---   
Target Release: 4.7.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-02-24 15:54:57 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
vm yaml none

Description Guohua Ouyang 2021-01-20 04:52:20 UTC
Created attachment 1748937 [details]
vm yaml

Description of problem:
Flavor is not editable if a customize VM is created from cli

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 2 Yaacov Zamir 2021-01-20 16:39:45 UTC
flavor is a way to choose a common template, IFAIU choosing a flavor has no meaning while editing a VM that was not created using a common template as a base.

@Tomas @Rastislav what do we want "edit flavor" to mean/do after the base-template already selected and the VM is created ?

a - do we want to set cpu/memory (without changing the base template) ?
b - do we want to do some creative labelling and annotating to make it look like the VM was created using a different template ?

c - I agree with Guohua that the current state need change, maybe we can just disable editing flavor in cases we don't have the base template ?

Comment 3 Tomas Jelinek 2021-01-21 09:52:38 UTC
@Yaacov: I believe what we need to do is to allow only to edit the cpu/memory (e.g. custom flavor). This is what we do today with normal VMs created from templates, you can change the flavor only to custom and change cpu/memory which does not touch the base template, just those two fields. Should work the same if there is no base template at all, you have custom flavor and just edit cpu/memory. WDYT?

Comment 4 Rastislav Wagner 2021-01-21 10:30:53 UTC
I agree with Tomas, we should be able to edit cpu/memory for custom flavor in all cases

Comment 5 Yaacov Zamir 2021-01-25 07:14:43 UTC
Tomas and Rastislav (comment#3 Commant#4), thanks +1

Comment 6 Yaacov Zamir 2021-01-25 07:17:53 UTC
Note:

If the template named in the VM does not exist (e.g. flavor="small" but no template named "...-small" exist) -
User will see only "Custom" option and will be able to edit the cpu and mem

Comment 8 Guohua Ouyang 2021-02-01 03:31:47 UTC
Verified on master

Comment 11 errata-xmlrpc 2021-02-24 15:54:57 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