cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anthon...@apache.org
Subject git commit: updated refs/heads/4.4 to 3854e5b
Date Fri, 11 Apr 2014 23:17:03 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/4.4 a5261cee3 -> 3854e5b10


add log and comment


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

Branch: refs/heads/4.4
Commit: 3854e5b1065f12727c3d16ba6a1a60f159fd8623
Parents: a5261ce
Author: Anthony Xu <anthony.xu@citrix.com>
Authored: Fri Apr 11 16:16:49 2014 -0700
Committer: Anthony Xu <anthony.xu@citrix.com>
Committed: Fri Apr 11 16:16:49 2014 -0700

----------------------------------------------------------------------
 .../src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java | 3 +++
 .../hypervisor/xen/resource/Xenserver625StorageProcessor.java     | 2 ++
 2 files changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3854e5b1/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 e1794e8..55b9d45 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
@@ -1347,6 +1347,9 @@ public abstract class CitrixResourceBase implements ServerResource,
HypervisorRe
     protected VM createVmFromTemplate(Connection conn, VirtualMachineTO vmSpec, Host host)
throws XenAPIException, XmlRpcException {
         String guestOsTypeName = getGuestOsType(vmSpec.getOs(), vmSpec.getBootloader() ==
BootloaderType.CD);
         Set<VM> templates = VM.getByNameLabel(conn, guestOsTypeName);
+        if ( templates == null || templates.isEmpty() ){
+            s_logger.debug("Cannot find template : " + guestOsTypeName + " on XS version:
" + this.getClass().getName());
+        }
         assert templates.size() == 1 : "Should only have 1 template but found " + templates.size();
         VM template = templates.iterator().next();
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3854e5b1/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/Xenserver625StorageProcessor.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/Xenserver625StorageProcessor.java
b/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/Xenserver625StorageProcessor.java
index 6e29037..f71b6d9 100644
--- a/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/Xenserver625StorageProcessor.java
+++ b/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/Xenserver625StorageProcessor.java
@@ -93,6 +93,8 @@ public class Xenserver625StorageProcessor extends XenServerStorageProcessor
{
                     return srs.iterator().next();
                 }
             } catch (Exception e) {
+                // getByNameLabel may throw exception if sr is found
+                // ignore the exception since cs will create the SR
             }
             Map<String, String> smConfig = new HashMap<String, String>();
             Host host = Host.getByUuid(conn, hypervisorResource.getHost().uuid);


Mime
View raw message