diff options
| author | Dhandapani <dhandapani@gluster.com> | 2011-07-21 17:09:02 +0530 |
|---|---|---|
| committer | Dhandapani <dhandapani@gluster.com> | 2011-07-21 17:09:55 +0530 |
| commit | 35b2c77c6810d3c3eeffcfffeb8f99351dd8dd7a (patch) | |
| tree | dd86a81cba58f9f4569882bb3461b4251ead22c5 | |
| parent | 93aaf63ed1587bc348a682204b37dc0e335416d2 (diff) | |
Bug 3203 - GUI allows removing single brick from a distributed-replicated volume & tells its succeeded
| -rw-r--r-- | src/com.gluster.storage.management.server/src/com/gluster/storage/management/server/resources/v1_0/VolumesResource.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/com.gluster.storage.management.server/src/com/gluster/storage/management/server/resources/v1_0/VolumesResource.java b/src/com.gluster.storage.management.server/src/com/gluster/storage/management/server/resources/v1_0/VolumesResource.java index a00ed974..fb3923fc 100644 --- a/src/com.gluster.storage.management.server/src/com/gluster/storage/management/server/resources/v1_0/VolumesResource.java +++ b/src/com.gluster.storage.management.server/src/com/gluster/storage/management/server/resources/v1_0/VolumesResource.java @@ -475,15 +475,19 @@ public class VolumesResource extends AbstractResource { } public void removeBricks(String clusterName, String volumeName, List<String> brickList, GlusterServer onlineServer) { + Status status; try { - glusterUtil.removeBricks(volumeName, brickList, onlineServer.getName()); + status = glusterUtil.removeBricks(volumeName, brickList, onlineServer.getName()); } catch (ConnectionException e) { // online server has gone offline! try with a different one. onlineServer = clusterService.getNewOnlineServer(clusterName); if (onlineServer == null) { throw new GlusterRuntimeException("No online servers found in cluster [" + clusterName + "]"); } - glusterUtil.removeBricks(volumeName, brickList, onlineServer.getName()); + status = glusterUtil.removeBricks(volumeName, brickList, onlineServer.getName()); + } + if (!status.isSuccess()) { + throw new GlusterRuntimeException(status.toString()); } } |
