Hello Adam Litke, Allon Mureinik, Freddy Rolland,

I'd like you to do a code review.  Please visit

    https://gerrit.ovirt.org/45736

to review the following change.

Change subject: storage_exception: Show data in MetadataOverflowError
......................................................................

storage_exception: Show data in MetadataOverflowError

This should help to debug such issues. Previously we raised an error
without any details, making it hard to debug such issue.

Change-Id: I305584438c391cbe7d5da7e358482f255e292187
Backport-To: 3.6
Bug-Url: https://bugzilla.redhat.com/1258097
Signed-off-by: Nir Soffer <[email protected]>
Reviewed-on: https://gerrit.ovirt.org/45471
Reviewed-by: Idan Shaby <[email protected]>
Reviewed-by: Allon Mureinik <[email protected]>
Reviewed-by: Freddy Rolland <[email protected]>
Reviewed-by: Adam Litke <[email protected]>
Continuous-Integration: Jenkins CI
---
M vdsm/storage/blockSD.py
M vdsm/storage/storage_exception.py
2 files changed, 4 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/36/45736/1

diff --git a/vdsm/storage/blockSD.py b/vdsm/storage/blockSD.py
index 127150e..4a8a176 100644
--- a/vdsm/storage/blockSD.py
+++ b/vdsm/storage/blockSD.py
@@ -352,7 +352,7 @@
             metaStr.write("\n")
 
         if metaStr.pos > self._size:
-            raise se.MetadataOverflowError()
+            raise se.MetadataOverflowError(metaStr.getvalue())
 
         # Clear out previous data - it is a volume, not a file
         metaStr.write('\0' * (self._size - metaStr.pos))
diff --git a/vdsm/storage/storage_exception.py 
b/vdsm/storage/storage_exception.py
index 3a4d33f..1e9c3f8 100644
--- a/vdsm/storage/storage_exception.py
+++ b/vdsm/storage/storage_exception.py
@@ -1665,6 +1665,9 @@
     code = 756
     message = "Metadata is too big. Cannot change Metadata"
 
+    def __init__(self, data):
+        self.value = "data=%r" % data
+
 
 #################################################
 #  Import/Export Exceptions


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I305584438c391cbe7d5da7e358482f255e292187
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.6
Gerrit-Owner: Nir Soffer <[email protected]>
Gerrit-Reviewer: Adam Litke <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Freddy Rolland <[email protected]>
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to