Kanagaraj M has posted comments on this change. Change subject: gluster: Disable Rebalance/Remove Brick when one or more bricks are down ......................................................................
Patch Set 4: (3 comments) .................................................... File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/validator/gluster/GlusterBrickValidator.java Line 72: List<GlusterBrickEntity> bricks = volumeEntity.getBricks(); Line 73: if (volumeEntity.getVolumeType().isReplicatedType()) { Line 74: replicaCount = volumeEntity.getReplicaCount(); Line 75: } else { Line 76: replicaCount = 1; you can avoid this, if you make the replicaCount = 1 in the declaration itself Line 77: } Line 78: Line 79: int brickIndex = 0, replicaIndex = 0; Line 80: while (brickIndex < bricks.size()) { .................................................... File backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/validator/GlusterBrickValidatorTest.java Line 31: volumeEntity.setBricks(getBricks(volumeId, brickCount)); Line 32: return volumeEntity; Line 33: } Line 34: Line 35: private GlusterVolumeEntity getDistributeReplacatedVolume(Guid volumeId, int brickCount, int replicaCount) { getDistributeReplicatedVolume Line 36: GlusterVolumeEntity volumeEntity = new GlusterVolumeEntity(); Line 37: volumeEntity.setId(volumeId); Line 38: volumeEntity.setName("test-vol"); Line 39: volumeEntity.addAccessProtocol(AccessProtocol.GLUSTER); Line 74: assertFalse(validationResult.isValid()); Line 75: Line 76: // Two Bricks Down Line 77: volumeEntity.getBricks().get(4).setStatus(GlusterStatus.DOWN); Line 78: assertFalse(validationResult.isValid()); checking without calling the validator? Line 79: Line 80: // One Brick Down Line 81: volumeEntity.getBricks().get(3).setStatus(GlusterStatus.UP); Line 82: assertFalse(validationResult.isValid()); -- To view, visit http://gerrit.ovirt.org/19984 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib66fe531dfea6099a449fcae8c4370711ae3dd8b Gerrit-PatchSet: 4 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Ramesh N <rnach...@redhat.com> Gerrit-Reviewer: Kanagaraj M <kmayi...@redhat.com> Gerrit-Reviewer: Ramesh N <rnach...@redhat.com> Gerrit-Reviewer: Sahina Bose <sab...@redhat.com> Gerrit-Reviewer: Shubhendu Tripathi <shtri...@redhat.com> Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches