Kanagaraj M has uploaded a new change for review.

Change subject: webadmin: fix add-bricks validation in volume creation
......................................................................

webadmin: fix add-bricks validation in volume creation

If the user chooses 'Distributed Replicate' or 'Distributed Stripe'
during volume creation, an error will be showm if the brick count
is not equal to multiple of replica or stripe count respectively.

Change-Id: I3adc50b09f7c246bda0fcd63c906a8c726f5a3aa
Bug-Url: https://bugzilla.redhat.com/886478
Signed-off-by: Kanagaraj M <[email protected]>
---
M 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/gluster/VolumeBrickModel.java
1 file changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/77/22077/1

diff --git 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/gluster/VolumeBrickModel.java
 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/gluster/VolumeBrickModel.java
index b9ada93..24eceda 100644
--- 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/gluster/VolumeBrickModel.java
+++ 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/gluster/VolumeBrickModel.java
@@ -504,14 +504,14 @@
             break;
 
         case DISTRIBUTED_REPLICATE:
-            if (brickCount < replicaCount || (brickCount % replicaCount) != 0)
+            if (brickCount <= replicaCount || (brickCount % replicaCount) != 0)
             {
                 valid = false;
             }
             break;
 
         case DISTRIBUTED_STRIPE:
-            if (brickCount < stripeCount || (brickCount % stripeCount) != 0)
+            if (brickCount <= stripeCount || (brickCount % stripeCount) != 0)
             {
                 valid = false;
             }
@@ -525,7 +525,7 @@
             break;
 
         case DISTRIBUTED_STRIPED_REPLICATE:
-            if (brickCount < stripeCount * replicaCount || (brickCount % 
(stripeCount * replicaCount)) != 0)
+            if (brickCount <= stripeCount * replicaCount || (brickCount % 
(stripeCount * replicaCount)) != 0)
             {
                 valid = false;
             }


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

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

Reply via email to