Skip to content

Commit

Permalink
Allow to use unix socket for non-default servers
Browse files Browse the repository at this point in the history
It allows to mitigate the error 'Address already in use' while binding
admin (console) port. Check [1] for more information (see comment
itself, the issue is about the another problem).

[1]: #115 (comment)
  • Loading branch information
Totktonada committed Sep 5, 2018
1 parent 3f8c83c commit 529c297
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/preprocessor.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ def server_create(self, ctype, sname, opts):
if 'rpl_master' in opts:
temp.rpl_master = self.servers[opts['rpl_master']]
temp.vardir = self.suite_ini['vardir']
temp.use_unix_sockets = self.suite_ini.get('use_unix_sockets', False)
temp.inspector_port = int(self.suite_ini.get(
'inspector_port', temp.DEFAULT_INSPECTOR
))
Expand Down
4 changes: 3 additions & 1 deletion lib/tarantool_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,9 @@ def install(self, silent=True):
self.copy_files()

if self.use_unix_sockets:
self._admin = os.path.join(self.vardir, "socket-admin")
path = os.path.join(self.vardir, self.name + ".socket-admin")
warn_unix_socket(path)
self._admin = path
else:
self._admin = find_port()

Expand Down

0 comments on commit 529c297

Please sign in to comment.