Ala Hino has uploaded a new change for review.
Change subject: sdm: Introduce new SDM.merge verb
......................................................................
sdm: Introduce new SDM.merge verb
This API is another data operation separate from SPM. It merges data
from top volume to base volume and it replaces the existing
'mergeSnapshots' verb.
This verb will be used in the new cold merge flow:
1. Extend base volume (runs on the SPM)
2. Merge (runs on any host)
3. Shrink base volume to optimal size (runs on the SPM)
Change-Id: I96d57a5b9f21153ce1de2cd5619c7f9f78bbe75b
Signed-off-by: Ala Hino <ahino(a)redhat.com>
---
M lib/api/vdsm-api.yml
M vdsm/API.py
M vdsm/storage/hsm.py
3 files changed, 23 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/96/64196/1
diff --git a/lib/api/vdsm-api.yml b/lib/api/vdsm-api.yml
index c7ab7f5..0745093 100644
--- a/lib/api/vdsm-api.yml
+++ b/lib/api/vdsm-api.yml
@@ -9905,3 +9905,19 @@
- description: The destination endpoint
name: destination
type: *CopyDataEndpoint
+
+SDM.merge:
+ added: '4.1'
+ description: Merge data from top volume to base volume.
+ params:
+ - description: A UUID to be used for tracking the job progress
+ name: job_id
+ type: *UUID
+
+ - description: The base volume
+ name: base
+ type: *CopyDataDivEndpoint
+
+ - description: The top volume
+ name: top
+ type: *CopyDataDivEndpoint
diff --git a/vdsm/API.py b/vdsm/API.py
index f000297..267aad7 100644
--- a/vdsm/API.py
+++ b/vdsm/API.py
@@ -1636,3 +1636,6 @@
def copy_data(self, job_id, source, destination):
return self._irs.sdm_copy_data(job_id, source, destination)
+
+ def merge(self, job_id, base, top):
+ return self._irs.sdm_merge(job_id, base, top)
diff --git a/vdsm/storage/hsm.py b/vdsm/storage/hsm.py
index d1b50d2..faf3dfb 100644
--- a/vdsm/storage/hsm.py
+++ b/vdsm/storage/hsm.py
@@ -3530,3 +3530,7 @@
job = sdm.api.copy_data.Job(job_id, self._get_hostid(),
source, destination)
self.sdm_schedule(job)
+
+ @public
+ def sdm_merge(self, job_id, base, top):
+ raise NotImplementedError
--
To view, visit
https://gerrit.ovirt.org/64196
To unsubscribe, visit
https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I96d57a5b9f21153ce1de2cd5619c7f9f78bbe75b
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ala Hino <ahino(a)redhat.com>