You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ed...@apache.org on 2013/12/30 19:47:48 UTC
git commit: updated refs/heads/4.3 to 7d02fcd
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 <su...@gmail.com>
Authored: Mon Dec 30 10:47:15 2013 -0800
Committer: edison <su...@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) {