cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From edi...@apache.org
Subject git commit: updated refs/heads/4.3 to 7d02fcd
Date Mon, 30 Dec 2013 18:47:48 GMT
Updated Branches:
  refs/heads/4.3 4c9521726 -> 7d02fcd5b


CLOUDSTACK-5264: add delta snapshot for existing xenserver


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

Branch: refs/heads/4.3
Commit: 7d02fcd5b4ee950510dc7fac05df2b69ddceef59
Parents: 4c95217
Author: edison <sudison@gmail.com>
Authored: Mon Dec 30 10:47:15 2013 -0800
Committer: edison <sudison@gmail.com>
Committed: Mon Dec 30 10:47:15 2013 -0800

----------------------------------------------------------------------
 .../hypervisor/xen/resource/XenServerStorageProcessor.java  | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7d02fcd5/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/XenServerStorageProcessor.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/XenServerStorageProcessor.java
b/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/XenServerStorageProcessor.java
index 029481b..b8e0b6a 100644
--- a/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/XenServerStorageProcessor.java
+++ b/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/XenServerStorageProcessor.java
@@ -144,7 +144,7 @@ public class XenServerStorageProcessor implements StorageProcessor {
                 throw new CloudRuntimeException("Unable to find CD-ROM VBD for VM: " + vmName);
             } else {
                 // If an ISO is already inserted, eject it
-                if (isoVBD.getEmpty(conn) == false) {
+                if (!isoVBD.getEmpty(conn)) {
                     isoVBD.eject(conn);
                 }
 
@@ -1291,7 +1291,8 @@ public class XenServerStorageProcessor implements StorageProcessor {
         // By default assume failure
         String details = null;
         String snapshotBackupUuid = null;
-        boolean fullbackup = true;
+        Map<String, String> options = cmd.getOptions();
+        boolean fullbackup = Boolean.parseBoolean(options.get("fullSnapshot"));
         try {
             SR primaryStorageSR = hypervisorResource.getSRByNameLabelandHost(conn, primaryStorageNameLabel);
             if (primaryStorageSR == null) {
@@ -1302,7 +1303,7 @@ public class XenServerStorageProcessor implements StorageProcessor {
 
             VDI snapshotVdi = getVDIbyUuid(conn, snapshotUuid);
             String snapshotPaUuid = null;
-            if ( prevBackupUuid != null ) {
+            if ( prevSnapshotUuid != null && !fullbackup) {
                 try {
                     snapshotPaUuid = getVhdParent(conn, psUuid, snapshotUuid, isISCSI);
                     if( snapshotPaUuid != null ) {
@@ -1310,6 +1311,8 @@ public class XenServerStorageProcessor implements StorageProcessor {
                         String prevSnashotPaUuid = getVhdParent(conn, psUuid, prevSnapshotUuid,
isISCSI);
                         if (snashotPaPaPaUuid != null && prevSnashotPaUuid!= null
&& prevSnashotPaUuid.equals(snashotPaPaPaUuid)) {
                             fullbackup = false;
+                        } else {
+                            fullbackup = true;
                         }
                     }
                 } catch (Exception e) {


Mime
View raw message