cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bhais...@apache.org
Subject [1/7] git commit: updated refs/heads/4.5 to 48c1ffd
Date Fri, 17 Apr 2015 14:06:10 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/4.5 9a8ee5664 -> 48c1ffd74


CLOUDSTACK-8134. Worker VMs don't have MS id set in vCenter annotation 'cloud.vm.workertag'.
Correctly register node info for a newly created VMware context.

(cherry picked from commit 13bdc1cef4ee0fae2f263777317c170302c49689)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/9565ad2f
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/9565ad2f
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/9565ad2f

Branch: refs/heads/4.5
Commit: 9565ad2f9cfa3240f1bb87e384a5c9819edb3037
Parents: 9a8ee56
Author: Likitha Shetty <likitha.shetty@citrix.com>
Authored: Tue Dec 30 11:48:06 2014 +0530
Committer: Rohit Yadav <rohit.yadav@shapeblue.com>
Committed: Fri Apr 17 15:34:43 2015 +0200

----------------------------------------------------------------------
 .../VmwareSecondaryStorageResourceHandler.java  | 23 +++++++++-----------
 1 file changed, 10 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9565ad2f/plugins/hypervisors/vmware/src/com/cloud/storage/resource/VmwareSecondaryStorageResourceHandler.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/vmware/src/com/cloud/storage/resource/VmwareSecondaryStorageResourceHandler.java
b/plugins/hypervisors/vmware/src/com/cloud/storage/resource/VmwareSecondaryStorageResourceHandler.java
index e67fed6..8a27799 100644
--- a/plugins/hypervisors/vmware/src/com/cloud/storage/resource/VmwareSecondaryStorageResourceHandler.java
+++ b/plugins/hypervisors/vmware/src/com/cloud/storage/resource/VmwareSecondaryStorageResourceHandler.java
@@ -209,23 +209,20 @@ public class VmwareSecondaryStorageResourceHandler implements SecondaryStorageRe
             _resource.ensureOutgoingRuleForAddress(vCenterAddress);
 
             VmwareContext context = currentContext.get();
-            if (context != null) {
-                if(!context.validate()) {
-                    invalidateServiceContext(context);
-                    context = null;
-                } else {
-                    context.registerStockObject("serviceconsole", cmd.getContextParam("serviceconsole"));
-                    context.registerStockObject("manageportgroup", cmd.getContextParam("manageportgroup"));
-                    context.registerStockObject("noderuninfo", cmd.getContextParam("noderuninfo"));
-                }
+            if (context != null && !context.validate()) {
+                invalidateServiceContext(context);
+                context = null;
             }
-            if(context == null) {
-                s_logger.info("Open new VmwareContext. vCenter: " + vCenterAddress + ", user:
" + username + ", password: " +
-                        StringUtils.getMaskedPasswordForDisplay(password));
+            if (context == null) {
+                s_logger.info("Open new VmwareContext. vCenter: " + vCenterAddress + ", user:
" + username + ", password: " + StringUtils.getMaskedPasswordForDisplay(password));
                 VmwareSecondaryStorageContextFactory.setVcenterSessionTimeout(vCenterSessionTimeout);
                 context = VmwareSecondaryStorageContextFactory.getContext(vCenterAddress,
username, password);
             }
-
+            if (context != null) {
+                context.registerStockObject("serviceconsole", cmd.getContextParam("serviceconsole"));
+                context.registerStockObject("manageportgroup", cmd.getContextParam("manageportgroup"));
+                context.registerStockObject("noderuninfo", cmd.getContextParam("noderuninfo"));
+            }
             currentContext.set(context);
             return context;
         } catch (Exception e) {


Mime
View raw message