Federico Simoncelli has uploaded a new change for review. Change subject: Revert "Initial live block migration API" ......................................................................
Revert "Initial live block migration API" This reverts commit 9e83bef71e6e02bf1264498d5f7297e377b32ca5. Signed-off-by: Federico Simoncelli <[email protected]> Change-Id: I3535fe04ed50b37ea3f03f9a344dd8cd7a5b640c --- M vdsm/libvirtvm.py M vdsm_api/vdsmapi-schema.json 2 files changed, 8 insertions(+), 48 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/72/8672/1 diff --git a/vdsm/libvirtvm.py b/vdsm/libvirtvm.py index 25c3659..3507323 100644 --- a/vdsm/libvirtvm.py +++ b/vdsm/libvirtvm.py @@ -1721,7 +1721,7 @@ def snapshot(self, snapDrives): """Live snapshot command""" - def _diskSnapshot(vmDev, newPath, mirrorPath): + def _diskSnapshot(vmDev, newPath): """Libvirt snapshot XML""" disk = xml.dom.minidom.Element('disk') @@ -1730,8 +1730,6 @@ source = xml.dom.minidom.Element('source') source.setAttribute('file', newPath) - - # FIXME: Implement mirroring here using the libvirt XML definition disk.appendChild(source) return disk @@ -1758,14 +1756,7 @@ else: baseDrv, tgetDrv = (None, None) - if "mirrorDomainID" in drive: - mirrorDrv = {"domainID": drive["mirrorDomainID"], - "imageID": drive["mirrorImageID"], - "volumeID": drive["mirrorVolumeID"]} - else: - mirrorDrv = "" - - return baseDrv, tgetDrv, mirrorDrv + return baseDrv, tgetDrv def _rollbackDrives(newDrives): """Rollback the prepared volumes for the snapshot""" @@ -1810,7 +1801,7 @@ return errCode['migInProgress'] for drive in snapDrives: - baseDrv, tgetDrv, mirrorDrv = _normSnapDriveParams(drive) + baseDrv, tgetDrv = _normSnapDriveParams(drive) if self._findDriveByUUIDs(tgetDrv): # The snapshot volume is the current one, skipping @@ -1830,27 +1821,17 @@ newDrives[vmDevName] = tgetDrv.copy() newDrives[vmDevName]["poolID"] = vmDrive.poolID newDrives[vmDevName]["name"] = vmDevName - newDrives[vmDevName]["mirror"] = mirrorDrv try: newDrives[vmDevName]["path"] = \ - self.cif.prepareVolumePath(newDrives[vmDevName]) - - if newDrives[vmDevName]["mirror"]: - newDrives[vmDevName]["mirrorPath"] = \ - self.cif.prepareVolumePath(newDrives[vmDevName]["mirror"]) - else: - newDrives[vmDevName]["mirrorPath"] = "" - + self.cif.prepareVolumePath(newDrives[vmDevName]) except Exception: _rollbackDrives(newDrives) self.log.error("Unable to prepare the volume path " "for the disk: %s", vmDevName, exc_info=True) return errCode['snapshotErr'] - snapelem = _diskSnapshot(vmDevName, - newDrives[vmDevName]["path"], - newDrives[vmDevName]["mirrorPath"]) + snapelem = _diskSnapshot(vmDevName, newDrives[vmDevName]["path"]) disks.appendChild(snapelem) # If all the drives are the current ones, return success diff --git a/vdsm_api/vdsmapi-schema.json b/vdsm_api/vdsmapi-schema.json index 1aedc96..efc92c8 100644 --- a/vdsm_api/vdsmapi-schema.json +++ b/vdsm_api/vdsmapi-schema.json @@ -4988,18 +4988,11 @@ # # @volumeID: The Volume in which to create the snapshot # -# @mirrorDomainID: #optional The Storage Domain to use for snapshot mirroring -# -# @mirrorImageID: #optional The Image to use for snapshot mirroring -# -# @mirrorVolumeID: #optional The Volume to use for snapshot mirroring -# # Since: 4.10.0 ## {'type': 'SnapshotVolumeDriveInfo', 'data': {'domainID': 'UUID', 'imageID': 'UUID', 'baseVolumeID': 'UUID', - 'volumeID': 'UUID', '*mirrorDomainID': 'UUID', - '*mirrorImageID': 'UUID', '*mirrorVolumeID': 'UUID'}} + 'volumeID': 'UUID'}} ## # @SnapshotGUIDDriveInfo: @@ -5010,17 +5003,10 @@ # # @GUID: The devmapper device GUID in which to create the snapshot # -# @mirrorDomainID: #optional The Storage Domain to use for snapshot mirroring -# -# @mirrorImageID: #optional The Image to use for snapshot mirroring -# -# @mirrorVolumeID: #optional The Volume to use for snapshot mirroring -# # Since: 4.10.0 ## {'type': 'SnapshotGUIDDriveInfo', - 'data': {'baseGUID': 'UUID', 'GUID': 'UUID', '*mirrorDomainID': 'UUID', - '*mirrorImageID': 'UUID', '*mirrorVolumeID': 'UUID'}} + 'data': {'baseGUID': 'UUID', 'GUID': 'UUID'}} ## # @SnapshotUUIDDriveInfo: @@ -5031,17 +5017,10 @@ # # @UUID: The block device ID in which to create the snapshot # -# @mirrorDomainID: #optional The Storage Domain to use for snapshot mirroring -# -# @mirrorImageID: #optional The Image to use for snapshot mirroring -# -# @mirrorVolumeID: #optional The Volume to use for snapshot mirroring -# # Since: 4.10.0 ## {'type': 'SnapshotUUIDDriveInfo', - 'data': {'baseUUID': 'UUID', 'UUID': 'UUID', '*mirrorDomainID': 'UUID', - '*mirrorImageID': 'UUID', '*mirrorVolumeID': 'UUID'}} + 'data': {'baseUUID': 'UUID', 'UUID': 'UUID'}} ## # @SnapshotDriveInfo: -- To view, visit http://gerrit.ovirt.org/8672 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3535fe04ed50b37ea3f03f9a344dd8cd7a5b640c Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Federico Simoncelli <[email protected]> _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
