Skip to content

Commit 529c297

Browse files
committed
Allow to use unix socket for non-default servers
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)
1 parent 3f8c83c commit 529c297

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

lib/preprocessor.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,7 @@ def server_create(self, ctype, sname, opts):
211211
if 'rpl_master' in opts:
212212
temp.rpl_master = self.servers[opts['rpl_master']]
213213
temp.vardir = self.suite_ini['vardir']
214+
temp.use_unix_sockets = self.suite_ini.get('use_unix_sockets', False)
214215
temp.inspector_port = int(self.suite_ini.get(
215216
'inspector_port', temp.DEFAULT_INSPECTOR
216217
))

lib/tarantool_server.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,9 @@ def install(self, silent=True):
514514
self.copy_files()
515515

516516
if self.use_unix_sockets:
517-
self._admin = os.path.join(self.vardir, "socket-admin")
517+
path = os.path.join(self.vardir, self.name + ".socket-admin")
518+
warn_unix_socket(path)
519+
self._admin = path
518520
else:
519521
self._admin = find_port()
520522

0 commit comments

Comments
 (0)