Bug 1881458 - PVC creation - golden images: Cannot attach to Windows OS - "Template missing data image definition"
Summary: PVC creation - golden images: Cannot attach to Windows OS - "Template missing...
Keywords:
Status: CLOSED DUPLICATE of bug 1856412
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Console Kubevirt Plugin
Version: 4.6
Hardware: Unspecified
OS: Unspecified
high
urgent
Target Milestone: ---
: 4.7.0
Assignee: Yaacov Zamir
QA Contact: Guohua Ouyang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-09-22 12:34 UTC by Ruth Netser
Modified: 2020-10-08 21:11 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-10-06 11:44:34 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
PVC screenshot (174.02 KB, image/png)
2020-09-22 12:34 UTC, Ruth Netser
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github openshift console pull 6720 0 None closed Bug 1881458: Fix "Template missing data image definition" 2020-10-11 07:45:46 UTC

Description Ruth Netser 2020-09-22 12:34:12 UTC
Created attachment 1715692 [details]
PVC screenshot

Description of problem:
Golden images - cannot attach a PVC to Windows OS.
The Windows operating systems are greyed out with the following text:
"Template missing data image definition"

Version-Release number of selected component (if applicable):
CNV 2.5.0
OCP 4.6.0-fc.7

How reproducible:
100%

Steps to Reproduce - from the UI:
1. Storage -> Persistent Volume Claims -> Create Persistent Volume Claim -> With Data upload form
2. Check the "Attach this data to a Virtual Machine operating system" checkbox
3. Select Windows from the "Operating System" dropdown

Actual results:
Cannot select Windows OS (see attached screenshot)

Expected results:
Windows OS should be enabled

Additional info:
Looking at Windows common templates, windows-server and windows10-desktop templates contain SRC_PVC_NAMESPACE.
However the old win2k12r2-desktop and win2k12r2-server templates do not contain SRC_PVC_NAME and SRC_PVC_NAMESPACE.

The UI should use windows-server and windows10-desktop templates.

Comment 1 Ruth Netser 2020-09-22 12:36:41 UTC
@oyahud - opened the bug on the UI but I would assume some work would be needed on SSP side as well?

Comment 2 Tomas Jelinek 2020-09-22 14:34:22 UTC
one way or the other, it will need a fix on UI and certainly needs to be fixed in 4.6, targeting there

Comment 4 Guohua Ouyang 2020-09-27 01:08:08 UTC
Still see this on master UI + CNV 2.5, does it depend on SSP side?

Comment 5 Yaacov Zamir 2020-09-29 05:57:49 UTC
@Tomas @Ruth moving to 4.7 because it looks like we need Omers help and I'm not sure we can do it by 4.6

Common template releases a deprecated win2k12r2 templates without SRC_PVC_NAMESPACE and the same version number as the new windows template,
the deprecated win2k12r2 template has the same version number as the new windows number, so we can't now who is current.

@Omer hi,
Is their a way for the UI to identify the deprecated templates and ignore them if a none depracted template found for the same OS with the same version ?
Should the deprecated template have the same version number (we can dismiss them as old if they have older version mumbers) ?

[1] https://github.com/kubevirt/common-templates/blob/master/templates/win2k12r2-deprecated.tpl.yaml
[2] https://github.com/kubevirt/common-templates/blob/master/templates/windows.tpl.yaml

Comment 6 Yaacov Zamir 2020-09-29 07:22:33 UTC
After off-line discussion with @omeryahud we decided to remove:
https://github.com/kubevirt/common-templates/blob/master/templates/win2k12r2-deprecated.tpl.yaml#L28-L31

This will prevent choosing deprecated templates as options in UI drop-downs if they don't have OS name.

Leaving on 4.7, move back to 4.6 once the common templates fix will be ready.

Comment 7 Omer Yahud 2020-09-29 07:42:12 UTC
Hi,

After the discussion with Yaacov, I have created this PR to remove the OS labels and annotations from the UI: 
https://github.com/kubevirt/common-templates/pull/233

Comment 8 Yaacov Zamir 2020-09-29 07:50:05 UTC
Ref - remove name anotation from deprecated templates:
https://bugzilla.redhat.com/show_bug.cgi?id=1856412

Comment 9 Yaacov Zamir 2020-10-06 11:44:34 UTC
closing as duplicate of https://bugzilla.redhat.com/show_bug.cgi?id=1856412 
because the is the root cause of this bug was the deprecated templates, and the fix will be on the operator side.

*** This bug has been marked as a duplicate of bug 1856412 ***


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