Change in vdsm[master]: virt: Avoid pointless extension requests

nsoffer at redhat.com nsoffer at redhat.com
Thu Feb 26 08:35:07 UTC 2015


Nir Soffer has uploaded a new change for review.

Change subject: virt: Avoid pointless extension requests
......................................................................

virt: Avoid pointless extension requests

When a drive was extended up to the maximum volume size, the current
extend logic is trying to extend the drive every 2 seconds.  This
results in fruitless extensions failing in lvextend because the
requested size is equal to the current size. These extension requests
may delay real requests, perform unneeded io, and fill up the log with
bogus errors and warnings.

Now we check if the drive was fully extended and do not try to extend it
further.

Change-Id: I0665fb12dbba9d9d42777db4c43cc606b9708348
Signed-off-by: Nir Soffer <nsoffer at redhat.com>
---
M vdsm/virt/vm.py
1 file changed, 7 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/79/38179/1

diff --git a/vdsm/virt/vm.py b/vdsm/virt/vm.py
index bdfb342..19e7455 100644
--- a/vdsm/virt/vm.py
+++ b/vdsm/virt/vm.py
@@ -1455,6 +1455,13 @@
             self.pause(pauseCode='EOTHER')
             raise ImprobableResizeRequestError(msg)
 
+        maxPhysSize = drive.getMaxVolumeSize(capacity) * constants.MEGAB
+        if physical >= maxPhysSize:
+            # The volume was extended to the maximum size. physical may be
+            # larger than maximum volume size since it is rounded up to the
+            # next lvm extent.
+            return False
+
         if physical - alloc < drive.watermarkLimit:
             return True
         return False


-- 
To view, visit https://gerrit.ovirt.org/38179
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0665fb12dbba9d9d42777db4c43cc606b9708348
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer at redhat.com>


More information about the vdsm-patches mailing list