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

supress error output on master check #84

Closed
jberkus opened this issue Oct 28, 2015 · 7 comments
Closed

supress error output on master check #84

jberkus opened this issue Oct 28, 2015 · 7 comments
Assignees

Comments

@jberkus
Copy link
Contributor

jberkus commented Oct 28, 2015

Doing a failover test, I got this output from the replica:

2015-10-28 11:49:41,781 ERROR: request failed: GET http://127.0.0.1:8008/patroni
Traceback (most recent call last):
File "/home/josh/patroni/patroni/ha.py", line 147, in fetch_node_status
response = requests.get(member.api_url, timeout=2, verify=False)
File "/home/josh/patronienv/local/lib/python2.7/site-packages/requests/api.py", line 69, in get
return request('get', url, params=params, *_kwargs)
File "/home/josh/patronienv/local/lib/python2.7/site-packages/requests/api.py", line 50, in request
response = session.request(method=method, url=url, *_kwargs)
File "/home/josh/patronienv/local/lib/python2.7/site-packages/requests/sessions.py", line 468, in request
resp = self.send(prep, *_send_kwargs)
File "/home/josh/patronienv/local/lib/python2.7/site-packages/requests/sessions.py", line 576, in send
r = adapter.send(request, *_kwargs)
File "/home/josh/patronienv/local/lib/python2.7/site-packages/requests/adapters.py", line 423, in send
raise ConnectionError(e, request=request)
ConnectionError: HTTPConnectionPool(host='127.0.0.1', port=8008): Max retries exceeded with url: /patroni (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x7ff78ea0efd0>: Failed to establish a new connection: [Errno 111] Connection refused',))

What's happening there is that the replica is failing to connect to the master because it's down. Which is as it should be; so why are we getting an error with a trace dump?

@jberkus
Copy link
Contributor Author

jberkus commented Oct 28, 2015

Note that after that error, failover succeeds. So it's just unneeded output.

@feikesteenbergen
Copy link
Contributor

We should probably suppress this stacktrace and make an INFO line out of it.

@lasomethingsomething
Copy link
Contributor

@feikesteenbergen Did you implement the change referenced in your previous comment?

@CyberDem0n
Copy link
Member

No, it still produces ERROR message with the stack trace.

@lasomethingsomething
Copy link
Contributor

@CyberDem0n Should I label as "bug" and/or "help wanted"?

@CyberDem0n
Copy link
Member

This is not really a bug, just a small "feature" which is really easy to solve. So "help wanted" would be ok.

@CyberDem0n
Copy link
Member

Solved by #256

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants