cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From prachida...@apache.org
Subject git commit: updated refs/heads/affinity_groups to b54fbfb
Date Sat, 06 Apr 2013 01:00:17 GMT
Updated Branches:
  refs/heads/affinity_groups ec152bd5e -> b54fbfb36


More log statements to debug


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

Branch: refs/heads/affinity_groups
Commit: b54fbfb364428d3d4cc4312742cdcb2d826c014f
Parents: ec152bd
Author: Prachi Damle <prachi@cloud.com>
Authored: Fri Apr 5 17:59:50 2013 -0700
Committer: Prachi Damle <prachi@cloud.com>
Committed: Fri Apr 5 17:59:50 2013 -0700

----------------------------------------------------------------------
 .../affinity/HostAntiAffinityProcessor.java        |    9 +++++++++
 .../affinity/AffinityGroupServiceImpl.java         |    3 +++
 2 files changed, 12 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b54fbfb3/plugins/affinity-group-processors/host-anti-affinity/src/org/apache/cloudstack/affinity/HostAntiAffinityProcessor.java
----------------------------------------------------------------------
diff --git a/plugins/affinity-group-processors/host-anti-affinity/src/org/apache/cloudstack/affinity/HostAntiAffinityProcessor.java
b/plugins/affinity-group-processors/host-anti-affinity/src/org/apache/cloudstack/affinity/HostAntiAffinityProcessor.java
index 4049571..4011c02 100644
--- a/plugins/affinity-group-processors/host-anti-affinity/src/org/apache/cloudstack/affinity/HostAntiAffinityProcessor.java
+++ b/plugins/affinity-group-processors/host-anti-affinity/src/org/apache/cloudstack/affinity/HostAntiAffinityProcessor.java
@@ -68,9 +68,18 @@ public class HostAntiAffinityProcessor extends AffinityProcessorBase implements
                 if (groupVM != null && !groupVM.isRemoved()) {
                     if (groupVM.getHostId() != null) {
                         avoid.addHost(groupVM.getHostId());
+                        if (s_logger.isDebugEnabled()) {
+                            s_logger.debug("Added host " + groupVM.getHostId() + " to avoid
set, since VM "
+                                    + groupVM.getId() + " is present on the host");
+                        }
                     } else if (VirtualMachine.State.Stopped.equals(groupVM.getState())
                             && groupVM.getLastHostId() != null) {
                         avoid.addHost(groupVM.getLastHostId());
+                        if (s_logger.isDebugEnabled()) {
+                            s_logger.debug("Added host " + groupVM.getLastHostId() + " to
avoid set, since VM "
+                                    + groupVM.getId() + " is present on the host, in Stopped
state");
+                        }
+
                     }
                 }
             }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b54fbfb3/server/src/org/apache/cloudstack/affinity/AffinityGroupServiceImpl.java
----------------------------------------------------------------------
diff --git a/server/src/org/apache/cloudstack/affinity/AffinityGroupServiceImpl.java b/server/src/org/apache/cloudstack/affinity/AffinityGroupServiceImpl.java
index e6a1254..559c5b2 100644
--- a/server/src/org/apache/cloudstack/affinity/AffinityGroupServiceImpl.java
+++ b/server/src/org/apache/cloudstack/affinity/AffinityGroupServiceImpl.java
@@ -327,6 +327,9 @@ public class AffinityGroupServiceImpl extends ManagerBase implements AffinityGro
             }
         }
         _affinityGroupVMMapDao.updateMap(vmId, affinityGroupIds);
+        if (s_logger.isDebugEnabled()) {
+            s_logger.debug("Updated VM :" + vmId + " affinity groups to =" + affinityGroupIds);
+        }
         // APIResponseHelper will pull out the updated affinitygroups.
         return vmInstance;
 


Mime
View raw message