Skip to content

Commit 2684630

Browse files
Merge branch 'v3.7.x' into rabbitmq-server-1873-binding-recovery-37
2 parents 6f3277f + e7a4778 commit 2684630

File tree

5 files changed

+27
-43
lines changed

5 files changed

+27
-43
lines changed

docs/rabbitmq.conf.example

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -509,10 +509,10 @@
509509
# net_ticktime = 60
510510

511511
## Inter-node communication port range.
512+
## The parameters inet_dist_listen_min and inet_dist_listen_max
513+
## can be configured in the classic config format only.
512514
## Related doc guide: https://www.rabbitmq.com/networking.html#epmd-inet-dist-port-range.
513-
##
514-
# inet_dist_listen_min = 25672
515-
# inet_dist_listen_max = 25692
515+
516516

517517
## ----------------------------------------------------------------------------
518518
## RabbitMQ Management Plugin

priv/schema/rabbit.schema

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1342,16 +1342,6 @@ end}.
13421342
{validators, ["non_zero_positive_integer"]}
13431343
]}.
13441344

1345-
{mapping, "inet_dist_listen_min", "kernel.inet_dist_listen_min",[
1346-
{datatype, [integer]},
1347-
{validators, ["non_zero_positive_integer"]}
1348-
]}.
1349-
1350-
{mapping, "inet_dist_listen_max", "kernel.inet_dist_listen_max",[
1351-
{datatype, [integer]},
1352-
{validators, ["non_zero_positive_integer"]}
1353-
]}.
1354-
13551345
% ==========================
13561346
% sysmon_handler section
13571347
% ==========================

scripts/rabbitmq-server

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,7 @@ RABBITMQ_PRELAUNCH_NODENAME="rabbitmqprelaunch${$}@localhost"
187187
NOTIFY_SOCKET= \
188188
RABBITMQ_CONFIG_FILE=$RABBITMQ_CONFIG_FILE \
189189
ERL_CRASH_DUMP=$ERL_CRASH_DUMP \
190+
RABBITMQ_CONFIG_ARG_FILE=$RABBITMQ_CONFIG_ARG_FILE \
190191
RABBITMQ_DIST_PORT=$RABBITMQ_DIST_PORT \
191192
${ERL_DIR}erl -pa "$RABBITMQ_EBIN_ROOT" \
192193
-boot "${CLEAN_BOOT_FILE}" \

test/config_schema_SUITE_data/rabbit.snippets

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -576,19 +576,6 @@ credential_validator.regexp = ^abc\\d+",
576576
]}],
577577
[]},
578578

579-
{kernel_inet_dist_listen_min,
580-
"inet_dist_listen_min = 16000",
581-
[{kernel, [
582-
{inet_dist_listen_min, 16000}
583-
]}],
584-
[]},
585-
{kernel_inet_dist_listen_max,
586-
"inet_dist_listen_max = 16100",
587-
[{kernel, [
588-
{inet_dist_listen_max, 16100}
589-
]}],
590-
[]},
591-
592579
{log_syslog_settings,
593580
"log.syslog = true
594581
log.syslog.identity = rabbitmq

test/dynamic_ha_SUITE.erl

Lines changed: 23 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ groups() ->
6161
promote_on_shutdown,
6262
promote_on_failure,
6363
slave_recovers_after_vhost_failure,
64-
slave_recovers_after_vhost_down_an_up,
64+
slave_recovers_after_vhost_down_and_up,
6565
master_migrates_on_vhost_down,
6666
slave_recovers_after_vhost_down_and_master_migrated,
6767
queue_survive_adding_dead_vhost_mirror
@@ -133,7 +133,7 @@ change_policy(Config) ->
133133

134134
%% When we first declare a queue with no policy, it's not HA.
135135
amqp_channel:call(ACh, #'queue.declare'{queue = ?QNAME}),
136-
timer:sleep(100),
136+
timer:sleep(200),
137137
assert_slaves(A, ?QNAME, {A, ''}),
138138

139139
%% Give it policy "all", it becomes HA and gets all mirrors
@@ -417,7 +417,7 @@ slave_recovers_after_vhost_failure(Config) ->
417417
ACh = rabbit_ct_client_helpers:open_channel(Config, A),
418418
QName = <<"slave_recovers_after_vhost_failure-q">>,
419419
amqp_channel:call(ACh, #'queue.declare'{queue = QName}),
420-
timer:sleep(300),
420+
timer:sleep(500),
421421
assert_slaves(A, QName, {A, [B]}, [{A, []}]),
422422

423423
%% Crash vhost on a node hosting a mirror
@@ -426,22 +426,25 @@ slave_recovers_after_vhost_failure(Config) ->
426426

427427
assert_slaves(A, QName, {A, [B]}, [{A, []}]).
428428

429-
slave_recovers_after_vhost_down_an_up(Config) ->
429+
slave_recovers_after_vhost_down_and_up(Config) ->
430430
[A, B] = rabbit_ct_broker_helpers:get_node_configs(Config, nodename),
431431
rabbit_ct_broker_helpers:set_ha_policy_all(Config),
432432
ACh = rabbit_ct_client_helpers:open_channel(Config, A),
433-
QName = <<"slave_recovers_after_vhost_down_an_up-q">>,
433+
QName = <<"slave_recovers_after_vhost_down_and_up-q">>,
434434
amqp_channel:call(ACh, #'queue.declare'{queue = QName}),
435-
timer:sleep(100),
435+
timer:sleep(200),
436436
assert_slaves(A, QName, {A, [B]}, [{A, []}]),
437437

438438
%% Crash vhost on a node hosting a mirror
439439
rabbit_ct_broker_helpers:force_vhost_failure(Config, B, <<"/">>),
440-
%% Vhost is down now
441-
false = rabbit_ct_broker_helpers:rpc(Config, B, rabbit_vhost_sup_sup, is_vhost_alive, [<<"/">>]),
442-
timer:sleep(300),
440+
%% rabbit_ct_broker_helpers:force_vhost_failure/2 will retry up to 10 times to
441+
%% make sure that the top vhost supervision tree process did go down. MK.
442+
timer:sleep(500),
443443
%% Vhost is back up
444-
{ok, _Sup} = rabbit_ct_broker_helpers:rpc(Config, B, rabbit_vhost_sup_sup, start_vhost, [<<"/">>]),
444+
case rabbit_ct_broker_helpers:rpc(Config, B, rabbit_vhost_sup_sup, start_vhost, [<<"/">>]) of
445+
{ok, _Sup} -> ok;
446+
{error,{already_started, _Sup}} -> ok
447+
end,
445448

446449
assert_slaves(A, QName, {A, [B]}, [{A, []}]).
447450

@@ -451,12 +454,12 @@ master_migrates_on_vhost_down(Config) ->
451454
ACh = rabbit_ct_client_helpers:open_channel(Config, A),
452455
QName = <<"master_migrates_on_vhost_down-q">>,
453456
amqp_channel:call(ACh, #'queue.declare'{queue = QName}),
454-
timer:sleep(100),
457+
timer:sleep(200),
455458
assert_slaves(A, QName, {A, [B]}, [{A, []}]),
456459

457460
%% Crash vhost on the node hosting queue master
458461
rabbit_ct_broker_helpers:force_vhost_failure(Config, A, <<"/">>),
459-
timer:sleep(300),
462+
timer:sleep(500),
460463
assert_slaves(A, QName, {B, []}).
461464

462465
slave_recovers_after_vhost_down_and_master_migrated(Config) ->
@@ -465,16 +468,19 @@ slave_recovers_after_vhost_down_and_master_migrated(Config) ->
465468
ACh = rabbit_ct_client_helpers:open_channel(Config, A),
466469
QName = <<"slave_recovers_after_vhost_down_and_master_migrated-q">>,
467470
amqp_channel:call(ACh, #'queue.declare'{queue = QName}),
468-
timer:sleep(100),
471+
timer:sleep(200),
469472
assert_slaves(A, QName, {A, [B]}, [{A, []}]),
470473
%% Crash vhost on the node hosting queue master
471474
rabbit_ct_broker_helpers:force_vhost_failure(Config, A, <<"/">>),
472-
timer:sleep(300),
475+
timer:sleep(500),
473476
assert_slaves(B, QName, {B, []}),
474477

475478
%% Restart the vhost on the node (previously) hosting queue master
476-
{ok, _Sup} = rabbit_ct_broker_helpers:rpc(Config, A, rabbit_vhost_sup_sup, start_vhost, [<<"/">>]),
477-
timer:sleep(300),
479+
case rabbit_ct_broker_helpers:rpc(Config, A, rabbit_vhost_sup_sup, start_vhost, [<<"/">>]) of
480+
{ok, _Sup} -> ok;
481+
{error,{already_started, _Sup}} -> ok
482+
end,
483+
timer:sleep(500),
478484
assert_slaves(B, QName, {B, [A]}, [{B, []}]).
479485

480486
random_policy(Config) ->
@@ -569,7 +575,7 @@ assert_slaves0(RPCNode, QName, {ExpMNode, ExpSNodes}, PermittedIntermediate, Att
569575
State ->
570576
ct:pal("Waiting to leave state ~p~n Waiting for ~p~n",
571577
[State, {ExpMNode, ExpSNodes}]),
572-
timer:sleep(100),
578+
timer:sleep(200),
573579
assert_slaves0(RPCNode, QName, {ExpMNode, ExpSNodes},
574580
PermittedIntermediate,
575581
Attempts - 1)

0 commit comments

Comments
 (0)