ebb439
From 10e4468403b118abd5f67f574d9f4ae922657af6 Mon Sep 17 00:00:00 2001
ebb439
From: Dumitru Ceara <dceara@redhat.com>
ebb439
Date: Fri, 23 Oct 2020 10:07:48 +0200
ebb439
Subject: [PATCH 2/2] ovn-detrace: Improve DB connection error messages.
ebb439
ebb439
Fixes: b326503f8176 ("ovn-detrace: Support SSL remotes.")
ebb439
Signed-off-by: Dumitru Ceara <dceara@redhat.com>
ebb439
Signed-off-by: Numan Siddique <numans@ovn.org>
ebb439
(cherry picked from upstream commit 24302dc5cad03a3618a4db92a203236789494ffa)
ebb439
ebb439
Change-Id: I941a158cdae3d5f4a5796423855eaea21e3f7441
ebb439
---
ebb439
 utilities/ovn-detrace.in | 5 ++++-
ebb439
 1 file changed, 4 insertions(+), 1 deletion(-)
ebb439
ebb439
diff --git a/utilities/ovn-detrace.in b/utilities/ovn-detrace.in
ebb439
index 2344f52..1dd98df 100755
ebb439
--- a/utilities/ovn-detrace.in
ebb439
+++ b/utilities/ovn-detrace.in
ebb439
@@ -98,9 +98,12 @@ class OVSDB(object):
ebb439
                                             OVSDB.STREAM_TIMEOUT_MS)
ebb439
             if not error and strm:
ebb439
                 break
ebb439
+
ebb439
+            sys.stderr.write('Unable to connect to {}, error: {}\n'.format(r,
ebb439
+                os.strerror(error)))
ebb439
             strm = None
ebb439
         if not strm:
ebb439
-            raise Exception("Unable to connect to %s" % self.remote)
ebb439
+            raise Exception('Unable to connect to %s' % self.remote)
ebb439
 
ebb439
         rpc = jsonrpc.Connection(strm)
ebb439
         req = jsonrpc.Message.create_request('get_schema', [schema_name])
ebb439
-- 
ebb439
1.8.3.1
ebb439