Bug 1436160

Summary: UI error about Enable Discard (formally "Discard After Delete") comes too late
Product: [oVirt] ovirt-engine Reporter: Idan Shaby <ishaby>
Component: Frontend.WebAdminAssignee: Idan Shaby <ishaby>
Status: CLOSED CURRENTRELEASE QA Contact: Kevin Alon Goldblatt <kgoldbla>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.1.0CC: amureini, bugs, lveyde, pstehlik, tnisan, ykaul
Target Milestone: ovirt-4.1.2Flags: rule-engine: ovirt-4.1+
Target Release: 4.1.2   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1414126 Environment:
Last Closed: 2017-05-23 08:20:39 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Storage RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1414126    
Bug Blocks:    
Attachments:
Description Flags
Screen shot for Discard Enabled check box greyed out none

Description Idan Shaby 2017-03-27 11:00:59 UTC
This bug was opened in order to solve the same issue happening in Discard After Delete (DAD) - if the underlying storage does not support discard and DAD is enabled, then the user gets the error message only after the window is closed.
Thus, the UX should be improved also here, in the new/edit storage domain window.

+++ This bug was initially created as a clone of Bug #1414126 +++

Description of problem:
Only after 'OK' and trying to create a disk, I'm getting the following error:
"Cannot add Virtual Disk. The underlying storage of iscsi doesn't support securely discarding which is required by vm1_Disk1's wipe after delete property."

This is:
1. Unclear.
2. Dismisses the disk creation.

Any good reason it cannot be done before the OK? At least move the user back to the dialog so he can fix his wrongdoing.


Version-Release number of selected component (if applicable):
master.

How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

--- Additional comment from Tal Nisan on 2017-01-18 10:13:46 IST ---

Generally for simple validations that don't require too much data from the backend or more complicated logic duplication we do them in the UI (e.g. data center is lower than version X so we disable feature Y) while for validations that require more logic or querying more data we validate them in the validation part of the command after it has been executed and close the pop up for better user experience, this behavior exists in many of the other pop ups as well.

Idan, can you please check if it is feasible to validate the discard support within the client? If not we can maybe extract it to a validation backend query prior to running the command and closing the pop up, it makes no sense for the user to lose all the new disk data he entered just because of the discard

Comment 1 Red Hat Bugzilla Rules Engine 2017-03-27 11:01:08 UTC
Target release should be placed once a package build is known to fix a issue. Since this bug is not modified, the target version has been reset. Please use target milestone to plan a fix for a oVirt release.

Comment 2 Kevin Alon Goldblatt 2017-05-07 15:24:45 UTC
Verified with the following code:
------------------------------------
ovirt-engine-4.1.2.1-0.1.el7.noarch
rhevm-4.1.2.1-0.1.el7.noarch

Verified with the following scenario:
--------------------------------------
1. Create new disk on storage that does not support discard >>> The Enable Discard check box is greyed out. On storage that does support discard the Enable Discard check box can be checked


Moving to VERIFIED!

Comment 3 Kevin Alon Goldblatt 2017-05-07 15:26:10 UTC
Created attachment 1276870 [details]
Screen shot for Discard Enabled check box greyed out

Added Screen shot for Discard Enabled check box greyed out