ofri masad has uploaded a new change for review. Change subject: core: Fix Quota accounting for move disk ......................................................................
core: Fix Quota accounting for move disk When moving a disk without changing a quota the quota check is not performed. This is a problem since the quota can be specific for each storage domain. The logic was changed to support quota change even if quota id was not changed. Change-Id: I33a6a409388622bb0ab14644445a187357ce5fa2 Bug-Url: https://bugzilla.redhat.com/906499 Signed-off-by: Ofri Masad <oma...@redhat.com> --- M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MoveOrCopyDiskCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/lsm/LiveMigrateVmDisksCommand.java 2 files changed, 0 insertions(+), 8 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/59/12159/1 diff --git a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MoveOrCopyDiskCommand.java b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MoveOrCopyDiskCommand.java index c00bcb0..507b8e8 100644 --- a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MoveOrCopyDiskCommand.java +++ b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MoveOrCopyDiskCommand.java @@ -385,10 +385,6 @@ @Override public List<QuotaConsumptionParameter> getQuotaStorageConsumptionParameters() { List<QuotaConsumptionParameter> list = new ArrayList<QuotaConsumptionParameter>(); - // If source and destination are in the same quota - return empty list - if (getImage().getQuotaId() != null && getImage().getQuotaId().equals(getDestinationQuotaId())) { - return list; - } list.add(new QuotaStorageConsumptionParameter( getDestinationQuotaId(), diff --git a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/lsm/LiveMigrateVmDisksCommand.java b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/lsm/LiveMigrateVmDisksCommand.java index 2643431..66f42b2 100644 --- a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/lsm/LiveMigrateVmDisksCommand.java +++ b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/lsm/LiveMigrateVmDisksCommand.java @@ -163,11 +163,7 @@ List<QuotaConsumptionParameter> list = new ArrayList<QuotaConsumptionParameter>(); for (LiveMigrateDiskParameters parameters : getParameters().getParametersList()) { - // If source and destination are in the same quota - return empty list DiskImage diskImage = getDiskImageById(parameters.getImageId()); - if (diskImage.getQuotaId() != null && diskImage.getQuotaId().equals(parameters.getQuotaId())) { - return list; - } list.add(new QuotaStorageConsumptionParameter( parameters.getQuotaId(), -- To view, visit http://gerrit.ovirt.org/12159 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I33a6a409388622bb0ab14644445a187357ce5fa2 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: ofri masad <oma...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches