summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenneth Giusti <kgiusti@gmail.com>2018-02-23 17:01:04 -0500
committerKenneth Giusti <kgiusti@gmail.com>2018-03-20 16:34:11 -0400
commit70e18b5738d7c1a77adc41217d96ea3e2830ab67 (patch)
tree002306a77be8cc5283b79858e696646baf3ee8d5
parente34fd233d35435717205e958132e7e063673689b (diff)
update configuration for qdrouter v1.0.0
Notes
Notes (review): Code-Review+2: Ken Giusti <kgiusti@gmail.com> Code-Review+2: Andy Smith <ansmith@redhat.com> Workflow+1: Andy Smith <ansmith@redhat.com> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Wed, 21 Mar 2018 12:33:59 +0000 Reviewed-on: https://review.openstack.org/547678 Project: openstack/devstack-plugin-amqp1 Branch: refs/heads/master
-rw-r--r--devstack/plugin.sh12
1 files changed, 9 insertions, 3 deletions
diff --git a/devstack/plugin.sh b/devstack/plugin.sh
index dc215a3..44c560d 100644
--- a/devstack/plugin.sh
+++ b/devstack/plugin.sh
@@ -254,6 +254,8 @@ function _configure_qdr {
254 local url 254 local url
255 url=$(_parse_transport_url $1) 255 url=$(_parse_transport_url $1)
256 256
257 QDR=$(type -p qdrouterd)
258
257 # the location of the configuration is /etc/qpid-dispatch 259 # the location of the configuration is /etc/qpid-dispatch
258 local qdr_conf_file 260 local qdr_conf_file
259 if [ -e /etc/qpid-dispatch/qdrouterd.conf ]; then 261 if [ -e /etc/qpid-dispatch/qdrouterd.conf ]; then
@@ -275,7 +277,6 @@ router {
275 workerThreads: 4 277 workerThreads: 4
276 saslConfigPath: /etc/sasl2 278 saslConfigPath: /etc/sasl2
277 saslConfigName: qdrouterd 279 saslConfigName: qdrouterd
278 debugDump: /opt/stack/amqp1
279} 280}
280 281
281EOF 282EOF
@@ -283,9 +284,14 @@ EOF
283 # Create a listener for incoming connect to the router 284 # Create a listener for incoming connect to the router
284 local port 285 local port
285 port=$(echo "$url" | cut -d' ' -f2) 286 port=$(echo "$url" | cut -d' ' -f2)
287
288 # ip address field name changed to 'host' at 1.0+
289 local field_name
290 field_name=$([[ $($QDR -v) == 0.*.* ]] && echo addr || echo host)
291
286 cat <<EOF | sudo tee --append $qdr_conf_file 292 cat <<EOF | sudo tee --append $qdr_conf_file
287listener { 293listener {
288 addr: 0.0.0.0 294 ${field_name}: 0.0.0.0
289 port: ${port} 295 port: ${port}
290 role: normal 296 role: normal
291EOF 297EOF
@@ -387,7 +393,7 @@ EOF
387 cat <<EOF | sudo tee --append $qdr_conf_file 393 cat <<EOF | sudo tee --append $qdr_conf_file
388log { 394log {
389 module: DEFAULT 395 module: DEFAULT
390 enable: info+ 396 enable: trace+
391 output: $log_file 397 output: $log_file
392} 398}
393 399