Shubhendu Tripathi has uploaded a new change for review. Change subject: gluster: Corrected the remove bricks status at iussue ......................................................................
gluster: Corrected the remove bricks status at iussue Corrected to set the correct value of the started at field value for the task started for removal of gluster volumes bricks. Change-Id: I0d6d5dacffef2306545e269c2d7df08238e4e166 Signed-off-by: Shubhendu Tripathi <shtri...@redhat.com> --- M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/GetGlusterVolumeRemoveBricksStatusQuery.java 1 file changed, 10 insertions(+), 3 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/81/20181/1 diff --git a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/GetGlusterVolumeRemoveBricksStatusQuery.java b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/GetGlusterVolumeRemoveBricksStatusQuery.java index 71bf710..353428a 100644 --- a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/GetGlusterVolumeRemoveBricksStatusQuery.java +++ b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/GetGlusterVolumeRemoveBricksStatusQuery.java @@ -3,6 +3,7 @@ import java.util.List; import org.ovirt.engine.core.common.action.gluster.GlusterVolumeRemoveBricksQueriesParameters; +import org.ovirt.engine.core.common.asynctasks.gluster.GlusterAsyncTask; import org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity; import org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeTaskStatusEntity; import org.ovirt.engine.core.common.errors.VdcBllMessages; @@ -50,9 +51,15 @@ // Set the volume re-balance start time GlusterVolumeTaskStatusEntity entity = (GlusterVolumeTaskStatusEntity) returnValue.getReturnValue(); - List<Step> stepsList = getStepDao().getStepsByExternalId(volume.getAsyncTask().getStepId()); - if (stepsList != null && !stepsList.isEmpty()) { - entity.setStartTime(stepsList.get(0).getStartTime()); + GlusterAsyncTask asyncTask = volume.getAsyncTask(); + if (asyncTask != null) { + Guid taskId = asyncTask.getTaskId(); + if (taskId != null) { + List<Step> stepsList = getStepDao().getStepsByExternalId(taskId); + if (stepsList != null && !stepsList.isEmpty()) { + entity.setStartTime(stepsList.get(0).getStartTime()); + } + } } return entity; -- To view, visit http://gerrit.ovirt.org/20181 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0d6d5dacffef2306545e269c2d7df08238e4e166 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Shubhendu Tripathi <shtri...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches