From e33f8f2f44f7cbe81195a8e31f1e977c72ea4f7e Mon Sep 17 00:00:00 2001 From: Min Chen Date: Thu, 5 Dec 2013 18:05:36 -0800 Subject: [PATCH 1/2] Revert "CLOUDSTACK-4950: fix the problem to support sessions to multiple vCenter instance" This reverts commit ed0fbcc81c1928062054190ffcfab8bb59969cc2. --- .../src/com/cloud/hypervisor/vmware/util/VmwareClient.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/vmware-base/src/com/cloud/hypervisor/vmware/util/VmwareClient.java b/vmware-base/src/com/cloud/hypervisor/vmware/util/VmwareClient.java index 277b105dd4e..2e85f08dc37 100644 --- a/vmware-base/src/com/cloud/hypervisor/vmware/util/VmwareClient.java +++ b/vmware-base/src/com/cloud/hypervisor/vmware/util/VmwareClient.java @@ -88,6 +88,8 @@ public class VmwareClient { } }; HttpsURLConnection.setDefaultHostnameVerifier(hv); + + vimService = new VimService(); } catch (Exception e) { } } @@ -105,7 +107,7 @@ public class VmwareClient { } private ManagedObjectReference SVC_INST_REF = new ManagedObjectReference(); - private VimService vimService; + private static VimService vimService; private VimPortType vimPort; private String serviceCookie; private final String SVC_INST_NAME = "ServiceInstance"; @@ -126,7 +128,6 @@ public class VmwareClient { SVC_INST_REF.setType(SVC_INST_NAME); SVC_INST_REF.setValue(SVC_INST_NAME); - vimService = new VimService(); vimPort = vimService.getVimPort(); Map ctxt = ((BindingProvider) vimPort).getRequestContext(); From 6df26fe5045073d611231c43f75d088bc6cfd91d Mon Sep 17 00:00:00 2001 From: Likitha Shetty Date: Fri, 6 Dec 2013 10:00:11 +0530 Subject: [PATCH 2/2] Since CLOUDSTACK-5336 is resolved, changing the log level to TRACE Revert "CLOUDSTACK-5336. During regression automation management server hang with "out of memory error"." This reverts commit c055417589aba55b488bcfb003af7959ff2a63f5. --- .../cloud/hypervisor/vmware/util/VmwareContext.java | 2 +- .../hypervisor/vmware/util/VmwareContextPool.java | 13 ++++++------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/vmware-base/src/com/cloud/hypervisor/vmware/util/VmwareContext.java b/vmware-base/src/com/cloud/hypervisor/vmware/util/VmwareContext.java index f4fcfa8bc0e..c499576f5f5 100755 --- a/vmware-base/src/com/cloud/hypervisor/vmware/util/VmwareContext.java +++ b/vmware-base/src/com/cloud/hypervisor/vmware/util/VmwareContext.java @@ -100,7 +100,7 @@ public class VmwareContext { registerOutstandingContext(); if(s_logger.isInfoEnabled()) - s_logger.info("New VmwareContext object: " + System.identityHashCode(this) + ", current outstanding count: " + getOutstandingContextCount()); + s_logger.info("New VmwareContext object, current outstanding count: " + getOutstandingContextCount()); } public boolean validate() { diff --git a/vmware-base/src/com/cloud/hypervisor/vmware/util/VmwareContextPool.java b/vmware-base/src/com/cloud/hypervisor/vmware/util/VmwareContextPool.java index 8db95991510..c36b3a8ce24 100644 --- a/vmware-base/src/com/cloud/hypervisor/vmware/util/VmwareContextPool.java +++ b/vmware-base/src/com/cloud/hypervisor/vmware/util/VmwareContextPool.java @@ -83,9 +83,8 @@ public class VmwareContextPool { VmwareContext context = l.remove(0); context.setPoolInfo(this, poolKey); - if(s_logger.isInfoEnabled()) - s_logger.info("Return a VmwareContext from the idle pool: " + poolKey + ". current pool size: " + l.size() + ", " + - "outstanding count: " + VmwareContext.getOutstandingContextCount() + ". context: " + System.identityHashCode(context)); + if(s_logger.isTraceEnabled()) + s_logger.trace("Return a VmwareContext from the idle pool: " + poolKey + ". current pool size: " + l.size() + ", outstanding count: " + VmwareContext.getOutstandingContextCount()); return context; } @@ -108,11 +107,11 @@ public class VmwareContextPool { context.clearStockObjects(); l.add(context); - if(s_logger.isInfoEnabled()) - s_logger.info("Recycle VmwareContext into idle pool: " + context.getPoolKey() + ", current idle pool size: " - + l.size() + ", outstanding count: " + VmwareContext.getOutstandingContextCount() + ". context: " + System.identityHashCode(context)); + if(s_logger.isTraceEnabled()) + s_logger.trace("Recycle VmwareContext into idle pool: " + context.getPoolKey() + ", current idle pool size: " + + l.size() + ", outstanding count: " + VmwareContext.getOutstandingContextCount()); } else { - if(s_logger.isDebugEnabled()) + if(s_logger.isTraceEnabled()) s_logger.trace("VmwareContextPool queue exceeds limits, queue size: " + l.size()); context.close(); }