Bug 1410115 - Free space validation when removing multiple devices from a storage domain
Summary: Free space validation when removing multiple devices from a storage domain
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: BLL.Storage
Version: 4.1.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ovirt-4.1.0-rc
: 4.1.0.2
Assignee: Liron Aravot
QA Contact: Lilach Zitnitski
URL:
Whiteboard:
Depends On: 1410182
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-01-04 14:00 UTC by Liron Aravot
Modified: 2017-02-15 15:01 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1410182 (view as bug list)
Environment:
Last Closed: 2017-02-15 15:01:48 UTC
oVirt Team: Storage
Embargoed:
rule-engine: ovirt-4.1+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 69153 0 None None None 2017-01-04 14:06:01 UTC
oVirt gerrit 69154 0 None None None 2017-01-04 14:07:07 UTC
oVirt gerrit 69155 0 None None None 2017-01-04 14:07:45 UTC
oVirt gerrit 69607 0 ovirt-engine-4.1 MERGED common: adding pe allocation/pe count fields to LUN 2017-01-08 22:00:25 UTC
oVirt gerrit 69608 0 ovirt-engine-4.1 MERGED core: getDeviceList.parseLun() - PE related fields 2017-01-08 22:00:28 UTC
oVirt gerrit 69609 0 ovirt-engine-4.1 MERGED core: ReduceSANStorageDomainDevices - free space validation 2017-01-08 22:00:32 UTC

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!


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