Ramesh N has uploaded a new change for review.

Change subject: gluster:fix remove brick validator
......................................................................

gluster:fix remove brick validator

 Substitute volume replicaCount when replicaCount is not passed
in RemoveBrickParameter.

 When user tries to remove a sub volume from DISTRIBUTE_REPLICATE,
he don't need to pass the replicaCount as he is not reducing the
replica count.

Change-Id: Id845f27f01c022c1fdc3240fcf3a7b5a95563bb4
Bug-Url: https://bugzilla.redhat.com/1034346
Signed-off-by: Ramesh Nachimuthu <[email protected]>
---
M 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/validator/gluster/GlusterBrickValidator.java
1 file changed, 3 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/45/21745/1

diff --git 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/validator/gluster/GlusterBrickValidator.java
 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/validator/gluster/GlusterBrickValidator.java
index c4b1d07..d18755d 100644
--- 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/validator/gluster/GlusterBrickValidator.java
+++ 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/validator/gluster/GlusterBrickValidator.java
@@ -24,6 +24,9 @@
     public ValidationResult canRemoveBrick(List<GlusterBrickEntity> bricks,
             GlusterVolumeEntity volumeEntity,
             int replicaCount, boolean forceRemove) {
+        if (replicaCount == 0) {
+            replicaCount = volumeEntity.getReplicaCount();
+        }
         if (bricks.isEmpty()) {
             return new 
ValidationResult(VdcBllMessages.ACTION_TYPE_FAILED_BRICKS_REQUIRED);
         }


-- 
To view, visit http://gerrit.ovirt.org/21745
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id845f27f01c022c1fdc3240fcf3a7b5a95563bb4
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Ramesh N <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to