Change in ovirt-engine[ovirt-engine-4.1]: core: ReduceSANStorageDomainDevices - free space validation

Code Review gerrit at ovirt.org
Sun Jan 8 22:00:22 UTC 2017


>From Tal Nisan <tnisan at redhat.com>:

Tal Nisan has submitted this change and it was merged.

Change subject: core: ReduceSANStorageDomainDevices - free space validation
......................................................................


core: ReduceSANStorageDomainDevices - free space validation

The user can execute the ReduceSANStorageDomainDevices command with few
devices to reduce from the domain.
ReduceSANStorageDomainDevices executes RemoveDeviceFromSANStorageDomain
for each of the devices, this command first moves the data from the
device and then reduces the domain by removing the device from it.
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 space (as lvm isn't aware that the user actually wants
to reduce more than one device).

This patch adds verification that there's enough free space for the
operation - the command executes getVgInfo, sums the pe allocation of
the devices for reduction and checks if the number of the free extents
is sufficent.

Change-Id: I80cfb95b61692ea83c3eaf2c490d20b17b2d0236
Bug-Url: https://bugzilla.redhat.com/1410115
Signed-off-by: Liron Aravot <laravot at redhat.com>
---
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/domain/BlockStorageDomainHelper.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/domain/ReduceSANStorageDomainDevicesCommand.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/AuditLogType.java
M backend/manager/modules/dal/src/main/resources/bundles/AuditLogMessages.properties
4 files changed, 53 insertions(+), 4 deletions(-)

Approvals:
  Tal Nisan: Looks good to me, approved
  Jenkins CI: Passed CI tests
  Liron Aravot: Verified



-- 
To view, visit https://gerrit.ovirt.org/69609
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I80cfb95b61692ea83c3eaf2c490d20b17b2d0236
Gerrit-PatchSet: 5
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-4.1
Gerrit-Owner: Liron Aravot <laravot at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Liron Aravot <laravot at redhat.com>
Gerrit-Reviewer: Tal Nisan <tnisan at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>


More information about the Engine-commits mailing list