cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wid...@apache.org
Subject [22/50] [abbrv] git commit: updated refs/heads/kvm-vnc-listen to 895c51d
Date Mon, 16 Sep 2013 09:11:20 GMT
CLOUDSTACK-4617. Add host succeeds but host goes to alert state and comes back to UP state
after a short while. Fixed the link local network creation part.


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

Branch: refs/heads/kvm-vnc-listen
Commit: 63f8b3f69bd55f71abc4c9ae173571614637d5b6
Parents: c98817c
Author: Devdeep Singh <devdeep@gmail.com>
Authored: Thu Sep 12 16:14:21 2013 +0530
Committer: Devdeep Singh <devdeep@gmail.com>
Committed: Thu Sep 12 16:34:55 2013 +0530

----------------------------------------------------------------------
 .../xen/resource/CitrixResourceBase.java        | 10 +++++--
 .../xen/resource/XenServer610Resource.java      | 30 ++++++++++++--------
 2 files changed, 26 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/63f8b3f6/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 e983672..3cc60db 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
@@ -4746,6 +4746,12 @@ public abstract class CitrixResourceBase implements ServerResource,
HypervisorRe
         }
     }
 
+    protected void plugDom0Vif(Connection conn, VIF dom0Vif) throws XmlRpcException, XenAPIException
{
+        if (dom0Vif != null) {
+            dom0Vif.plug(conn);
+        }
+    }
+
     private void setupLinkLocalNetwork(Connection conn) {
         try {
             Network.Record rec = new Network.Record();
@@ -4800,11 +4806,11 @@ public abstract class CitrixResourceBase implements ServerResource,
HypervisorRe
                 vifr.network = linkLocal;
                 vifr.lockingMode = Types.VifLockingMode.NETWORK_DEFAULT;
                 dom0vif = VIF.create(conn, vifr);
-                dom0vif.plug(conn);
+                plugDom0Vif(conn, dom0vif);
             } else {
                 s_logger.debug("already have a vif on dom0 for link local network");
                 if (!dom0vif.getCurrentlyAttached(conn)) {
-                    dom0vif.plug(conn);
+                    plugDom0Vif(conn, dom0vif);
                 }
             }
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/63f8b3f6/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/XenServer610Resource.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/XenServer610Resource.java
b/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/XenServer610Resource.java
index 20d9a3d..c3c0307 100644
--- a/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/XenServer610Resource.java
+++ b/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/XenServer610Resource.java
@@ -19,8 +19,8 @@ package com.cloud.hypervisor.xen.resource;
 
 import java.io.File;
 import java.util.ArrayList;
-import java.util.List;
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 import java.util.Set;
 
@@ -28,35 +28,37 @@ import javax.ejb.Local;
 
 import org.apache.cloudstack.storage.to.VolumeObjectTO;
 import org.apache.log4j.Logger;
+import org.apache.xmlrpc.XmlRpcException;
 
-import com.cloud.resource.ServerResource;
-import com.cloud.utils.exception.CloudRuntimeException;
-import com.cloud.utils.script.Script;
-import com.cloud.vm.VirtualMachine.State;
 import com.cloud.agent.api.Answer;
 import com.cloud.agent.api.Command;
-import com.cloud.agent.api.storage.MigrateVolumeAnswer;
-import com.cloud.agent.api.storage.MigrateVolumeCommand;
 import com.cloud.agent.api.MigrateWithStorageAnswer;
 import com.cloud.agent.api.MigrateWithStorageCommand;
+import com.cloud.agent.api.MigrateWithStorageCompleteAnswer;
+import com.cloud.agent.api.MigrateWithStorageCompleteCommand;
 import com.cloud.agent.api.MigrateWithStorageReceiveAnswer;
 import com.cloud.agent.api.MigrateWithStorageReceiveCommand;
 import com.cloud.agent.api.MigrateWithStorageSendAnswer;
 import com.cloud.agent.api.MigrateWithStorageSendCommand;
-import com.cloud.agent.api.MigrateWithStorageCompleteAnswer;
-import com.cloud.agent.api.MigrateWithStorageCompleteCommand;
-import com.cloud.agent.api.to.StorageFilerTO;
-import com.cloud.network.Networks.TrafficType;
+import com.cloud.agent.api.storage.MigrateVolumeAnswer;
+import com.cloud.agent.api.storage.MigrateVolumeCommand;
 import com.cloud.agent.api.to.DiskTO;
+import com.cloud.agent.api.to.NicTO;
+import com.cloud.agent.api.to.StorageFilerTO;
 import com.cloud.agent.api.to.VirtualMachineTO;
 import com.cloud.agent.api.to.VolumeTO;
-import com.cloud.agent.api.to.NicTO;
+import com.cloud.network.Networks.TrafficType;
+import com.cloud.resource.ServerResource;
+import com.cloud.utils.exception.CloudRuntimeException;
+import com.cloud.utils.script.Script;
+import com.cloud.vm.VirtualMachine.State;
 import com.xensource.xenapi.Connection;
 import com.xensource.xenapi.Host;
 import com.xensource.xenapi.Network;
 import com.xensource.xenapi.SR;
 import com.xensource.xenapi.Task;
 import com.xensource.xenapi.Types;
+import com.xensource.xenapi.Types.XenAPIException;
 import com.xensource.xenapi.VBD;
 import com.xensource.xenapi.VDI;
 import com.xensource.xenapi.VIF;
@@ -447,4 +449,8 @@ public class XenServer610Resource extends XenServer56FP1Resource {
         return dynamicMinRam;
     }
 
+    @Override
+    protected void plugDom0Vif(Connection conn, VIF dom0Vif) throws XmlRpcException, XenAPIException
{
+        // do nothing. In xenserver 6.1 and beyond this step isn't needed.
+    }
 }


Mime
View raw message