dragonflow/devstack/zmq_pubsub_driver
Shachar Snapiri bbe1347e4e Refactoring of ZMQ pubsub
To work around the ZMQ issues (publisher binds to a port, thus only one
publisher can work on a given IP), we had a lot of junk code in our
repo.
Removed all redundant mechanisms (use_multiproc, is_neutron_server) and
modified to have 2 types of configurable ZMQ drivers:
1. zmq_remote_pubsub_driver - Has TCP publisher and IPC subscriber, This
   should be used in the publisher service.
2. zmq_pubsub_driver - Has IPC publisher and TCP subscriberi, This
   should be used in all other uses.

The way to set the one to use is via configuration, thus it is up to the
deployment to make sure this is configured correctly.

Change-Id: Ibf7894e608187e87bdeb7774749bfa0cc15eae56
2018-06-12 13:01:49 +00:00

14 lines
528 B
Bash

#!/bin/bash
function configure_pubsub_service_plugin {
NEUTRON_CONF=${NEUTRON_CONF:-"/etc/neutron/neutron.conf"}
PUB_SUB_DRIVER=${PUB_SUB_DRIVER:-"zmq_pubsub_driver"}
iniset $DRAGONFLOW_CONF df pub_sub_driver $PUB_SUB_DRIVER
DF_PUBLISHER_DRIVER=${DF_PUBLISHER_DRIVER:-"zmq_bind_pubsub_driver"}
iniset $DRAGONFLOW_PUBLISHER_CONF df pub_sub_driver $DF_PUBLISHER_DRIVER
ZMQ_IPC_SOCKET_DIR=`dirname $DF_ZMQ_IPC_SOCKET`
sudo mkdir -p $ZMQ_IPC_SOCKET_DIR
sudo chown $STACK_USER $ZMQ_IPC_SOCKET_DIR
}