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