You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by an...@apache.org on 2013/07/23 00:59:30 UTC

[1/2] git commit: updated refs/heads/master to eff27e1

Updated Branches:
  refs/heads/master 5ff83e9c3 -> eff27e1f8


correct the log message


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

Branch: refs/heads/master
Commit: 668089d575d0d2ef64360d7ab5cbd49b02e13404
Parents: 5ff83e9
Author: Anthony Xu <an...@citrix.com>
Authored: Mon Jul 22 15:22:00 2013 -0700
Committer: Anthony Xu <an...@citrix.com>
Committed: Mon Jul 22 15:56:11 2013 -0700

----------------------------------------------------------------------
 .../com/cloud/hypervisor/xen/discoverer/XcpServerDiscoverer.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/668089d5/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/discoverer/XcpServerDiscoverer.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/discoverer/XcpServerDiscoverer.java b/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/discoverer/XcpServerDiscoverer.java
index e360c98..bbb077c 100755
--- a/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/discoverer/XcpServerDiscoverer.java
+++ b/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/discoverer/XcpServerDiscoverer.java
@@ -579,7 +579,7 @@ public class XcpServerDiscoverer extends DiscovererBase implements Discoverer, L
             cluster.setGuid(startup.getPool());
             _clusterDao.update(cluster.getId(), cluster);
         } else if (! cluster.getGuid().equals(startup.getPool()) ) {
-            String msg = "pool uuid for cluster " + cluster.getId() + " changed from " + cluster.getGuid() + " to " + cmd.getPod();
+            String msg = "pool uuid for cluster " + cluster.getId() + " changed from " + cluster.getGuid() + " to " + startup.getPool();
             s_logger.warn(msg);
             throw new CloudRuntimeException(msg);
         }


[2/2] git commit: updated refs/heads/master to eff27e1

Posted by an...@apache.org.
don't update VM state if the state doesn't really change. updating VM state increases the update count, which might cause real VM update fail


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

Branch: refs/heads/master
Commit: eff27e1f839de57b4c9f5bba3c07b8907e0f0bf9
Parents: 668089d
Author: Anthony Xu <an...@citrix.com>
Authored: Mon Jul 22 15:49:11 2013 -0700
Committer: Anthony Xu <an...@citrix.com>
Committed: Mon Jul 22 15:56:37 2013 -0700

----------------------------------------------------------------------
 engine/schema/src/com/cloud/vm/dao/VMInstanceDaoImpl.java | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/eff27e1f/engine/schema/src/com/cloud/vm/dao/VMInstanceDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/vm/dao/VMInstanceDaoImpl.java b/engine/schema/src/com/cloud/vm/dao/VMInstanceDaoImpl.java
index 8cbc6b6..e8f98e9 100644
--- a/engine/schema/src/com/cloud/vm/dao/VMInstanceDaoImpl.java
+++ b/engine/schema/src/com/cloud/vm/dao/VMInstanceDaoImpl.java
@@ -398,6 +398,10 @@ public class VMInstanceDaoImpl extends GenericDaoBase<VMInstanceVO, Long> implem
     	Long oldHostId = vmi.getHostId();
     	Long oldUpdated = vmi.getUpdated();
     	Date oldUpdateDate = vmi.getUpdateTime();
+    	if ( newState.equals(oldState) && newHostId != null && newHostId.equals(oldHostId) ) {
+    	    // state is same, don't need to update
+    	    return true;
+    	}
 
     	SearchCriteria<VMInstanceVO> sc = StateChangeSearch.create();
     	sc.setParameters("id", vmi.getId());