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

Master Server Resolution failures aren't properly caught #480

Open
NotAFile opened this issue Apr 3, 2019 · 0 comments
Open

Master Server Resolution failures aren't properly caught #480

NotAFile opened this issue Apr 3, 2019 · 0 comments
Labels
bug This issue reports a bug in piqueserver code and/or docs priority:low This issue has a very low impact or is only noticable in rare circumstances

Comments

@NotAFile
Copy link
Member

NotAFile commented Apr 3, 2019

Describe the bug
When internet is unavailable but the master server connection is enabled, the name resolution failure leaks out of the master error handling, being printed as unhandled deferred with stack grace and without context.

To Reproduce
Steps to reproduce the behavior:

  1. run server registered on master server without internet
  2. see stacktrace

Expected behavior
The failure gets handled like all other master server failures

Stack Trace or logs

	Traceback (most recent call last):
	  File "/home/nota/prj/piqueserver/.venv/lib/python3.6/site-packages/twisted/internet/defer.py", line 1475, in gotResult
	    _inlineCallbacks(r, g, status)
	  File "/home/nota/prj/piqueserver/.venv/lib/python3.6/site-packages/twisted/internet/defer.py", line 1421, in _inlineCallbacks
	    status.deferred.callback(getattr(e, "value", None))
	  File "/home/nota/prj/piqueserver/.venv/lib/python3.6/site-packages/twisted/internet/defer.py", line 460, in callback
	    self._startRunCallbacks(result)
	  File "/home/nota/prj/piqueserver/.venv/lib/python3.6/site-packages/twisted/internet/defer.py", line 568, in _startRunCallbacks
	    self._runCallbacks()
	--- <exception caught here> ---
	  File "/home/nota/prj/piqueserver/.venv/lib/python3.6/site-packages/twisted/internet/defer.py", line 654, in _runCallbacks
	    current.result = callback(current.result, *args, **kw)
	  File "/home/nota/prj/piqueserver/piqueserver/server.py", line 409, in <lambda>
	    map_load_d.addCallback(lambda x: self._post_init())
	  File "/home/nota/prj/piqueserver/piqueserver/server.py", line 432, in _post_init
	    self.set_master()
	  File "/home/nota/prj/piqueserver/pyspades/server.py", line 337, in set_master
	    get_master_connection(self).addCallbacks(
	  File "/home/nota/prj/piqueserver/pyspades/master.py", line 105, in get_master_connection
	    connection = protocol.connect(MasterConnection, HOST, PORT, MASTER_VERSION)
	  File "/home/nota/prj/piqueserver/pyspades/protocol.py", line 95, in connect
	    peer = self.host.connect(enet.Address(host, port), channel_count,
	  File "enet.pyx", line 255, in enet.Address.__init__
	
	  File "enet.pyx", line 290, in enet.Address.host.__set__
	
	builtins.OSError: Resolution failure!

Server (please complete the following information):

  • OS/Version: linux
  • Piqueserver Version: 5171964
@NotAFile NotAFile added bug This issue reports a bug in piqueserver code and/or docs triage The Priority of this Bug has not been decided yet. labels Apr 3, 2019
@NotAFile NotAFile added priority:low This issue has a very low impact or is only noticable in rare circumstances and removed triage The Priority of this Bug has not been decided yet. labels May 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue reports a bug in piqueserver code and/or docs priority:low This issue has a very low impact or is only noticable in rare circumstances
Projects
None yet
Development

No branches or pull requests

1 participant