Skip to content

Commit 60fbb6f

Browse files
committed
Show ZMQ version warning for < 3.2 (rather than < 3)
1 parent 763a9b4 commit 60fbb6f

File tree

2 files changed

+15
-11
lines changed

2 files changed

+15
-11
lines changed

salt/master.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -168,11 +168,13 @@ def __init__(self, opts):
168168
Create a salt master server instance
169169
'''
170170
# Warn if ZMQ < 3
171-
if int(zmq.zmq_version()[0]) < 3:
172-
log.warning('You have a version of ZMQ less than ZMQ 3! There are '
173-
'known connection keep-alive issues with ZMQ < 3 '
174-
'which may result in loss of contact with minions. '
175-
'Please upgrade your ZMQ!')
171+
if (int(zmq.zmq_version()[0]) < 3 or
172+
(int(zmq.zmq_version()[0]) == 3 and
173+
int(zmq.zmq_version()[2]) < 2)):
174+
log.warning('You have a version of ZMQ less than ZMQ 3.2! There '
175+
'are known connection keep-alive issues with ZMQ < '
176+
'3.2 which may result in loss of contact with '
177+
'minions. Please upgrade your ZMQ!')
176178
SMaster.__init__(self, opts)
177179

178180
def _clear_old_jobs(self):

salt/minion.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -457,12 +457,14 @@ def __init__(self, opts, timeout=60, safe=True):
457457
'''
458458
Pass in the options dict
459459
'''
460-
# Warn if ZMQ < 3
461-
if HAS_ZMQ and int(zmq.zmq_version()[0]) < 3:
462-
log.warning('You have a version of ZMQ less than ZMQ 3! There are '
463-
'known connection keep-alive issues with ZMQ < 3 '
464-
'which may result in loss of contact with minions. '
465-
'Please upgrade your ZMQ!')
460+
# Warn if ZMQ < 3.2
461+
if HAS_ZMQ and (int(zmq.zmq_version()[0]) < 3 or
462+
(int(zmq.zmq_version()[0]) == 3 and
463+
int(zmq.zmq_version()[2]) < 2)):
464+
log.warning('You have a version of ZMQ less than ZMQ 3.2! There '
465+
'are known connection keep-alive issues with ZMQ < '
466+
'3.2 which may result in loss of contact with '
467+
'minions. Please upgrade your ZMQ!')
466468
# Late setup the of the opts grains, so we can log from the grains
467469
# module
468470
opts['grains'] = salt.loader.grains(opts)

0 commit comments

Comments
 (0)