From 54e55c446d871325de23269623968a196d881fbf Mon Sep 17 00:00:00 2001 From: Dhandapani Date: Wed, 17 Aug 2011 14:02:16 +0530 Subject: Bug 3428: Volume create option is enabled even though the number of bricks is wrong - Fix --- .../gluster/storage/management/console/dialogs/CreateVolumePage1.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/dialogs/CreateVolumePage1.java b/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/dialogs/CreateVolumePage1.java index ba19ef10..8fa27087 100644 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/dialogs/CreateVolumePage1.java +++ b/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/dialogs/CreateVolumePage1.java @@ -409,9 +409,9 @@ public class CreateVolumePage1 extends WizardPage { VOLUME_TYPE volumeType = (VOLUME_TYPE) ((IStructuredSelection) typeComboViewer .getSelection()).getFirstElement(); - if (volumeType == VOLUME_TYPE.DISTRIBUTED_REPLICATE && diskCount % 2 != 0) { + if ((volumeType == VOLUME_TYPE.DISTRIBUTED_REPLICATE || volumeType == VOLUME_TYPE.REPLICATE ) && diskCount % 2 != 0) { setError("Mirror type volume requires bricks in multiples of two"); - } else if (volumeType == VOLUME_TYPE.DISTRIBUTED_STRIPE && diskCount % 4 != 0) { + } else if ((volumeType == VOLUME_TYPE.DISTRIBUTED_STRIPE || volumeType == VOLUME_TYPE.STRIPE) && diskCount % 4 != 0) { setError("Stripe type volume requires bricks in multiples of four"); } } -- cgit