mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
Merge pull request #3466 from s0undt3ch/hotfix/zmq-ipc-path-max-length
`zmq.IPC_PATH_MAX_LEN` is not available in older ZMQ, only on PyZMQ>=2.2
This commit is contained in:
commit
fa2f082e35
@ -803,13 +803,14 @@ def is_linux():
|
||||
def check_ipc_path_max_len(uri):
|
||||
# The socket path is limited to 107 characters on Solaris and
|
||||
# Linux, and 103 characters on BSD-based systems.
|
||||
if zmq.IPC_PATH_MAX_LEN and len(uri) > zmq.IPC_PATH_MAX_LEN:
|
||||
ipc_path_max_len = getattr(zmq, 'IPC_PATH_MAX_LEN', 103)
|
||||
if ipc_path_max_len and len(uri) > ipc_path_max_len:
|
||||
raise SaltSystemExit(
|
||||
'The socket path is longer than allowed by OS. '
|
||||
'{0!r} is longer than {1} characters. '
|
||||
'Either try to reduce the length of this setting\'s '
|
||||
'path or switch to TCP; in the configuration file, '
|
||||
'set "ipc_mode: tcp".'.format(
|
||||
uri, zmq.IPC_PATH_MAX_LEN
|
||||
uri, ipc_path_max_len
|
||||
)
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user