Updated Branches: refs/heads/master 54c213359 -> 61bc6c847
Cloudstack-3299 incorrect arguments sent to the script createIpalias in case of vmware, Cloudstack-3240 corrected a mistake in the script name. Signed-off-by: Abhinandan Prateek <aprat...@apache.org> Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/160c8f36 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/160c8f36 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/160c8f36 Branch: refs/heads/master Commit: 160c8f361ba0df3f6837b74262f49b2a8a58c286 Parents: 54c2133 Author: Bharat Kumar <bharat.ku...@citrix.com> Authored: Mon Jul 1 18:08:00 2013 +0530 Committer: Abhinandan Prateek <aprat...@apache.org> Committed: Tue Jul 2 12:00:30 2013 +0530 ---------------------------------------------------------------------- .../vmware/resource/VmwareResource.java | 30 ++++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/160c8f36/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java ---------------------------------------------------------------------- diff --git a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java index 286eb48..c3cceb5 100755 --- a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java +++ b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java @@ -2026,36 +2026,36 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa protected Answer execute(final CreateIpAliasCommand cmd) { if (s_logger.isInfoEnabled()) { - s_logger.info("Executing createipAlias command: " + _gson.toJson(cmd)); + s_logger.info("Executing createIpAlias command: " + _gson.toJson(cmd)); } String routerIp = cmd.getAccessDetail(NetworkElementCommand.ROUTER_IP); List<IpAliasTO> ipAliasTOs = cmd.getIpAliasList(); - String args=routerIp+" "; + String args=""; for (IpAliasTO ipaliasto : ipAliasTOs) { args = args + ipaliasto.getAlias_count()+":"+ipaliasto.getRouterip()+":"+ipaliasto.getNetmask()+"-"; } if (s_logger.isDebugEnabled()) { - s_logger.debug("Run command on domR " + cmd.getAccessDetail(NetworkElementCommand.ROUTER_IP) + ", /root/createipAlias " + args); + s_logger.debug("Run command on domR " + cmd.getAccessDetail(NetworkElementCommand.ROUTER_IP) + ", /root/createIpAlias " + args); } try { VmwareManager mgr = getServiceContext().getStockObject(VmwareManager.CONTEXT_STOCK_NAME); String controlIp = getRouterSshControlIp(cmd); Pair<Boolean, String> result = SshHelper.sshExecute(controlIp, DEFAULT_DOMR_SSHPORT, "root", mgr.getSystemVMKeyFile(), null, - "/root/createipAlias.sh " + args); + "/root/createIpAlias.sh " + args); if (!result.first()) { - s_logger.error("ipAlias command on domr " + controlIp + " failed, message: " + result.second()); + s_logger.error("CreateIpAlias command on domr " + controlIp + " failed, message: " + result.second()); return new Answer(cmd, false, "createipAlias failed due to " + result.second()); } if (s_logger.isInfoEnabled()) { - s_logger.info("createipAlias command on domain router " + controlIp + " completed"); + s_logger.info("createIpAlias command on domain router " + controlIp + " completed"); } } catch (Throwable e) { - String msg = "createipAlias failed due to " + VmwareHelper.getExceptionMessage(e); + String msg = "createIpAlias failed due to " + VmwareHelper.getExceptionMessage(e); s_logger.error(msg, e); return new Answer(cmd, false, msg); } @@ -2068,9 +2068,9 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa List<IpAliasTO> revokedIpAliasTOs = cmd.getDeleteIpAliasTos(); List<IpAliasTO> activeIpAliasTOs = cmd.getCreateIpAliasTos(); if (s_logger.isInfoEnabled()) { - s_logger.info("Executing deleteipAlias command: " + _gson.toJson(cmd)); + s_logger.info("Executing deleteIpAlias command: " + _gson.toJson(cmd)); } - String args=routerIp+" "; + String args=""; for (IpAliasTO ipAliasTO : revokedIpAliasTOs) { args = args + ipAliasTO.getAlias_count()+":"+ipAliasTO.getRouterip()+":"+ipAliasTO.getNetmask()+"-"; } @@ -2079,27 +2079,27 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa args = args + ipAliasTO.getAlias_count()+":"+ipAliasTO.getRouterip()+":"+ipAliasTO.getNetmask()+"-"; } if (s_logger.isDebugEnabled()) { - s_logger.debug("Run command on domR " + cmd.getAccessDetail(NetworkElementCommand.ROUTER_IP) + ", /root/deleteipAlias " + args); + s_logger.debug("Run command on domR " + cmd.getAccessDetail(NetworkElementCommand.ROUTER_IP) + ", /root/deleteIpAlias " + args); } try { VmwareManager mgr = getServiceContext().getStockObject(VmwareManager.CONTEXT_STOCK_NAME); String controlIp = getRouterSshControlIp(cmd); Pair<Boolean, String> result = SshHelper.sshExecute(controlIp, DEFAULT_DOMR_SSHPORT, "root", mgr.getSystemVMKeyFile(), null, - "/root/deleteipAlias.sh " + args); + "/root/deleteIpAlias.sh " + args); if (!result.first()) { - s_logger.error("ipAlias command on domr " + controlIp + " failed, message: " + result.second()); + s_logger.error("deleteIpAlias command on domr " + controlIp + " failed, message: " + result.second()); - return new Answer(cmd, false, "deleteipAlias failed due to " + result.second()); + return new Answer(cmd, false, "deleteIpAlias failed due to " + result.second()); } if (s_logger.isInfoEnabled()) { - s_logger.info("deleteipAlias command on domain router " + controlIp + " completed"); + s_logger.info("deleteIpAlias command on domain router " + controlIp + " completed"); } } catch (Throwable e) { - String msg = "deleteipAlias failed due to " + VmwareHelper.getExceptionMessage(e); + String msg = "deleteIpAlias failed due to " + VmwareHelper.getExceptionMessage(e); s_logger.error(msg, e); return new Answer(cmd, false, msg); }