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/08/02 00:32:22 UTC

git commit: updated refs/heads/4.2 to 17511b6

Updated Branches:
  refs/heads/4.2 ad9be8046 -> 17511b6a3


CLOUDSTACK-4017:
 try to remove VDI host lock before start the VM which is using this VDI


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

Branch: refs/heads/4.2
Commit: 17511b6a35427953b06119639ac34f5a0946bf4c
Parents: ad9be80
Author: Anthony Xu <an...@citrix.com>
Authored: Thu Aug 1 15:31:26 2013 -0700
Committer: Anthony Xu <an...@citrix.com>
Committed: Thu Aug 1 15:31:26 2013 -0700

----------------------------------------------------------------------
 .../cloud/hypervisor/xen/resource/CitrixResourceBase.java | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/17511b6a/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java b/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java
index 49433f8..e100211 100644
--- a/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java
+++ b/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java
@@ -1199,7 +1199,15 @@ public abstract class CitrixResourceBase implements ServerResource, HypervisorRe
         Volume.Type type = volume.getType();
 
         VDI vdi = mount(conn, vmName, volume);
-
+        if ( vdi != null ) {
+            Map<String, String> smConfig = vdi.getSmConfig(conn);
+            for (String key : smConfig.keySet()) {
+                if (key.startsWith("host_")) {
+                    vdi.removeFromSmConfig(conn, key);
+                    break;
+                }
+            }
+        }
         VBD.Record vbdr = new VBD.Record();
         vbdr.VM = vm;
         if (vdi != null) {