Browse Source

Set the qpidd output logfile permissions.

Also removes the explicit disabling of trace.  This will help
facilitate debugging in the future.

Change-Id: I6db5bd23492f2387fad1a0a223e0e4526e1c4015
Kenneth Giusti 3 years ago
parent
commit
8829503ec9
1 changed files with 6 additions and 9 deletions
  1. 6
    9
      devstack/plugin.sh

+ 6
- 9
devstack/plugin.sh View File

@@ -31,10 +31,6 @@
31 31
 # AMQP1_{USERNAME,PASSWORD} - for authentication with AMQP1_HOST
32 32
 #
33 33
 
34
-# Save trace setting
35
-XTRACE=$(set +o | grep xtrace)
36
-set +o xtrace
37
-
38 34
 # builds transport url string
39 35
 function _get_amqp1_transport_url {
40 36
     echo "amqp://$AMQP1_USERNAME:$AMQP1_PASSWORD@$AMQP1_HOST:5672/"
@@ -132,14 +128,19 @@ EOF
132 128
     if ! $QPIDD --help | grep -q "queue-patterns"; then
133 129
         exit_distro_not_supported "qpidd with AMQP 1.0 support"
134 130
     fi
131
+    local log_file=$LOGDIR/qpidd.log
135 132
     if ! grep -q "queue-patterns=exclusive" $qpid_conf_file; then
136 133
         cat <<EOF | sudo tee --append $qpid_conf_file
137 134
 queue-patterns=exclusive
138 135
 queue-patterns=unicast
139 136
 topic-patterns=broadcast
140
-log-to-file=$LOGDIR/qpidd.log 
137
+log-enable=info+
138
+log-to-file=$log_file
139
+log-to-syslog=yes
141 140
 EOF
142 141
     fi
142
+    sudo touch $log_file
143
+    sudo chmod a+rw $log_file  # qpidd user can write to it
143 144
 }
144 145
 
145 146
 
@@ -263,10 +264,6 @@ if is_service_enabled amqp1; then
263 264
 fi
264 265
 
265 266
 
266
-# Restore xtrace
267
-$XTRACE
268
-
269
-
270 267
 # Tell emacs to use shell-script-mode
271 268
 ## Local variables:
272 269
 ## mode: shell-script

Loading…
Cancel
Save