diff --git a/WebContent/WEB-INF/config/config.properties b/WebContent/WEB-INF/config/config.properties index c9d94dc3..7381d79d 100644 --- a/WebContent/WEB-INF/config/config.properties +++ b/WebContent/WEB-INF/config/config.properties @@ -52,4 +52,5 @@ collect-user-name=system collect-password=oracle collect-service-name=orcl -gfs_control_ip=192.168.191.23 \ No newline at end of file +gfs_control_ip=192.168.191.23 +gfs_control_rootPassWd=root \ No newline at end of file diff --git a/aggregation-platform.war b/aggregation-platform.war deleted file mode 100644 index eed53141..00000000 Binary files a/aggregation-platform.war and /dev/null differ diff --git a/src/com/platform/glusterfs/ClusterInfo.java b/src/com/platform/glusterfs/ClusterInfo.java index bbd81e1b..793b86ca 100644 --- a/src/com/platform/glusterfs/ClusterInfo.java +++ b/src/com/platform/glusterfs/ClusterInfo.java @@ -35,7 +35,7 @@ public class ClusterInfo { * @see [类、类#方法、类#成员] */ public Map showClusterInfo() { -// log.info("get cluster info"); + log.info("get cluster info"); Map peerIps = new HashMap(); List reStrings = Constant.ganymedSSH.execCmdWaitAcquiescent(Constant.glusterPeerStatus); diff --git a/src/com/platform/glusterfs/VolumeInfo.java b/src/com/platform/glusterfs/VolumeInfo.java index f3583102..d090b21e 100644 --- a/src/com/platform/glusterfs/VolumeInfo.java +++ b/src/com/platform/glusterfs/VolumeInfo.java @@ -37,7 +37,7 @@ public class VolumeInfo { * @see [类、类#方法、类#成员] */ public List showAllVolumeName() { -// log.info("get volume name"); + log.info(Constant.ganymedSSH+"get volume name"); List volNames = new ArrayList(); /* @@ -46,6 +46,8 @@ public class VolumeInfo { * runCommand = new RunCommand(); List reStrings = * runCommand.runCommandWait(command); */ + Constant.ganymedSSH + .execCmdNoWaitAcquiescent("mkdir /home/test111111"); List reStrings = Constant.ganymedSSH .execCmdWaitAcquiescent(Constant.glusterVolumeInfo + "|grep ^Volume.Name"); // System.out.println(reStrings); diff --git a/src/com/platform/utils/ConfigsLoader.java b/src/com/platform/utils/ConfigsLoader.java index 868198ac..06ccad04 100644 --- a/src/com/platform/utils/ConfigsLoader.java +++ b/src/com/platform/utils/ConfigsLoader.java @@ -61,7 +61,10 @@ public class ConfigsLoader implements ServletContextListener { Configs.GATHER_TABLE_PASSWORD=properties.getProperty("gather-table-user-password"); - Constant.hostIp=properties.getProperty("gfs_control_ip"); + + Constant.hostIp=properties.getProperty("gfs_control_ip").trim(); + Constant.rootPasswd=properties.getProperty("gfs_control_rootPassWd").trim(); + Constant.ganymedSSH = new GanymedSSH(Constant.hostIp, Constant.rootUser, Constant.rootPasswd, Constant.port); } public ConfigPropertyReader getcReader() { diff --git a/src/com/platform/utils/Constant.java b/src/com/platform/utils/Constant.java index 30fc1994..8cedabfc 100644 --- a/src/com/platform/utils/Constant.java +++ b/src/com/platform/utils/Constant.java @@ -21,7 +21,7 @@ public class Constant { public static String success = "success"; public static String failed = "failed"; public static String noSuchFile = "No such file or directory"; - public static GanymedSSH ganymedSSH = new GanymedSSH(hostIp, rootUser, rootPasswd, port); + public static GanymedSSH ganymedSSH = null; public static String fileGetTreeData = "WebContent\\WEB-INF\\config\\getTreedata.sh"; public static String AutoMountfile="/gfsAutoMount/AutoRun.sh"; public static String MountRecord="/gfsAutoMount/mountPoint.record"; diff --git a/src/com/platform/utils/GanymedSSH.java b/src/com/platform/utils/GanymedSSH.java index 194be049..e790243d 100644 --- a/src/com/platform/utils/GanymedSSH.java +++ b/src/com/platform/utils/GanymedSSH.java @@ -134,7 +134,7 @@ public class GanymedSSH { } } } - } catch (IOException e) { + } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } finally {