Change in vdsm[master]: misc: Support zero-time in getReadDelay()

ahino at redhat.com ahino at redhat.com
Mon Feb 23 16:30:11 UTC 2015


Ala Hino has uploaded a new change for review.

Change subject: misc: Support zero-time in getReadDelay()
......................................................................

misc: Support zero-time in getReadDelay()

When system time goes backward during a read, dd returns zero time and
Infinity B/s as seen in the output below:

    517 bytes (517 B) copied, 0 s, Infinity B/s

misc.readpeed() fails to parse that output. This causes the domain
monitor to fail and the domain to move into invalid state. This failure
could cause the host to become non-operational, leading to migration
storm while storage is actually valid.

misc.readpeed() changed to parsae the returned output.

Change-Id: I58ae0ec5f3f88a1738ef1b95688534c8c8022362
Bug-Url: https://bugzilla.redhat.com/1191549
Signed-off-by: Ala Hino <ahino at redhat.com>
Signed-off-by: Tobias Fiebig <tfiebig at wybt.net>
---
M tests/miscTests.py
M vdsm/storage/misc.py
2 files changed, 4 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/82/38082/1

diff --git a/tests/miscTests.py b/tests/miscTests.py
index 9f79037..3b8c850 100644
--- a/tests/miscTests.py
+++ b/tests/miscTests.py
@@ -896,7 +896,9 @@
         ("512 bytes (512e-3 MB) copied, 1 s, 512e-3 MB/s",
          "512", "1"),
         ("524288 bytes (512e3 B) copied, 1 s, 512e3 B/s",
-         "524288", "1")
+         "524288", "1"),
+        ("517 bytes (517 B) copied, 0 s, Infinity B/s",
+         "517", "0")
     ])
     def testReadSpeedRegExp(self, output, bytes, seconds):
         m = misc._readspeed_regex.match(output)
diff --git a/vdsm/storage/misc.py b/vdsm/storage/misc.py
index 08d1f87..bc29aa8 100644
--- a/vdsm/storage/misc.py
+++ b/vdsm/storage/misc.py
@@ -188,7 +188,7 @@
 _readspeed_regex = re.compile(
     "(?P<bytes>\d+) bytes? \([\de\-.]+ [kMGT]*B\) copied, "
     "(?P<seconds>[\de\-.]+) s, "
-    "[\de\-.]+ [kMGT]*B/s"
+    "([\de\-.]+|Infinity) [kMGT]*B/s"
 )
 
 


-- 
To view, visit http://gerrit.ovirt.org/38082
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I58ae0ec5f3f88a1738ef1b95688534c8c8022362
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ala Hino <ahino at redhat.com>


More information about the vdsm-patches mailing list