Show ZMQ version warning for < 3.2 (rather than < 3)

This commit is contained in:
Colton Myers 2013-09-26 17:39:40 -06:00
parent 723405af5b
commit e53820a982
2 changed files with 15 additions and 11 deletions

View File

@ -168,11 +168,13 @@ class Master(SMaster):
Create a salt master server instance
'''
# Warn if ZMQ < 3
if int(zmq.zmq_version()[0]) < 3:
log.warning('You have a version of ZMQ less than ZMQ 3! There are '
'known connection keep-alive issues with ZMQ < 3 '
'which may result in loss of contact with minions. '
'Please upgrade your ZMQ!')
if (int(zmq.zmq_version()[0]) < 3 or
(int(zmq.zmq_version()[0]) == 3 and
int(zmq.zmq_version()[2]) < 2)):
log.warning('You have a version of ZMQ less than ZMQ 3.2! There '
'are known connection keep-alive issues with ZMQ < '
'3.2 which may result in loss of contact with '
'minions. Please upgrade your ZMQ!')
SMaster.__init__(self, opts)
def _clear_old_jobs(self):

View File

@ -457,12 +457,14 @@ class Minion(object):
'''
Pass in the options dict
'''
# Warn if ZMQ < 3
if HAS_ZMQ and int(zmq.zmq_version()[0]) < 3:
log.warning('You have a version of ZMQ less than ZMQ 3! There are '
'known connection keep-alive issues with ZMQ < 3 '
'which may result in loss of contact with minions. '
'Please upgrade your ZMQ!')
# Warn if ZMQ < 3.2
if HAS_ZMQ and (int(zmq.zmq_version()[0]) < 3 or
(int(zmq.zmq_version()[0]) == 3 and
int(zmq.zmq_version()[2]) < 2)):
log.warning('You have a version of ZMQ less than ZMQ 3.2! There '
'are known connection keep-alive issues with ZMQ < '
'3.2 which may result in loss of contact with '
'minions. Please upgrade your ZMQ!')
# Late setup the of the opts grains, so we can log from the grains
# module
opts['grains'] = salt.loader.grains(opts)