Federico Simoncelli has uploaded a new change for review. Change subject: vm: increase the volume extension on storage migration ......................................................................
vm: increase the volume extension on storage migration During live migration VDSM needs to subsequently extend two volumes instead of one; doubling the size of the chunk to extend the watermark limit is doubled and VDSM has more time to accomplish the operations. Change-Id: Ib61375613712feb7118a80c50b73e678d257f251 Signed-off-by: Federico Simoncelli <[email protected]> --- M vdsm/libvirtvm.py M vdsm/vm.py 2 files changed, 15 insertions(+), 8 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/00/9200/1 diff --git a/vdsm/libvirtvm.py b/vdsm/libvirtvm.py index ca31a43..5f525bf 100644 --- a/vdsm/libvirtvm.py +++ b/vdsm/libvirtvm.py @@ -108,7 +108,7 @@ capacity, alloc, physical = \ self._vm._dom.blockInfo(vmDrive.path, 0) - if physical - alloc >= self._vm._MIN_DISK_REMAIN: + if physical - alloc >= vmDrive.watermarkLimit: continue self._log.info('%s/%s apparent: %s capacity: %s, alloc: %s, ' @@ -1024,6 +1024,9 @@ class Drive(LibvirtVmDevice): + VOLWM_CHUNK_MB = config.getint('irs', 'volume_utilization_chunk_mb') + VOLWM_FREE_PCT = 100 - config.getint('irs', 'volume_utilization_percent') + VOLWM_CHUNK_LSM_MULT = 2 # Chunk multiplier during live storage migration def __init__(self, conf, log, **kwargs): if not kwargs.get('serial'): @@ -1041,6 +1044,16 @@ self._blockDev = None self._customize() + + @property + def volExtensionChunk(self): + if hasattr(self, "diskReplicate"): + return self.VOLWM_CHUNK_MB * self.VOLWM_CHUNK_LSM_MULT + return self.VOLWM_CHUNK_MB + + @property + def watermarkLimit(self): + return self.VOLWM_FREE_PCT * self.volExtensionChunk * (2 ** 20 / 100) @property def blockDev(self): @@ -1195,12 +1208,6 @@ self._qemuguestSocketFile = (constants.P_LIBVIRT_VMCHANNELS + self.conf['vmName'].encode('utf-8') + '.' + _QEMU_GA_DEVICE_NAME) - # TODO find a better idea how to calculate this constant only after - # config is initialized - self._MIN_DISK_REMAIN = \ - ((100 - config.getint('irs', 'volume_utilization_percent')) * - config.getint('irs', 'volume_utilization_chunk_mb') * - 2 ** 20 / 100) self._lastXMLDesc = '<domain><uuid>%s</uuid></domain>' % self.id self._devXmlHash = '0' self._released = False diff --git a/vdsm/vm.py b/vdsm/vm.py index 7a421bf..8661911 100644 --- a/vdsm/vm.py +++ b/vdsm/vm.py @@ -800,7 +800,7 @@ if newSize is None: # newSize is always in megabytes - newSize = (config.getint('irs', 'volume_utilization_chunk_mb') + + newSize = (vmDrive.volExtensionChunk + ((vmDrive.apparentsize + constants.MEGAB - 1) / constants.MEGAB)) -- To view, visit http://gerrit.ovirt.org/9200 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib61375613712feb7118a80c50b73e678d257f251 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
