Change in vdsm[master]: dumpStorageTable: Avoid an unnecessary traceback if vdsmd is...

lyarwood at redhat.com lyarwood at redhat.com
Wed Jul 24 09:10:00 UTC 2013


Lee Yarwood has uploaded a new change for review.

Change subject: dumpStorageTable: Avoid an unnecessary traceback if vdsmd is down.
......................................................................

dumpStorageTable: Avoid an unnecessary traceback if vdsmd is down.

When vdsmd is down the first getConnectedStoragePoolsList call
results in a 'Connection Refused' trace being shown. To avoid
this trace being picked up by abrt and thus worrying users we
should test the connection, catching any errors before continuing.

Change-Id: I6d3c0758d9580bfaf164bb3f706d91d8b0ab7f33
Signed-off-by: Lee Yarwood <lyarwood at redhat.com>
---
M vdsm/dumpStorageTable.py.in
1 file changed, 9 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/78/17278/1

diff --git a/vdsm/dumpStorageTable.py.in b/vdsm/dumpStorageTable.py.in
index f75e35f..2d5ef66 100644
--- a/vdsm/dumpStorageTable.py.in
+++ b/vdsm/dumpStorageTable.py.in
@@ -309,7 +309,15 @@
     from vdsm import vdscli
     import sys
 
-    rc, msg = StorageTable(vdscli.connect()).show()
+    # Test the connection to avoid sending abrt a traceback if vdsmd is down.
+    try:
+        conn = vdscli.connect()
+        conn.getConnectedStoragePoolsList()
+    except:
+        print 'Unable to connect to vdsmd'
+        sys.exit(1)
+
+    rc, msg = StorageTable(conn).show()
     if rc:
         print >>sys.stderr, msg
     sys.exit(rc)


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6d3c0758d9580bfaf164bb3f706d91d8b0ab7f33
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Lee Yarwood <lyarwood at redhat.com>


More information about the vdsm-patches mailing list