From bdc99ea17a1e29aac8df62c633ae72da1905e952 Mon Sep 17 00:00:00 2001 From: Kelven Yang Date: Mon, 27 Feb 2012 11:23:31 -0800 Subject: [PATCH] bug 13989: correct the usage about the control IP in VMware resource, new command like GetDomRVersion command is not using the right control IP address under basic zone mode. Reviewed-By: Anthony --- .../cloud/hypervisor/vmware/resource/VmwareResource.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/core/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java b/core/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java index e0e2590f334..2013843a0d4 100755 --- a/core/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java +++ b/core/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java @@ -1003,7 +1003,8 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa Pair result; try { VmwareManager mgr = getServiceContext().getStockObject(VmwareManager.CONTEXT_STOCK_NAME); - result = SshHelper.sshExecute(cmd.getAccessDetail(NetworkElementCommand.ROUTER_IP), DEFAULT_DOMR_SSHPORT, "root", mgr.getSystemVMKeyFile(), null, + String controlIp = getRouterSshControlIp(cmd); + result = SshHelper.sshExecute(controlIp, DEFAULT_DOMR_SSHPORT, "root", mgr.getSystemVMKeyFile(), null, "/root/checkrouter.sh "); if (!result.first()) { @@ -1032,7 +1033,8 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa Pair result; try { VmwareManager mgr = getServiceContext().getStockObject(VmwareManager.CONTEXT_STOCK_NAME); - result = SshHelper.sshExecute(cmd.getAccessDetail(NetworkElementCommand.ROUTER_IP), DEFAULT_DOMR_SSHPORT, "root", mgr.getSystemVMKeyFile(), null, + String controlIp = getRouterSshControlIp(cmd); + result = SshHelper.sshExecute(controlIp, DEFAULT_DOMR_SSHPORT, "root", mgr.getSystemVMKeyFile(), null, "/opt/cloud/bin/get_template_version.sh "); if (!result.first()) { @@ -1065,7 +1067,8 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa Pair result; try { VmwareManager mgr = getServiceContext().getStockObject(VmwareManager.CONTEXT_STOCK_NAME); - result = SshHelper.sshExecute(cmd.getAccessDetail(NetworkElementCommand.ROUTER_IP), DEFAULT_DOMR_SSHPORT, "root", mgr.getSystemVMKeyFile(), null, + String controlIp = getRouterSshControlIp(cmd); + result = SshHelper.sshExecute(controlIp, DEFAULT_DOMR_SSHPORT, "root", mgr.getSystemVMKeyFile(), null, "/root/bumpup_priority.sh "); if (!result.first()) {