cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sw...@apache.org
Subject [2/7] git commit: updated refs/heads/master to 22c6b47
Date Mon, 13 Jun 2016 13:53:39 GMT
CLOUDSTACK-9399 : NPE during deletion of host when clusterId is null


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

Branch: refs/heads/master
Commit: ffe72ca227a518907bca396603a2641e10c5d02d
Parents: 971c8a7
Author: Nick Livens <nick.livens@nuagenetworks.net>
Authored: Fri Jun 3 11:04:09 2016 +0200
Committer: Nick Livens <nick.livens@nuagenetworks.net>
Committed: Wed Jun 8 08:18:14 2016 +0200

----------------------------------------------------------------------
 server/src/com/cloud/resource/ResourceManagerImpl.java | 6 ++++--
 ui/scripts/system.js                                   | 4 ++--
 2 files changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ffe72ca2/server/src/com/cloud/resource/ResourceManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/resource/ResourceManagerImpl.java b/server/src/com/cloud/resource/ResourceManagerImpl.java
index 89893a2..2bb1596 100644
--- a/server/src/com/cloud/resource/ResourceManagerImpl.java
+++ b/server/src/com/cloud/resource/ResourceManagerImpl.java
@@ -847,7 +847,7 @@ public class ResourceManagerImpl extends ManagerBase implements ResourceManager,
             return true;
         }
 
-        long clusterId = host.getClusterId();
+        Long clusterId = host.getClusterId();
 
         _agentMgr.notifyMonitorsOfHostAboutToBeRemoved(host.getId());
 
@@ -927,7 +927,9 @@ public class ResourceManagerImpl extends ManagerBase implements ResourceManager,
             }
         });
 
-        _agentMgr.notifyMonitorsOfRemovedHost(host.getId(), clusterId);
+        if (clusterId != null) {
+            _agentMgr.notifyMonitorsOfRemovedHost(host.getId(), clusterId);
+        }
 
         return true;
     }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ffe72ca2/ui/scripts/system.js
----------------------------------------------------------------------
diff --git a/ui/scripts/system.js b/ui/scripts/system.js
index 642370f..2eef6b1 100644
--- a/ui/scripts/system.js
+++ b/ui/scripts/system.js
@@ -13256,7 +13256,7 @@
                             dataType: "json",
                             async: false,
                             success: function(json) {
-                                var items = json.listnuagevspdeviceresponse.nuagevspdevice;
+                                var items = json.listnuagevspdevicesresponse.nuagevspdevice;
                                 args.response.success({
                                     data: items
                                 });
@@ -13325,7 +13325,7 @@
                                         dataType: "json",
                                         async: true,
                                         success: function(json) {
-                                            var item = json.listnuagevspdeviceresponse.nuagevspdevice[0];
+                                            var item = json.listnuagevspdevicesresponse.nuagevspdevice[0];
                                             args.response.success({
                                                 data: item
                                             });


Mime
View raw message