You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by pr...@apache.org on 2013/04/11 22:25:04 UTC
[25/34] git commit: updated refs/heads/master to 6137d32
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/d38bf8a1
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/d38bf8a1
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/d38bf8a1
Branch: refs/heads/master
Commit: d38bf8a10cd9f5287dbc1f89d3b404a8620ae5c8
Parents: 0f565f2
Author: Prachi Damle <pr...@cloud.com>
Authored: Fri Apr 5 17:59:50 2013 -0700
Committer: Prachi Damle <pr...@cloud.com>
Committed: Thu Apr 11 13:23:27 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/d38bf8a1/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/d38bf8a1/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 17f7401..5c7edc5 100644
--- a/server/src/org/apache/cloudstack/affinity/AffinityGroupServiceImpl.java
+++ b/server/src/org/apache/cloudstack/affinity/AffinityGroupServiceImpl.java
@@ -310,6 +310,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;