From 2f22555604f44dbc20d83a614dcb142333f5d03c Mon Sep 17 00:00:00 2001 From: Dhandapani Date: Tue, 9 Aug 2011 17:37:29 +0530 Subject: Replace brick scalable icon change --- .../icons/tango/scalable/brick_migration.svg | 303 +++++++++++++-------- 1 file changed, 190 insertions(+), 113 deletions(-) diff --git a/src/com.gluster.storage.management.console/icons/tango/scalable/brick_migration.svg b/src/com.gluster.storage.management.console/icons/tango/scalable/brick_migration.svg index 280b4c4f..1fa4e0d4 100644 --- a/src/com.gluster.storage.management.console/icons/tango/scalable/brick_migration.svg +++ b/src/com.gluster.storage.management.console/icons/tango/scalable/brick_migration.svg @@ -14,10 +14,17 @@ height="48px" id="svg3373" version="1.1" - inkscape:version="0.48.1 " - sodipodi:docname="volume_option.svg"> + inkscape:version="0.47pre4 r22446" + sodipodi:docname="brick_migration-1.svg"> + + + + + + + + @@ -3368,58 +3445,6 @@ id="layer1" inkscape:label="Layer 1" inkscape:groupmode="layer"> - - - - - - - - - - @@ -3469,7 +3494,7 @@ - - - - - - - - + style="font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;opacity:0.78761058;color:#000000;fill:url(#linearGradient16409);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.25439572px;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Sans;-inkscape-font-specification:Sans" /> + transform="matrix(0.92874096,0,0,0.93075772,-48.444335,-0.37292547)"> + + + + + + + + + + + + + + + + + + -- cgit From 1108eb463a0f8812ea60df583304724a0eb77e41 Mon Sep 17 00:00:00 2001 From: Dhandapani Date: Tue, 9 Aug 2011 18:00:23 +0530 Subject: Bug 3357 - Adding CIFS user to volume fails - Fix --- .../management/gateway/services/VolumeService.java | 2 -- .../storage/management/gateway/utils/GlusterUtil.java | 18 ------------------ 2 files changed, 20 deletions(-) diff --git a/src/com.gluster.storage.management.gateway/src/com/gluster/storage/management/gateway/services/VolumeService.java b/src/com.gluster.storage.management.gateway/src/com/gluster/storage/management/gateway/services/VolumeService.java index 898cc770..0005a5a9 100644 --- a/src/com.gluster.storage.management.gateway/src/com/gluster/storage/management/gateway/services/VolumeService.java +++ b/src/com.gluster.storage.management.gateway/src/com/gluster/storage/management/gateway/services/VolumeService.java @@ -205,10 +205,8 @@ public class VolumeService { private void fetchVolumeCifsUsers(String clusterName, Volume volume) { List users = new ArrayList(); try { - File file = createOnlineServerList(clusterName); ProcessResult result = serverUtil .executeGlusterScript(true, VOLUME_GET_CIFS_USERS_SCRIPT, volume.getName()); - file.delete(); if (!result.isSuccess()) { throw new GlusterRuntimeException(result.toString()); } 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 1cbdd716..db4bd4bd 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 @@ -534,27 +534,9 @@ public class GlusterUtil { volumes.add(volume); } - updateCifsInfo(volumes); - return volumes; } - private void updateCifsInfo(List volumes) { - for (Volume volume : volumes) { - boolean isCifsEnabled = false; - - // TODO: Call python script to check if CIFS is enabled on the volume - - List cifsUsers = new ArrayList(); - if (isCifsEnabled) { - volume.enableCifs(); - volume.setCifsUsers(cifsUsers); - } else { - volume.disableCifs(); - } - } - } - public void addBricks(String volumeName, List bricks, String knownServer) { StringBuilder command = new StringBuilder("gluster volume add-brick " + volumeName); for (String brickDir : bricks) { -- cgit From 45b12625bea311f4599672b359467b184bf6e250 Mon Sep 17 00:00:00 2001 From: Shireesh Anjal Date: Tue, 9 Aug 2011 18:29:48 +0530 Subject: Modified to close the ssh connections after executing commands remotely if they are created using passwords and not using public key. --- .../com/gluster/storage/management/gateway/utils/SshUtil.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/com.gluster.storage.management.gateway/src/com/gluster/storage/management/gateway/utils/SshUtil.java b/src/com.gluster.storage.management.gateway/src/com/gluster/storage/management/gateway/utils/SshUtil.java index 9f5e1072..a5735cae 100644 --- a/src/com.gluster.storage.management.gateway/src/com/gluster/storage/management/gateway/utils/SshUtil.java +++ b/src/com.gluster.storage.management.gateway/src/com/gluster/storage/management/gateway/utils/SshUtil.java @@ -73,7 +73,7 @@ public class SshUtil { public boolean hasDefaultPassword(String serverName) { try { - getConnectionWithPassword(serverName); + getConnectionWithPassword(serverName).close(); return true; } catch(ConnectionException e) { return false; @@ -120,6 +120,7 @@ public class SshUtil { try { publicKeyData = FileUtil.readFileAsByteArray(PUBLIC_KEY_FILE); } catch (Exception e) { + conn.close(); throw new GlusterRuntimeException("Couldn't load public key file [" + PUBLIC_KEY_FILE + "]", e); } @@ -130,6 +131,7 @@ public class SshUtil { outputStream.write(publicKeyData); outputStream.close(); } catch (Exception e) { + conn.close(); throw new GlusterRuntimeException("Couldnt append file [" + localTempFile + "] with public key!", e); } @@ -138,6 +140,7 @@ public class SshUtil { } catch (IOException e) { throw new GlusterRuntimeException("Couldn't add public key to server [" + serverName + "]", e); } finally { + conn.close(); localTempFile.delete(); } @@ -331,7 +334,11 @@ public class SshUtil { * @return Result of remote execution */ public ProcessResult executeRemoteWithPassword(String serverName, String command) { - return executeCommand(getConnectionWithPassword(serverName), command); + Connection conn = getConnectionWithPassword(serverName); + ProcessResult result = executeCommand(conn, command); + // we don't cache password based connections. hence the connection must be closed. + conn.close(); + return result; } private ProcessResult executeRemoteWithPubKey(String serverName, String command) { -- cgit From 3e9e9d9ddf650ba9b15838883b645e22188388ee Mon Sep 17 00:00:00 2001 From: "Bala.FA" Date: Tue, 9 Aug 2011 18:31:07 +0530 Subject: multicast-discover-servers.py exits with error message if fail to open server socket. Signed-off-by: Bala.FA --- .../WebContent/scripts/multicast-discover-servers.py | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/com.gluster.storage.management.gateway/WebContent/scripts/multicast-discover-servers.py b/src/com.gluster.storage.management.gateway/WebContent/scripts/multicast-discover-servers.py index 9c38364c..fcbcd738 100755 --- a/src/com.gluster.storage.management.gateway/WebContent/scripts/multicast-discover-servers.py +++ b/src/com.gluster.storage.management.gateway/WebContent/scripts/multicast-discover-servers.py @@ -35,11 +35,16 @@ def sendMulticastRequest(idString): def openServerSocket(): - server = socket.socket(socket.AF_INET, socket.SOCK_STREAM) - server.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) - server.bind(('', Globals.SERVER_PORT)) - server.listen(Globals.DEFAULT_BACKLOG) - return server + try: + server = socket.socket(socket.AF_INET, socket.SOCK_STREAM) + server.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) + server.bind(('', Globals.SERVER_PORT)) + server.listen(Globals.DEFAULT_BACKLOG) + return server + except socket.error, e: + Utils.log("failed to open server socket on port %s: %s" % (Globals.SERVER_PORT, str(e))) + sys.stderr.write("failed to open server socket on port %s: %s\n" % (Globals.SERVER_PORT, str(e))) + sys.exit(1) def main(): @@ -61,6 +66,7 @@ def main(): try: ilist,olist,elist = select.select(rlist, [], [], 0.25) except select.error, e: + Utils.log("failed to read from connections: %s" % str(e)) break for sock in ilist: # handle new connection -- cgit