Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1427543

Summary: A disk that is about to be deleted should be discarded first if it is attached to at least one vm with Pass Discard enabled
Product: [oVirt] ovirt-engine Reporter: Idan Shaby <ishaby>
Component: Backend.CoreAssignee: Idan Shaby <ishaby>
Status: CLOSED CURRENTRELEASE QA Contact: Kevin Alon Goldblatt <kgoldbla>
Severity: medium Docs Contact:
Priority: high    
Version: futureCC: amureini, bugs, ishaby, lveyde, tnisan
Target Milestone: ovirt-4.1.2Flags: amureini: ovirt-4.1?
amureini: exception?
amureini: planning_ack?
amureini: devel_ack+
rule-engine: testing_ack+
Target Release: 4.1.2   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Up until now, a disk would have been discarded only if its block storage domain's Discard After Delete was enabled. From now and on, a disk will be discarded also if it is attached to at least one virtual machine with Pass Discard enabled. The logic behind this is that if the user wanted "live" discarding, he will probably want to discard the whole disk when it is removed even if its storage domain's Discard After Delete property is disabled. For more information, please refer to the "Discard After Delete" feature page - http://www.ovirt.org/develop/release-management/features/storage/discard-after-delete/ .
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-05-23 08:22:33 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:

Description Idan Shaby 2017-02-28 14:47:58 UTC
Description of problem:
Up until now, DAD (Discard After Delete) [1] was not related to Pass Discard [2], i.e a disk was first discarded before it was deleted only if its block storage domain's DAD value was true.
That created a situation where a vm disk that had its Pass Discard enabled was not discarded before it was deleted if its storage domain's DAD value was disabled. This situation does not make sense because if the user specifies that he wants "live" discarding (Pass Discard), he will most likely want to discard the whole disk before it's deleted.

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

How reproducible:
100%

Additional info:
[1] http://www.ovirt.org/develop/release-management/features/storage/discard-after-delete
[2] http://www.ovirt.org/develop/release-management/features/storage/pass-discard-from-guest-to-underlying-storage/

Comment 1 Yaniv Kaul 2017-02-28 15:44:39 UTC
Severity?

Comment 2 Allon Mureinik 2017-02-28 19:58:51 UTC
(In reply to Yaniv Kaul from comment #1)
> Severity?
It's a medium severity bug, IMHO.
It's not terrible (after all, we supported block storage but didn't discard deleted disks since 3.1), but it's ugly, and unintuitive - if I delete something from within the guest a discard would (eventually/potentially) be issued to the array, but if I delete the whole thing it wouldn't.
That doesn't make too much sense from a user's perspective.

Comment 5 Kevin Alon Goldblatt 2017-05-15 17:04:43 UTC
Verfied with the following code:
------------------------------------
ovirt-engine-4.1.2.1-0.1.el7.noarch
rhevm-4.1.2.1-0.1.el7.noarch
vdsm-4.19.14-1.el7ev.x86_64


Verfied with the following scenario:
--------------------------------------
1. Created 2 VMs and attache the same shared disk
2. Verfiied the scenario's of Wipe after Delete and Discard Enabled

Moving to verified!