diff options
| author | Shireesh Anjal <anjalshireesh@gmail.com> | 2011-08-17 06:47:20 -0700 |
|---|---|---|
| committer | Shireesh Anjal <anjalshireesh@gmail.com> | 2011-08-17 06:47:20 -0700 |
| commit | 11517e925780a8e69ac98080ec1d0eff3f230e71 (patch) | |
| tree | cef4d1db2de393b151aa7beead7fec90e51679ad /src | |
| parent | 83cf7c343ce7c01aa25141c8fc042cf0b326feb0 (diff) | |
| parent | 9103396299d6ab0966a76cb95db6517b81dbdcbf (diff) | |
Merge pull request #244 from Dhandapani/master
Bug 3279 - Not able to switch online server if glusterd on current server is down - fixed
Diffstat (limited to 'src')
| -rw-r--r-- | src/com.gluster.storage.management.gateway/src/com/gluster/storage/management/gateway/utils/GlusterUtil.java | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/com.gluster.storage.management.gateway/src/com/gluster/storage/management/gateway/utils/GlusterUtil.java b/src/com.gluster.storage.management.gateway/src/com/gluster/storage/management/gateway/utils/GlusterUtil.java index 86337a6a..d9c1df3c 100644 --- a/src/com.gluster.storage.management.gateway/src/com/gluster/storage/management/gateway/utils/GlusterUtil.java +++ b/src/com.gluster.storage.management.gateway/src/com/gluster/storage/management/gateway/utils/GlusterUtil.java @@ -135,9 +135,6 @@ public class GlusterUtil { public List<GlusterServer> getGlusterServers(GlusterServer knownServer) { String output = getPeerStatus(knownServer.getName()); - if (output == null) { - return null; - } knownServer.setUuid(getUuid(knownServer.getName())); @@ -207,13 +204,12 @@ public class GlusterUtil { * @return Outout of the "gluster peer status" command */ private String getPeerStatus(String knownServer) { - String output; ProcessResult result = getSshUtil().executeRemote(knownServer, "gluster peer status"); if (!result.isSuccess()) { - output = null; + throw new GlusterRuntimeException("Couldn't get peer status on server [" + knownServer + "]. Error: " + + result); } - output = result.getOutput(); - return output; + return result.getOutput(); } public void addServer(String existingServer, String newServer) { |
