Sean Dague | e263c82 | 2014-12-05 14:25:28 -0500 | [diff] [blame^] | 1 | #!/bin/bash |
| 2 | # |
Akihiro MOTOKI | b0f1c38 | 2013-01-13 17:58:12 +0900 | [diff] [blame] | 3 | # lib/rpc_backend |
| 4 | # Interface for interactig with different rpc backend |
| 5 | # rpc backend settings |
| 6 | |
| 7 | # Dependencies: |
Adam Spiers | 6a5aa7c | 2013-10-24 11:27:02 +0100 | [diff] [blame] | 8 | # |
| 9 | # - ``functions`` file |
| 10 | # - ``RABBIT_{HOST|PASSWORD}`` must be defined when RabbitMQ is used |
Kenneth Giusti | 7e58c06 | 2014-07-23 16:44:37 -0400 | [diff] [blame] | 11 | # - ``RPC_MESSAGING_PROTOCOL`` option for configuring the messaging protocol |
Akihiro MOTOKI | b0f1c38 | 2013-01-13 17:58:12 +0900 | [diff] [blame] | 12 | |
| 13 | # ``stack.sh`` calls the entry points in this order: |
| 14 | # |
Adam Spiers | 6a5aa7c | 2013-10-24 11:27:02 +0100 | [diff] [blame] | 15 | # - check_rpc_backend |
| 16 | # - install_rpc_backend |
| 17 | # - restart_rpc_backend |
| 18 | # - iniset_rpc_backend |
Akihiro MOTOKI | b0f1c38 | 2013-01-13 17:58:12 +0900 | [diff] [blame] | 19 | |
| 20 | # Save trace setting |
| 21 | XTRACE=$(set +o | grep xtrace) |
| 22 | set +o xtrace |
| 23 | |
Dean Troyer | cc6b443 | 2013-04-08 15:38:03 -0500 | [diff] [blame] | 24 | |
| 25 | # Functions |
| 26 | # --------- |
Akihiro MOTOKI | b0f1c38 | 2013-01-13 17:58:12 +0900 | [diff] [blame] | 27 | |
Matthieu Huin | 7a7a466 | 2013-04-15 17:13:41 +0200 | [diff] [blame] | 28 | |
Akihiro MOTOKI | b0f1c38 | 2013-01-13 17:58:12 +0900 | [diff] [blame] | 29 | # Make sure we only have one rpc backend enabled. |
| 30 | # Also check the specified rpc backend is available on your platform. |
Ian Wienand | aee18c7 | 2014-02-21 15:35:08 +1100 | [diff] [blame] | 31 | function check_rpc_backend { |
Dean Troyer | 3ef23bc | 2014-07-25 14:56:22 -0500 | [diff] [blame] | 32 | local c svc |
| 33 | |
Matthieu Huin | 7a7a466 | 2013-04-15 17:13:41 +0200 | [diff] [blame] | 34 | local rpc_needed=1 |
| 35 | # We rely on the fact that filenames in lib/* match the service names |
| 36 | # that can be passed as arguments to is_service_enabled. |
| 37 | # We check for a call to iniset_rpc_backend in these files, meaning |
| 38 | # the service needs a backend. |
Vishvananda Ishaya | 78a53d9 | 2013-05-09 17:20:31 -0700 | [diff] [blame] | 39 | rpc_candidates=$(grep -rl iniset_rpc_backend $TOP_DIR/lib/ | awk -F/ '{print $NF}') |
Matthieu Huin | 7a7a466 | 2013-04-15 17:13:41 +0200 | [diff] [blame] | 40 | for c in ${rpc_candidates}; do |
| 41 | if is_service_enabled $c; then |
| 42 | rpc_needed=0 |
| 43 | break |
| 44 | fi |
| 45 | done |
Akihiro MOTOKI | b0f1c38 | 2013-01-13 17:58:12 +0900 | [diff] [blame] | 46 | local rpc_backend_cnt=0 |
| 47 | for svc in qpid zeromq rabbit; do |
| 48 | is_service_enabled $svc && |
Dean Troyer | ffd1768 | 2014-08-02 16:07:03 -0500 | [diff] [blame] | 49 | (( rpc_backend_cnt++ )) || true |
Akihiro MOTOKI | b0f1c38 | 2013-01-13 17:58:12 +0900 | [diff] [blame] | 50 | done |
| 51 | if [ "$rpc_backend_cnt" -gt 1 ]; then |
| 52 | echo "ERROR: only one rpc backend may be enabled," |
| 53 | echo " set only one of 'rabbit', 'qpid', 'zeromq'" |
| 54 | echo " via ENABLED_SERVICES." |
Matthieu Huin | 7a7a466 | 2013-04-15 17:13:41 +0200 | [diff] [blame] | 55 | elif [ "$rpc_backend_cnt" == 0 ] && [ "$rpc_needed" == 0 ]; then |
Akihiro MOTOKI | b0f1c38 | 2013-01-13 17:58:12 +0900 | [diff] [blame] | 56 | echo "ERROR: at least one rpc backend must be enabled," |
| 57 | echo " set one of 'rabbit', 'qpid', 'zeromq'" |
| 58 | echo " via ENABLED_SERVICES." |
| 59 | fi |
| 60 | |
| 61 | if is_service_enabled qpid && ! qpid_is_supported; then |
Nachi Ueno | 07115eb | 2013-02-26 12:38:18 -0800 | [diff] [blame] | 62 | die $LINENO "Qpid support is not available for this version of your distribution." |
Akihiro MOTOKI | b0f1c38 | 2013-01-13 17:58:12 +0900 | [diff] [blame] | 63 | fi |
| 64 | } |
| 65 | |
Dean Troyer | 995eb92 | 2013-03-07 16:11:40 -0600 | [diff] [blame] | 66 | # clean up after rpc backend - eradicate all traces so changing backends |
| 67 | # produces a clean switch |
| 68 | function cleanup_rpc_backend { |
| 69 | if is_service_enabled rabbit; then |
| 70 | # Obliterate rabbitmq-server |
| 71 | uninstall_package rabbitmq-server |
DennyZhang | 557744f | 2013-10-14 09:50:13 -0500 | [diff] [blame] | 72 | sudo killall epmd || sudo killall -9 epmd |
Dean Troyer | 995eb92 | 2013-03-07 16:11:40 -0600 | [diff] [blame] | 73 | if is_ubuntu; then |
| 74 | # And the Erlang runtime too |
Sahid Orentino Ferdjaoui | e964827 | 2014-02-23 18:55:51 +0100 | [diff] [blame] | 75 | apt_get purge -y erlang* |
Dean Troyer | 995eb92 | 2013-03-07 16:11:40 -0600 | [diff] [blame] | 76 | fi |
| 77 | elif is_service_enabled qpid; then |
| 78 | if is_fedora; then |
zhhuabj | 5595fdc | 2013-05-08 18:27:20 +0800 | [diff] [blame] | 79 | uninstall_package qpid-cpp-server |
Dean Troyer | 995eb92 | 2013-03-07 16:11:40 -0600 | [diff] [blame] | 80 | elif is_ubuntu; then |
| 81 | uninstall_package qpidd |
| 82 | else |
| 83 | exit_distro_not_supported "qpid installation" |
| 84 | fi |
| 85 | elif is_service_enabled zeromq; then |
| 86 | if is_fedora; then |
Eric Windisch | 800bf38 | 2013-05-24 11:21:11 -0400 | [diff] [blame] | 87 | uninstall_package zeromq python-zmq redis |
Dean Troyer | 995eb92 | 2013-03-07 16:11:40 -0600 | [diff] [blame] | 88 | elif is_ubuntu; then |
Eric Windisch | 800bf38 | 2013-05-24 11:21:11 -0400 | [diff] [blame] | 89 | uninstall_package libzmq1 python-zmq redis-server |
Dean Troyer | 995eb92 | 2013-03-07 16:11:40 -0600 | [diff] [blame] | 90 | elif is_suse; then |
Eric Windisch | 800bf38 | 2013-05-24 11:21:11 -0400 | [diff] [blame] | 91 | uninstall_package libzmq1 python-pyzmq redis |
Dean Troyer | 995eb92 | 2013-03-07 16:11:40 -0600 | [diff] [blame] | 92 | else |
| 93 | exit_distro_not_supported "zeromq installation" |
| 94 | fi |
| 95 | fi |
Kenneth Giusti | 7e58c06 | 2014-07-23 16:44:37 -0400 | [diff] [blame] | 96 | |
| 97 | # Remove the AMQP 1.0 messaging libraries |
| 98 | if [ "$RPC_MESSAGING_PROTOCOL" == "AMQP1" ]; then |
| 99 | if is_fedora; then |
| 100 | uninstall_package qpid-proton-c-devel |
| 101 | uninstall_package python-qpid-proton |
| 102 | fi |
| 103 | # TODO(kgiusti) ubuntu cleanup |
| 104 | fi |
Dean Troyer | 995eb92 | 2013-03-07 16:11:40 -0600 | [diff] [blame] | 105 | } |
| 106 | |
Akihiro MOTOKI | b0f1c38 | 2013-01-13 17:58:12 +0900 | [diff] [blame] | 107 | # install rpc backend |
Ian Wienand | aee18c7 | 2014-02-21 15:35:08 +1100 | [diff] [blame] | 108 | function install_rpc_backend { |
Kenneth Giusti | 7e58c06 | 2014-07-23 16:44:37 -0400 | [diff] [blame] | 109 | # Regardless of the broker used, if AMQP 1.0 is configured load |
| 110 | # the necessary messaging client libraries for oslo.messaging |
| 111 | if [ "$RPC_MESSAGING_PROTOCOL" == "AMQP1" ]; then |
| 112 | if is_fedora; then |
| 113 | install_package qpid-proton-c-devel |
| 114 | install_package python-qpid-proton |
| 115 | elif is_ubuntu; then |
| 116 | # TODO(kgiusti) The QPID AMQP 1.0 protocol libraries |
| 117 | # are not yet in the ubuntu repos. Enable these installs |
| 118 | # once they are present: |
| 119 | #install_package libqpid-proton2-dev |
| 120 | #install_package python-qpid-proton |
| 121 | # Also add 'uninstall' directives in cleanup_rpc_backend()! |
| 122 | exit_distro_not_supported "QPID AMQP 1.0 Proton libraries" |
| 123 | else |
| 124 | exit_distro_not_supported "QPID AMQP 1.0 Proton libraries" |
| 125 | fi |
| 126 | # Install pyngus client API |
| 127 | # TODO(kgiusti) can remove once python qpid bindings are |
| 128 | # available on all supported platforms _and_ pyngus is added |
| 129 | # to the requirements.txt file in oslo.messaging |
| 130 | pip_install pyngus |
| 131 | fi |
| 132 | |
Akihiro MOTOKI | b0f1c38 | 2013-01-13 17:58:12 +0900 | [diff] [blame] | 133 | if is_service_enabled rabbit; then |
| 134 | # Install rabbitmq-server |
Ian Wienand | 7ccf4e0 | 2014-07-23 14:24:11 +1000 | [diff] [blame] | 135 | install_package rabbitmq-server |
Akihiro MOTOKI | b0f1c38 | 2013-01-13 17:58:12 +0900 | [diff] [blame] | 136 | elif is_service_enabled qpid; then |
| 137 | if is_fedora; then |
zhhuabj | 5595fdc | 2013-05-08 18:27:20 +0800 | [diff] [blame] | 138 | install_package qpid-cpp-server |
Akihiro MOTOKI | b0f1c38 | 2013-01-13 17:58:12 +0900 | [diff] [blame] | 139 | elif is_ubuntu; then |
| 140 | install_package qpidd |
| 141 | else |
| 142 | exit_distro_not_supported "qpid installation" |
| 143 | fi |
Kenneth Giusti | 062a3c3 | 2014-09-30 10:14:08 -0400 | [diff] [blame] | 144 | _configure_qpid |
Akihiro MOTOKI | b0f1c38 | 2013-01-13 17:58:12 +0900 | [diff] [blame] | 145 | elif is_service_enabled zeromq; then |
Eric Windisch | 800bf38 | 2013-05-24 11:21:11 -0400 | [diff] [blame] | 146 | # NOTE(ewindisch): Redis is not strictly necessary |
| 147 | # but there is a matchmaker driver that works |
| 148 | # really well & out of the box for multi-node. |
Akihiro MOTOKI | b0f1c38 | 2013-01-13 17:58:12 +0900 | [diff] [blame] | 149 | if is_fedora; then |
Eric Windisch | 800bf38 | 2013-05-24 11:21:11 -0400 | [diff] [blame] | 150 | install_package zeromq python-zmq redis |
Akihiro MOTOKI | b0f1c38 | 2013-01-13 17:58:12 +0900 | [diff] [blame] | 151 | elif is_ubuntu; then |
Eric Windisch | 800bf38 | 2013-05-24 11:21:11 -0400 | [diff] [blame] | 152 | install_package libzmq1 python-zmq redis-server |
Akihiro MOTOKI | b0f1c38 | 2013-01-13 17:58:12 +0900 | [diff] [blame] | 153 | elif is_suse; then |
Eric Windisch | 800bf38 | 2013-05-24 11:21:11 -0400 | [diff] [blame] | 154 | install_package libzmq1 python-pyzmq redis |
Akihiro MOTOKI | b0f1c38 | 2013-01-13 17:58:12 +0900 | [diff] [blame] | 155 | else |
| 156 | exit_distro_not_supported "zeromq installation" |
| 157 | fi |
Vincent Hou | 93a7a50 | 2013-09-27 06:16:54 -0400 | [diff] [blame] | 158 | # Necessary directory for socket location. |
| 159 | sudo mkdir -p /var/run/openstack |
| 160 | sudo chown $STACK_USER /var/run/openstack |
Akihiro MOTOKI | b0f1c38 | 2013-01-13 17:58:12 +0900 | [diff] [blame] | 161 | fi |
Kenneth Giusti | a1875b7 | 2014-09-15 14:21:55 -0400 | [diff] [blame] | 162 | |
| 163 | # If using the QPID broker, install the QPID python client API |
| 164 | if is_service_enabled qpid || [ -n "$QPID_HOST" ]; then |
| 165 | install_package python-qpid |
| 166 | fi |
Akihiro MOTOKI | b0f1c38 | 2013-01-13 17:58:12 +0900 | [diff] [blame] | 167 | } |
| 168 | |
| 169 | # restart the rpc backend |
Ian Wienand | aee18c7 | 2014-02-21 15:35:08 +1100 | [diff] [blame] | 170 | function restart_rpc_backend { |
Akihiro MOTOKI | b0f1c38 | 2013-01-13 17:58:12 +0900 | [diff] [blame] | 171 | if is_service_enabled rabbit; then |
| 172 | # Start rabbitmq-server |
| 173 | echo_summary "Starting RabbitMQ" |
Ben Nemec | ec5918f | 2014-01-30 16:07:23 +0000 | [diff] [blame] | 174 | # NOTE(bnemec): Retry initial rabbitmq configuration to deal with |
| 175 | # the fact that sometimes it fails to start properly. |
| 176 | # Reference: https://bugzilla.redhat.com/show_bug.cgi?id=1059028 |
Dean Troyer | 3ef23bc | 2014-07-25 14:56:22 -0500 | [diff] [blame] | 177 | local i |
Ben Nemec | ec5918f | 2014-01-30 16:07:23 +0000 | [diff] [blame] | 178 | for i in `seq 10`; do |
| 179 | if is_fedora || is_suse; then |
| 180 | # service is not started by default |
| 181 | restart_service rabbitmq-server |
| 182 | fi |
| 183 | # change the rabbit password since the default is "guest" |
| 184 | sudo rabbitmqctl change_password guest $RABBIT_PASSWORD && break |
| 185 | [[ $i -eq "10" ]] && die $LINENO "Failed to set rabbitmq password" |
| 186 | done |
Kieran Spear | fb2a3ae | 2013-03-11 23:55:49 +0000 | [diff] [blame] | 187 | if is_service_enabled n-cell; then |
| 188 | # Add partitioned access for the child cell |
| 189 | if [ -z `sudo rabbitmqctl list_vhosts | grep child_cell` ]; then |
| 190 | sudo rabbitmqctl add_vhost child_cell |
| 191 | sudo rabbitmqctl set_permissions -p child_cell guest ".*" ".*" ".*" |
| 192 | fi |
| 193 | fi |
Akihiro MOTOKI | b0f1c38 | 2013-01-13 17:58:12 +0900 | [diff] [blame] | 194 | elif is_service_enabled qpid; then |
| 195 | echo_summary "Starting qpid" |
| 196 | restart_service qpidd |
| 197 | fi |
| 198 | } |
| 199 | |
| 200 | # iniset cofiguration |
Ian Wienand | aee18c7 | 2014-02-21 15:35:08 +1100 | [diff] [blame] | 201 | function iniset_rpc_backend { |
Akihiro MOTOKI | b0f1c38 | 2013-01-13 17:58:12 +0900 | [diff] [blame] | 202 | local package=$1 |
| 203 | local file=$2 |
| 204 | local section=$3 |
| 205 | if is_service_enabled zeromq; then |
| 206 | iniset $file $section rpc_backend ${package}.openstack.common.rpc.impl_zmq |
Eric Windisch | 800bf38 | 2013-05-24 11:21:11 -0400 | [diff] [blame] | 207 | iniset $file $section rpc_zmq_matchmaker \ |
| 208 | ${package}.openstack.common.rpc.matchmaker_redis.MatchMakerRedis |
| 209 | # Set MATCHMAKER_REDIS_HOST if running multi-node. |
| 210 | MATCHMAKER_REDIS_HOST=${MATCHMAKER_REDIS_HOST:-127.0.0.1} |
| 211 | iniset $file matchmaker_redis host $MATCHMAKER_REDIS_HOST |
Jason Dillaman | 056df82 | 2013-07-01 08:52:13 -0400 | [diff] [blame] | 212 | elif is_service_enabled qpid || [ -n "$QPID_HOST" ]; then |
Kenneth Giusti | 7e58c06 | 2014-07-23 16:44:37 -0400 | [diff] [blame] | 213 | # For Qpid use the 'amqp' oslo.messaging transport when AMQP 1.0 is used |
| 214 | if [ "$RPC_MESSAGING_PROTOCOL" == "AMQP1" ]; then |
| 215 | iniset $file $section rpc_backend "amqp" |
| 216 | else |
| 217 | iniset $file $section rpc_backend ${package}.openstack.common.rpc.impl_qpid |
| 218 | fi |
Attila Fazekas | a3dc399 | 2013-07-11 11:26:35 +0200 | [diff] [blame] | 219 | iniset $file $section qpid_hostname ${QPID_HOST:-$SERVICE_HOST} |
Kenneth Giusti | 062a3c3 | 2014-09-30 10:14:08 -0400 | [diff] [blame] | 220 | if [ -n "$QPID_USERNAME" ]; then |
| 221 | iniset $file $section qpid_username $QPID_USERNAME |
Eoghan Glynn | 8c11f56 | 2013-03-01 12:09:01 +0000 | [diff] [blame] | 222 | iniset $file $section qpid_password $QPID_PASSWORD |
Eoghan Glynn | 8c11f56 | 2013-03-01 12:09:01 +0000 | [diff] [blame] | 223 | fi |
jiajun xu | 4a30b84 | 2013-01-22 11:49:03 +0800 | [diff] [blame] | 224 | elif is_service_enabled rabbit || { [ -n "$RABBIT_HOST" ] && [ -n "$RABBIT_PASSWORD" ]; }; then |
Akihiro MOTOKI | b0f1c38 | 2013-01-13 17:58:12 +0900 | [diff] [blame] | 225 | iniset $file $section rpc_backend ${package}.openstack.common.rpc.impl_kombu |
Nicolas Simonds | 8f084c6 | 2014-02-28 17:01:41 -0800 | [diff] [blame] | 226 | iniset $file $section rabbit_hosts $RABBIT_HOST |
Akihiro MOTOKI | b0f1c38 | 2013-01-13 17:58:12 +0900 | [diff] [blame] | 227 | iniset $file $section rabbit_password $RABBIT_PASSWORD |
| 228 | fi |
| 229 | } |
| 230 | |
| 231 | # Check if qpid can be used on the current distro. |
| 232 | # qpid_is_supported |
Ian Wienand | aee18c7 | 2014-02-21 15:35:08 +1100 | [diff] [blame] | 233 | function qpid_is_supported { |
Akihiro MOTOKI | b0f1c38 | 2013-01-13 17:58:12 +0900 | [diff] [blame] | 234 | if [[ -z "$DISTRO" ]]; then |
| 235 | GetDistro |
| 236 | fi |
| 237 | |
Sean Dague | 2bb483d | 2014-01-03 09:41:27 -0500 | [diff] [blame] | 238 | # Qpid is not in openSUSE |
| 239 | ( ! is_suse ) |
Akihiro MOTOKI | b0f1c38 | 2013-01-13 17:58:12 +0900 | [diff] [blame] | 240 | } |
| 241 | |
Kenneth Giusti | 062a3c3 | 2014-09-30 10:14:08 -0400 | [diff] [blame] | 242 | # Set up the various configuration files used by the qpidd broker |
| 243 | function _configure_qpid { |
| 244 | |
| 245 | # the location of the configuration files have changed since qpidd 0.14 |
| 246 | local qpid_conf_file |
| 247 | if [ -e /etc/qpid/qpidd.conf ]; then |
| 248 | qpid_conf_file=/etc/qpid/qpidd.conf |
| 249 | elif [ -e /etc/qpidd.conf ]; then |
| 250 | qpid_conf_file=/etc/qpidd.conf |
| 251 | else |
| 252 | exit_distro_not_supported "qpidd.conf file not found!" |
| 253 | fi |
| 254 | |
| 255 | # force the ACL file to a known location |
| 256 | local qpid_acl_file=/etc/qpid/qpidd.acl |
| 257 | if [ ! -e $qpid_acl_file ]; then |
| 258 | sudo mkdir -p -m 755 `dirname $qpid_acl_file` |
| 259 | sudo touch $qpid_acl_file |
| 260 | sudo chmod o+r $qpid_acl_file |
| 261 | fi |
| 262 | sudo sed -i.bak '/^acl-file=/d' $qpid_conf_file |
| 263 | echo "acl-file=$qpid_acl_file" | sudo tee --append $qpid_conf_file |
| 264 | |
| 265 | sudo sed -i '/^auth=/d' $qpid_conf_file |
| 266 | if [ -z "$QPID_USERNAME" ]; then |
| 267 | # no QPID user configured, so disable authentication |
| 268 | # and access control |
| 269 | echo "auth=no" | sudo tee --append $qpid_conf_file |
| 270 | cat <<EOF | sudo tee $qpid_acl_file |
| 271 | acl allow all all |
| 272 | EOF |
| 273 | else |
| 274 | # Configure qpidd to use PLAIN authentication, and add |
| 275 | # QPID_USERNAME to the ACL: |
| 276 | echo "auth=yes" | sudo tee --append $qpid_conf_file |
| 277 | if [ -z "$QPID_PASSWORD" ]; then |
| 278 | read_password QPID_PASSWORD "ENTER A PASSWORD FOR QPID USER $QPID_USERNAME" |
| 279 | fi |
| 280 | # Create ACL to allow $QPID_USERNAME full access |
| 281 | cat <<EOF | sudo tee $qpid_acl_file |
| 282 | group admin ${QPID_USERNAME}@QPID |
| 283 | acl allow admin all |
| 284 | acl deny all all |
| 285 | EOF |
| 286 | # Add user to SASL database |
| 287 | if is_ubuntu; then |
| 288 | install_package sasl2-bin |
| 289 | elif is_fedora; then |
| 290 | install_package cyrus-sasl-lib |
| 291 | fi |
| 292 | local sasl_conf_file=/etc/sasl2/qpidd.conf |
| 293 | sudo sed -i.bak '/PLAIN/!s/mech_list: /mech_list: PLAIN /' $sasl_conf_file |
| 294 | local sasl_db=`sudo grep sasldb_path $sasl_conf_file | cut -f 2 -d ":" | tr -d [:blank:]` |
| 295 | if [ ! -e $sasl_db ]; then |
| 296 | sudo mkdir -p -m 755 `dirname $sasl_db` |
| 297 | fi |
| 298 | echo $QPID_PASSWORD | sudo saslpasswd2 -c -p -f $sasl_db -u QPID $QPID_USERNAME |
| 299 | sudo chmod o+r $sasl_db |
| 300 | fi |
| 301 | |
| 302 | # If AMQP 1.0 is specified, ensure that the version of the |
| 303 | # broker can support AMQP 1.0 and configure the queue and |
| 304 | # topic address patterns used by oslo.messaging. |
| 305 | if [ "$RPC_MESSAGING_PROTOCOL" == "AMQP1" ]; then |
| 306 | QPIDD=$(type -p qpidd) |
| 307 | if ! $QPIDD --help | grep -q "queue-patterns"; then |
| 308 | exit_distro_not_supported "qpidd with AMQP 1.0 support" |
| 309 | fi |
| 310 | if ! grep -q "queue-patterns=exclusive" $qpid_conf_file; then |
| 311 | cat <<EOF | sudo tee --append $qpid_conf_file |
| 312 | queue-patterns=exclusive |
| 313 | queue-patterns=unicast |
| 314 | topic-patterns=broadcast |
| 315 | EOF |
| 316 | fi |
| 317 | fi |
| 318 | } |
Dean Troyer | cc6b443 | 2013-04-08 15:38:03 -0500 | [diff] [blame] | 319 | |
Akihiro MOTOKI | b0f1c38 | 2013-01-13 17:58:12 +0900 | [diff] [blame] | 320 | # Restore xtrace |
| 321 | $XTRACE |
Sean Dague | 584d90e | 2013-03-29 14:34:53 -0400 | [diff] [blame] | 322 | |
Adam Spiers | 6a5aa7c | 2013-10-24 11:27:02 +0100 | [diff] [blame] | 323 | # Tell emacs to use shell-script-mode |
| 324 | ## Local variables: |
| 325 | ## mode: shell-script |
| 326 | ## End: |