Skip to content

Commit c3fd77a

Browse files
committed
CLOUD-2821 fix http.nonProxyHosts escaping for amq
Signed-off-by: rcernich <[email protected]>
1 parent 91d0095 commit c3fd77a

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

os-amq-launch/added/drain.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ fi
2727
# Add proxy command line options
2828
source /opt/run-java/proxy-options
2929
ACTIVEMQ_OPTS="$ACTIVEMQ_OPTS $(proxy_options)"
30+
opts_array=($ACTIVEMQ_OPTS)
31+
ACTIVEMQ_OPTS=$(printf "%q " ${opts_array[@]})
3032

3133
function runMigration() {
3234
export ACTIVEMQ_DATA="$1"

os-amq-launch/added/launch.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ fi
2525

2626
# Add proxy command line options
2727
source /opt/run-java/proxy-options
28-
options="$(proxy_options)"
29-
options="$(echo $options | sed 's|"|\\"|g')"
30-
ACTIVEMQ_OPTS="$ACTIVEMQ_OPTS $options"
28+
ACTIVEMQ_OPTS="$ACTIVEMQ_OPTS $(proxy_options)"
29+
opts_array=($ACTIVEMQ_OPTS)
30+
ACTIVEMQ_OPTS=$(printf "%q " ${opts_array[@]})
3131

3232
# Add jolokia command line options
3333
cat <<EOF > $AMQ_HOME/bin/env

tests/features/amq/amq-common.feature

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -214,10 +214,11 @@ Feature: Openshift AMQ tests
214214

215215
Scenario: check nonHttpProxy escaping
216216
When container is started with env
217-
| variable | value |
218-
| NO_PROXY | patriots.com |
217+
| variable | value |
218+
| NO_PROXY | patriots.com,127.* |
219219
Then container log should contain INFO | Apache ActiveMQ 5.11.0.redhat-
220-
And file /opt/amq/bin/env should contain -Dhttp.nonProxyHosts=patriots.com
220+
And container log should contain -Dhttp.nonProxyHosts=patriots.com|127.*
221+
And file /opt/amq/bin/env should contain -Dhttp.nonProxyHosts=patriots.com\|127.\*
221222

222223
Scenario: check queue memory limit
223224
Given XML namespace amq:http://activemq.apache.org/schema/core

0 commit comments

Comments
 (0)