summaryrefslogtreecommitdiffstats
path: root/src/com.gluster.storage.management.gateway
diff options
context:
space:
mode:
authorSelvasundaram <selvam@gluster.com>2011-08-11 20:50:38 +0530
committerSelvasundaram <selvam@gluster.com>2011-08-11 20:50:38 +0530
commitde61fdab795233fd60ad68856cd706aaa885364d (patch)
treea24ab76071542ff1cb71a95d4de124dd62e9b54b /src/com.gluster.storage.management.gateway
parentf7cde0f859903574ed5a41f424a010667408ac70 (diff)
Gluster online server parsing issue fix
Cifs stop issue fix Multiple selection of volume start / stop operation fail issue fix
Diffstat (limited to 'src/com.gluster.storage.management.gateway')
-rw-r--r--src/com.gluster.storage.management.gateway/src/com/gluster/storage/management/gateway/services/VolumeService.java15
-rw-r--r--src/com.gluster.storage.management.gateway/src/com/gluster/storage/management/gateway/utils/GlusterUtil.java2
2 files changed, 12 insertions, 5 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 d1cb3a26..58335f8f 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
@@ -33,6 +33,7 @@ import java.util.Date;
import java.util.List;
import org.apache.log4j.Logger;
+import org.hibernate.mapping.Array;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@@ -302,8 +303,11 @@ public class VolumeService {
public void createCIFSUsers(String clusterName, String volumeName, String cifsUsers) {
try {
File file = createOnlineServerList(clusterName);
- ProcessResult result = serverUtil.executeGlusterScript(true, VOLUME_CREATE_CIFS_SCRIPT,
- file.getAbsolutePath(), volumeName, cifsUsers.replace(",", " "));
+ List<String> arguments = new ArrayList<String>();
+ arguments.add(file.getAbsolutePath());
+ arguments.add(volumeName);
+ arguments.addAll( Arrays.asList(cifsUsers.replaceAll(" ", "").split(",")));
+ ProcessResult result = serverUtil.executeGlusterScript(true, VOLUME_CREATE_CIFS_SCRIPT, arguments);
file.delete();
Volume volume = getVolume(clusterName, volumeName);
// If the volume service is already in running, create user may start CIFS re-export automatically.
@@ -326,8 +330,11 @@ public class VolumeService {
public void modifyCIFSUsers(String clusterName, String volumeName, String cifsUsers) {
try {
File file = createOnlineServerList(clusterName);
- ProcessResult result = serverUtil.executeGlusterScript(true, VOLUME_MODIFY_CIFS_SCRIPT,
- file.getAbsolutePath(), volumeName, cifsUsers.replace(",", " "));
+ List<String> arguments = new ArrayList<String>();
+ arguments.add(file.getAbsolutePath());
+ arguments.add(volumeName);
+ arguments.addAll( Arrays.asList(cifsUsers.split(",")));
+ ProcessResult result = serverUtil.executeGlusterScript(true, VOLUME_MODIFY_CIFS_SCRIPT, arguments);
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 ccb1054a..86337a6a 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
@@ -56,7 +56,7 @@ public class GlusterUtil {
private static final String HOSTNAME_PFX = "Hostname:";
private static final String UUID_PFX = "Uuid:";
private static final String STATE_PFX = "State:";
- private static final String GLUSTER_SERVER_STATUS_ONLINE = "Connected";
+ private static final String GLUSTER_SERVER_STATUS_ONLINE = "Peer in Cluster (Connected)";
private static final String VOLUME_NAME_PFX = "Volume Name:";
private static final String VOLUME_TYPE_PFX = "Type:";