URL: https://github.com/freeipa/freeipa/pull/429
Author: MartinBasti
 Title: #429: [py3] ipactl restart: log httplib failues as debug
Action: opened

PR body:
"""
With python3 there are several excerptions ConnectionRefusedError raised
before ipactl is able to connect to dogtag after restart. These
exception should be logged on debug level until timeout is reached.

https://fedorahosted.org/freeipa/ticket/4985
"""

To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/429/head:pr429
git checkout pr429
From 6b3b2ea4058737003525c4571331284ee8d05cbb Mon Sep 17 00:00:00 2001
From: Martin Basti <mba...@redhat.com>
Date: Tue, 31 Jan 2017 22:51:31 +0100
Subject: [PATCH] py3: ipactl restart: log httplib failues as debug

With python3 there are several excerptions ConnectionRefusedError raised
before ipactl is able to connect to dogtag after restart. These
exception should be logged on debug level until timeout is reached.

https://fedorahosted.org/freeipa/ticket/4985
---
 ipapython/dogtag.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/ipapython/dogtag.py b/ipapython/dogtag.py
index 01fc5cb..c42b9d2 100644
--- a/ipapython/dogtag.py
+++ b/ipapython/dogtag.py
@@ -19,6 +19,7 @@
 
 import collections
 import xml.dom.minidom
+import traceback
 
 import nss.nss as nss
 import six
@@ -209,7 +210,8 @@ def _httplib_request(
         http_body = res.read()
         conn.close()
     except Exception as e:
-        root_logger.exception("httplib request failed:")
+        root_logger.debug("httplib request failed")
+        root_logger.debug(traceback.format_exc())
         raise NetworkError(uri=uri, error=str(e))
 
     root_logger.debug('response status %d',    http_status)
-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

Reply via email to