Ramesh N has posted comments on this change. Change subject: engine:BLL Command to Start Remove Gluster volume brick ......................................................................
Patch Set 6: (8 comments) .................................................... File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/StartRemoveGlusterVolumeBricksCommand.java Line 51: return false; Line 52: } Line 53: if (getParameters().getBricks() == null || getParameters().getBricks().size() == 0) { Line 54: addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_BRICKS_REQUIRED); Line 55: return false; Done Line 56: } Line 57: if (getGlusterVolume().getBricks().size() == 1 || Line 58: getGlusterVolume().getBricks().size() <= getParameters().getBricks().size()) { Line 59: addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_CAN_NOT_REMOVE_ALL_BRICKS_FROM_VOLUME); Line 59: addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_CAN_NOT_REMOVE_ALL_BRICKS_FROM_VOLUME); Line 60: return false; Line 61: } Line 62: if (getGlusterVolume().getVolumeType() == GlusterVolumeType.REPLICATE Line 63: || getGlusterVolume().getVolumeType() == GlusterVolumeType.DISTRIBUTED_REPLICATE) { Done Line 64: if (getParameters().getReplicaCount() < getGlusterVolume().getReplicaCount() - 1) { Line 65: addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_CAN_NOT_REDUCE_REPLICA_COUNT_MORE_THAN_ONE); Line 66: return false; Line 67: } else if (getParameters().getReplicaCount() > getGlusterVolume().getReplicaCount()) { Line 75: @Override Line 76: protected void executeCommand() { Line 77: int replicaCount = Line 78: (getGlusterVolume().getVolumeType() == GlusterVolumeType.REPLICATE Line 79: || getGlusterVolume().getVolumeType() == GlusterVolumeType.DISTRIBUTED_REPLICATE) Done Line 80: ? getParameters().getReplicaCount() Line 81: : 0; Line 82: Line 83: startSubStep(); Line 112: * @param bricks Line 113: * The bricks to validate Line 114: * @return true if all bricks have valid ids, else false Line 115: */ Line 116: private boolean validateBricks(List<GlusterBrickEntity> bricks) { Done Line 117: GlusterVolumeEntity volume = getGlusterVolume(); Line 118: for (GlusterBrickEntity brick : bricks) { Line 119: if (brick.getServerName() != null && brick.getBrickDirectory() != null) { Line 120: // brick already contains required info. .................................................... File backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/VdcEventNotificationUtils.java Line 69: AddEventNotificationEntry(EventNotificationEntity.GlusterVolume, AuditLogType.GLUSTER_VOLUME_REMOVE_BRICKS_FAILED); Line 70: AddEventNotificationEntry(EventNotificationEntity.GlusterVolume, Line 71: AuditLogType.START_REMOVING_GLUSTER_VOLUME_BRICKS); Line 72: AddEventNotificationEntry(EventNotificationEntity.GlusterVolume, Line 73: AuditLogType.START_REMOVING_GLUSTER_VOLUME_BRICKS_FAILED); Done Line 74: AddEventNotificationEntry(EventNotificationEntity.GlusterVolume, AuditLogType.GLUSTER_VOLUME_REBALANCE_START); Line 75: AddEventNotificationEntry(EventNotificationEntity.GlusterVolume, AuditLogType.GLUSTER_VOLUME_REBALANCE_START_FAILED); Line 76: AddEventNotificationEntry(EventNotificationEntity.GlusterVolume, AuditLogType.GLUSTER_VOLUME_REBALANCE_STOP); Line 77: AddEventNotificationEntry(EventNotificationEntity.GlusterVolume, AuditLogType.GLUSTER_VOLUME_REBALANCE_STOP_FAILED); .................................................... File backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/asynctasks/gluster/GlusterTaskType.java Line 6: import org.ovirt.engine.core.common.job.StepEnum; Line 7: Line 8: public enum GlusterTaskType { Line 9: REBALANCE_VOLUME(StepEnum.REBALANCING_VOLUME), Line 10: REMOVING_GLUSTER_VOLUME_BIRCK(StepEnum.REMOVING_GLUSTER_VOLUME_BIRCK), Done Line 11: ; Line 12: Line 13: private StepEnum step; Line 14: private static Map<StepEnum, GlusterTaskType> mappings; .................................................... File backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/job/StepEnum.java Line 22: Line 23: // Gluster Line 24: SETTING_GLUSTER_OPTION, Line 25: REBALANCING_VOLUME, Line 26: REMOVING_GLUSTER_VOLUME_BIRCK, Done Line 27: Line 28: /** Line 29: * Maps VDSM tasks type to {@code StepEnum} so it can be resolvable as readable description Line 30: */ .................................................... File backend/manager/modules/dal/src/main/resources/bundles/AuditLogMessages.properties Line 619: GLUSTER_VOLUME_REBALANCE_START_FAILED=Could not start Gluster Volume ${glusterVolumeName} rebalance. Line 620: GLUSTER_VOLUME_REBALANCE_STOP=Gluster Volume ${glusterVolumeName} rebalance stopped. Line 621: GLUSTER_VOLUME_REBALANCE_STOP_FAILED=Could not stop rebalance of gluster volume ${glusterVolumeName}. Line 622: START_REMOVING_GLUSTER_VOLUME_BRICKS=Started removing bricks from Gluser Volume ${glusterVolumeName} Line 623: START_REMOVING_GLUSTER_VOLUME_BRICKS_FAILED=Could not remove brick from Gluser Volume ${glusterVolumeName} Done Line 624: GLUSTER_VOLUME_REPLACE_BRICK_FAILED=Replace Gluster Volume Brick failed Line 625: GLUSTER_VOLUME_REPLACE_BRICK_START=Gluster Volume ${glusterVolumeName} Replace Brick started. Line 626: GLUSTER_VOLUME_REPLACE_BRICK_START_FAILED=Could not start Gluster Volume ${glusterVolumeName} Replace Brick. Line 627: GLUSTER_SERVER_ADD_FAILED=Failed to add gluster server ${VdsName} into Cluster ${VdsGroupName}. -- To view, visit http://gerrit.ovirt.org/18923 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie3ee4620b75b4b714087dbf1dec3720661a5ce6b Gerrit-PatchSet: 6 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