Skip to content

Commit 71a0631

Browse files
authored
Merge pull request #841 from jeckersb/no-server-erl-args
Don't use RABBITMQ_SERVER_ERL_ARGS
2 parents 77b0033 + ae3f8f2 commit 71a0631

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

manifests/config.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@
125125
$proto_dist = 'inet6_tcp'
126126
$ssl_path = ''
127127
}
128-
$ipv6_or_tls_env = ['SERVER', 'CTL'].reduce({}) |$memo, $item| {
128+
$ipv6_or_tls_env = ['SERVER_ADDITIONAL', 'CTL'].reduce({}) |$memo, $item| {
129129
$orig = $_environment_variables["RABBITMQ_${item}_ERL_ARGS"]
130130
$munged = $orig ? {
131131
# already quoted, keep quoting

spec/classes/rabbitmq_spec.rb

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1326,35 +1326,35 @@
13261326
context 'without other erl args' do
13271327
it 'enables inet6 distribution' do
13281328
is_expected.to contain_file('rabbitmq-env.config'). \
1329-
with_content(%r{^RABBITMQ_SERVER_ERL_ARGS="-proto_dist inet6_tcp"$}). \
1329+
with_content(%r{^RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS="-proto_dist inet6_tcp"$}). \
13301330
with_content(%r{^RABBITMQ_CTL_ERL_ARGS="-proto_dist inet6_tcp"$})
13311331
end
13321332
end
13331333

13341334
context 'with other quoted erl args' do
13351335
let(:params) do
13361336
{ ipv6: true,
1337-
environment_variables: { 'RABBITMQ_SERVER_ERL_ARGS' => '"some quoted args"',
1337+
environment_variables: { 'RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS' => '"some quoted args"',
13381338
'RABBITMQ_CTL_ERL_ARGS' => '"other quoted args"' } }
13391339
end
13401340

13411341
it 'enables inet6 distribution and quote properly' do
13421342
is_expected.to contain_file('rabbitmq-env.config'). \
1343-
with_content(%r{^RABBITMQ_SERVER_ERL_ARGS="some quoted args -proto_dist inet6_tcp"$}). \
1343+
with_content(%r{^RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS="some quoted args -proto_dist inet6_tcp"$}). \
13441344
with_content(%r{^RABBITMQ_CTL_ERL_ARGS="other quoted args -proto_dist inet6_tcp"$})
13451345
end
13461346
end
13471347

13481348
context 'with other unquoted erl args' do
13491349
let(:params) do
13501350
{ ipv6: true,
1351-
environment_variables: { 'RABBITMQ_SERVER_ERL_ARGS' => 'foo',
1351+
environment_variables: { 'RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS' => 'foo',
13521352
'RABBITMQ_CTL_ERL_ARGS' => 'bar' } }
13531353
end
13541354

13551355
it 'enables inet6 distribution and quote properly' do
13561356
is_expected.to contain_file('rabbitmq-env.config'). \
1357-
with_content(%r{^RABBITMQ_SERVER_ERL_ARGS="foo -proto_dist inet6_tcp"$}). \
1357+
with_content(%r{^RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS="foo -proto_dist inet6_tcp"$}). \
13581358
with_content(%r{^RABBITMQ_CTL_ERL_ARGS="bar -proto_dist inet6_tcp"$})
13591359
end
13601360
end
@@ -1367,7 +1367,7 @@
13671367

13681368
it 'enables inet6 distribution' do
13691369
is_expected.to contain_file('rabbitmq-env.config'). \
1370-
with_content(%r{^RABBITMQ_SERVER_ERL_ARGS=" -pa /usr/lib64/erlang/lib/ssl-7.3.3.1/ebin -proto_dist inet6_tls"$}). \
1370+
with_content(%r{^RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS=" -pa /usr/lib64/erlang/lib/ssl-7.3.3.1/ebin -proto_dist inet6_tls"$}). \
13711371
with_content(%r{^RABBITMQ_CTL_ERL_ARGS=" -pa /usr/lib64/erlang/lib/ssl-7.3.3.1/ebin -proto_dist inet6_tls"$})
13721372
end
13731373
end
@@ -1376,13 +1376,13 @@
13761376
let(:params) do
13771377
{ ipv6: true,
13781378
ssl_erl_dist: true,
1379-
environment_variables: { 'RABBITMQ_SERVER_ERL_ARGS' => '"some quoted args"',
1379+
environment_variables: { 'RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS' => '"some quoted args"',
13801380
'RABBITMQ_CTL_ERL_ARGS' => '"other quoted args"' } }
13811381
end
13821382

13831383
it 'enables inet6 distribution and quote properly' do
13841384
is_expected.to contain_file('rabbitmq-env.config'). \
1385-
with_content(%r{^RABBITMQ_SERVER_ERL_ARGS="some quoted args -pa /usr/lib64/erlang/lib/ssl-7.3.3.1/ebin -proto_dist inet6_tls"$}). \
1385+
with_content(%r{^RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS="some quoted args -pa /usr/lib64/erlang/lib/ssl-7.3.3.1/ebin -proto_dist inet6_tls"$}). \
13861386
with_content(%r{^RABBITMQ_CTL_ERL_ARGS="other quoted args -pa /usr/lib64/erlang/lib/ssl-7.3.3.1/ebin -proto_dist inet6_tls"$})
13871387
end
13881388
end
@@ -1391,13 +1391,13 @@
13911391
let(:params) do
13921392
{ ipv6: true,
13931393
ssl_erl_dist: true,
1394-
environment_variables: { 'RABBITMQ_SERVER_ERL_ARGS' => 'foo',
1394+
environment_variables: { 'RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS' => 'foo',
13951395
'RABBITMQ_CTL_ERL_ARGS' => 'bar' } }
13961396
end
13971397

13981398
it 'enables inet6 distribution and quote properly' do
13991399
is_expected.to contain_file('rabbitmq-env.config'). \
1400-
with_content(%r{^RABBITMQ_SERVER_ERL_ARGS="foo -pa /usr/lib64/erlang/lib/ssl-7.3.3.1/ebin -proto_dist inet6_tls"$}). \
1400+
with_content(%r{^RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS="foo -pa /usr/lib64/erlang/lib/ssl-7.3.3.1/ebin -proto_dist inet6_tls"$}). \
14011401
with_content(%r{^RABBITMQ_CTL_ERL_ARGS="bar -pa /usr/lib64/erlang/lib/ssl-7.3.3.1/ebin -proto_dist inet6_tls"$})
14021402
end
14031403
end

0 commit comments

Comments
 (0)