Bug 2051775

Summary: UI should show templates which are deployed to custom namespace by SSP
Product: OpenShift Container Platform Reporter: Guohua Ouyang <gouyang>
Component: Console Kubevirt PluginAssignee: Yaacov Zamir <yzamir>
Status: CLOSED CURRENTRELEASE QA Contact: Guohua Ouyang <gouyang>
Severity: high Docs Contact:
Priority: high    
Version: 4.10CC: gouyang, rnetser, rsdeor, sbennert, yzamir
Target Milestone: ---Flags: rsdeor: needinfo+
Target Release: 4.11.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 2054650 (view as bug list) Environment:
Last Closed: 2022-05-11 09:29:11 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:
Bug Depends On:    
Bug Blocks: 2054650    

Description Guohua Ouyang 2022-02-08 01:55:15 UTC
Description of problem:
Deploy templates to custom namespace and then delete templates from 'openshift' namespace, check templates page, no templates found. 
UI should show templates from this new custom ns.

Version-Release number of selected component (if applicable):
4.10.0-0.nightly-2022-02-06-060618

How reproducible:
100%

Steps to Reproduce:
1. change the common template namespace to "test"
$ oc edit hco -n openshift-cnv kubevirt-hyperconverged
spec:
  commonTemplatesNamespace: test
2. delete templates from "openshift".
$ oc delete template --all -n openshift
3. check template page on UI

Actual results:
no template found

Expected results:
UI should render templates from namespace 'test' by reading commonTemplatesNamespace from HCO.

Additional info:

Comment 1 Guohua Ouyang 2022-02-08 04:26:43 UTC
HCO should have `commonTemplatesNamespace: openshift` by default, so UI can easily consume the value.

Comment 2 Guohua Ouyang 2022-02-08 12:41:09 UTC
Adjust Expected results:
UI should show templates in this custom namespace when user select this namespace on template list page.

Comment 5 Yaacov Zamir 2022-02-15 12:27:36 UTC
Auto backport to 4.10 failed because of code confilct
Cloning for 4.10 manually

Comment 7 Guohua Ouyang 2022-02-16 01:46:27 UTC
The templates are showing in custom namespace now, but while creating VM from the template, it shows the error “Requested template could not be found“.

Comment 8 Guohua Ouyang 2022-02-16 02:56:11 UTC
@yaacov After deploy the templates to custom namespace and without deleting templates in "openshift" ns, select custom ns, the UI still shows templates from "openshift" ns, is it an issue need to be fixed?

Comment 9 Guohua Ouyang 2022-02-16 03:06:30 UTC
@Ruth Auto-update boot source is not available for templates in custom ns, should we support it? If yes, I guess the backend/ssp needs to support it firstly.

Comment 10 Yaacov Zamir 2022-02-16 07:43:44 UTC
> @yaacov After deploy the templates to custom namespace and without deleting templates in "openshift" ns, select custom ns, the UI still shows templates from "openshift" ns, is it an issue need to be fixed?

That is as design, if templates are available in "openshift" ns, they are visible from all namespaces ( this will change in 4.11 )

> @Ruth Auto-update boot source is not available for templates in custom ns, should we support it? If yes, I guess the backend/ssp needs to support it firstly.

need a different bug

> The templates are showing in custom namespace now, but while creating VM from the template, it shows the error “Requested template could not be found“.

thanks will take car of that

Comment 11 Guohua Ouyang 2022-02-16 08:49:21 UTC
(In reply to Yaacov Zamir from comment #10)
> > @yaacov After deploy the templates to custom namespace and without deleting templates in "openshift" ns, select custom ns, the UI still shows templates from "openshift" ns, is it an issue need to be fixed?
> 
> That is as design, if templates are available in "openshift" ns, they are
> visible from all namespaces ( this will change in 4.11 )
> 
> > @Ruth Auto-update boot source is not available for templates in custom ns, should we support it? If yes, I guess the backend/ssp needs to support it firstly.
> 
> need a different bug
> 
https://bugzilla.redhat.com/show_bug.cgi?id=2055022

Comment 13 Ruth Netser 2022-04-14 06:41:04 UTC
(In reply to Guohua Ouyang from comment #9)
> @Ruth Auto-update boot source is not available for templates in custom ns,
> should we support it? If yes, I guess the backend/ssp needs to support it
> firstly.

The templates reference boot sources in the same golden images namesapce and should work; can you explain what is missing?

Comment 14 Guohua Ouyang 2022-04-14 08:33:19 UTC
(In reply to Ruth Netser from comment #13)
> (In reply to Guohua Ouyang from comment #9)
> > @Ruth Auto-update boot source is not available for templates in custom ns,
> > should we support it? If yes, I guess the backend/ssp needs to support it
> > firstly.
> 
> The templates reference boot sources in the same golden images namesapce and
> should work; can you explain what is missing?

See bug: https://bugzilla.redhat.com/show_bug.cgi?id=2055022
After deploy the templates to a custom namespace, the boot source are missing.

Comment 16 Guohua Ouyang 2022-05-11 09:29:11 UTC
The original issue is fixed in this bug, close the bug.