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

Bug 1410115

Summary: Free space validation when removing multiple devices from a storage domain
Product: [oVirt] ovirt-engine Reporter: Liron Aravot <laravot>
Component: BLL.StorageAssignee: Liron Aravot <laravot>
Status: CLOSED CURRENTRELEASE QA Contact: Lilach Zitnitski <lzitnits>
Severity: high Docs Contact:
Priority: unspecified    
Version: 4.1.0CC: bugs, gklein
Target Milestone: ovirt-4.1.0-rcFlags: rule-engine: ovirt-4.1+
Target Release: 4.1.0.2   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1410182 (view as bug list) Environment:
Last Closed: 2017-02-15 15:01:48 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: 1410182    
Bug Blocks:    

Description Liron Aravot 2017-01-04 14:00:57 UTC
Description of problem:
A user can attempt to remove multiple devices from a block storage domain.
For each of the devices, the data is first moved from the
device to other devices of the domain and then the device is removed from the domain.
The data is moved using the lvm command pvmove, if there's not enough
free space the operation will fail.

When attempting to reduce multiple devices, we can't rely on the lvm
verification for free space (as lvm isn't aware that the user we are going to remove more devices from the domain). regardless - validating it instead of failing on the lvm command execution is more user friendly.

How reproducible:
Always - complicated reproduction

Steps to Reproduce:
1. Create a block domain with 1 devices
2. create a preallocated disk in a size close to the device size.
3. extend the domain with another device with size similar to the first device (let's call that device A)
4. create a preallocated disk in size close to the device size.
5. extend the domain with another device with size similar to the first device (yes, again - let's call that device B).
6. create a preallocated disk in size close to the device size.
7. delete the disk residing on device A.
8. send a request to remove devices A and B from the domain (A should appear first).


Actual results:
The first device is removed from the domain successfully, the second device removal fails because of lack of free space.

Expected results:
The engine should determine the free space needed to reduce all the devices passed by the user and validate that there is enough free space prior to removing any of the devices from the domain.

Additional info:

Comment 1 Lilach Zitnitski 2017-02-12 11:57:39 UTC
--------------------------------------
Tested with the following code:
----------------------------------------
rhevm-4.1.0.4-0.1.el7.noarch
vdsm-4.19.4-1.el7ev.x86_64

Tested with the following scenario:

Steps to Reproduce:
1. Create a block domain with 1 devices
2. create a preallocated disk in a size close to the device size.
3. extend the domain with another device with size similar to the first device (let's call that device A)
4. create a preallocated disk in size close to the device size.
5. extend the domain with another device with size similar to the first device (yes, again - let's call that device B).
6. create a preallocated disk in size close to the device size.
7. delete the disk residing on device A.
8. send a request to remove devices A and B from the domain (A should appear first). 

Actual results:
reduce sd fails - Can't reduce Storage storage-ge8-iscsi3. There is not enough space on the destination devices of the storage domain

Expected results:

Moving to VERIFIED!