Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[py3] ipactl restart: log httplib failues as debug #429

Closed
wants to merge 1 commit into from
Closed

[py3] ipactl restart: log httplib failues as debug #429

wants to merge 1 commit into from

Conversation

MartinBasti
Copy link
Contributor

@MartinBasti MartinBasti commented Jan 31, 2017

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

tiran
tiran previously requested changes Jan 31, 2017
@@ -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")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of traceback.format.exc(), use root_logger.debug("httplib request failed", exc_info=True) to log message with traceback.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@MartinBasti
Copy link
Contributor Author

This happens with python2.7 too, I reproduced it today

@tiran
Copy link
Member

tiran commented Feb 15, 2017

Yeah, I reported the issue as https://fedorahosted.org/freeipa/ticket/6674 . Feel free to close it as duplicate.

@stlaz
Copy link
Contributor

stlaz commented Feb 17, 2017

I don't see what this has to do with Py3. The issue is the same on Py2. Swap the ticket for the one of @tiran and I'll ack this. If this gets triaged for 4.4 as well we can backport it later.

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/6674
@MartinBasti
Copy link
Contributor Author

Ticket corrected, commit msg ammended

@stlaz stlaz added the ack Pull Request approved, can be merged label Feb 17, 2017
@stlaz
Copy link
Contributor

stlaz commented Feb 17, 2017

Thanks, ACK.

@MartinBasti MartinBasti added the pushed Pull Request has already been pushed label Feb 17, 2017
@MartinBasti
Copy link
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ack Pull Request approved, can be merged pushed Pull Request has already been pushed
Projects
None yet
3 participants