diff --git a/salt/config.py b/salt/config.py index bdb04155a3..ffe6c436b4 100644 --- a/salt/config.py +++ b/salt/config.py @@ -64,7 +64,7 @@ def master_config(path): ''' opts = {'interface': '0.0.0.0', 'publish_port': '4505', - 'publish_rep_port': '45055', + 'publish_pull_port': '45055', 'worker_threads': 5, 'worker_start_port': '45056', 'ret_port': '4506', diff --git a/salt/master.py b/salt/master.py index 36b2dfe613..a4442e3d38 100644 --- a/salt/master.py +++ b/salt/master.py @@ -71,17 +71,16 @@ class Publisher(multiprocessing.Process): ''' context = zmq.Context(1) pub_sock = context.socket(zmq.PUB) - rep_sock = context.socket(zmq.REP) + pull_sock = context.socket(zmq.PULL) pub_uri = 'tcp://' + self.opts['interface'] + ':'\ + self.opts['publish_port'] - rep_uri = 'tcp://127.0.0.1:' + self.opts['publish_rep_port'] + pull_uri = 'tcp://127.0.0.1:' + self.opts['publish_pull_port'] self.opts['logger'].info('Starting the Salt Publisher on ' + pub_uri) pub_sock.bind(pub_uri) - rep_sock.bind(rep_uri) + pull_sock.bind(pull_uri) while True: - package = rep_sock.recv() - rep_sock.send('') + package = pull_sock.recv() self.opts['logger'].info('Publishing command') pub_sock.send(package) @@ -401,10 +400,9 @@ class MWorker(multiprocessing.Process): load['tgt_type'] = clear_load['tgt_type'] payload['load'] = self.crypticle.dumps(load) context = zmq.Context(1) - pub_sock = context.socket(zmq.REQ) - pub_sock.connect('tcp://127.0.0.1:' + self.opts['publish_rep_port']) + pub_sock = context.socket(zmq.PUSH) + pub_sock.connect('tcp://127.0.0.1:' + self.opts['publish_pull_port']) pub_sock.send(salt.payload.package(payload)) - pub_sock.recv() return {'enc': 'clear', 'load': {'jid': jid}}