@@ -634,13 +634,17 @@ do_start_rabbitmq_node(Config, NodeConfig, I) ->
634634 false -> WithPlugins0
635635 end ,
636636 ForceUseSecondary = rabbit_ct_helpers :get_config (
637- Config , force_secondary_umbrella , undefined ),
637+ Config , force_secondary , undefined ),
638638 CanUseSecondary = case ForceUseSecondary of
639639 undefined ->
640640 (I + 1 ) rem 2 =:= 0 ;
641641 Override when is_boolean (Override ) ->
642642 Override
643643 end ,
644+ UseSecondaryDist = case ? config (secondary_dist , Config ) of
645+ false -> false ;
646+ _ -> CanUseSecondary
647+ end ,
644648 UseSecondaryUmbrella = case ? config (secondary_umbrella , Config ) of
645649 false -> false ;
646650 _ -> CanUseSecondary
@@ -686,8 +690,15 @@ do_start_rabbitmq_node(Config, NodeConfig, I) ->
686690 StartWithPluginsDisabled = rabbit_ct_helpers :get_config (
687691 Config , start_rmq_with_plugins_disabled ),
688692 ExtraArgs2 = case StartWithPluginsDisabled of
689- true -> [" LEAVE_PLUGINS_DISABLED=yes" | ExtraArgs1 ];
690- _ -> ExtraArgs1
693+ true ->
694+ [" LEAVE_PLUGINS_DISABLED=1" | ExtraArgs1 ];
695+ _ ->
696+ case filename :basename (SrcDir ) of
697+ " rabbit" ->
698+ [" LEAVE_PLUGINS_DISABLED=1" | ExtraArgs1 ];
699+ SrcPlugin ->
700+ [{" RABBITMQ_ENABLED_PLUGINS=~ts " , [SrcPlugin ]} | ExtraArgs1 ]
701+ end
691702 end ,
692703 KeepPidFile = rabbit_ct_helpers :get_config (
693704 Config , keep_pid_file_on_exit ),
@@ -731,7 +742,18 @@ do_start_rabbitmq_node(Config, NodeConfig, I) ->
731742 {" RABBITMQ_PLUGINS=~ts /rabbitmq-plugins" , [SecScriptsDir ]}
732743 | ExtraArgs4 ];
733744 false ->
734- ExtraArgs4
745+ case UseSecondaryDist of
746+ true ->
747+ SecondaryDist = ? config (secondary_dist , Config ),
748+ [{" DIST_DIR=~ts /plugins" , [SecondaryDist ]},
749+ {" CLI_SCRIPTS_DIR=~ts /sbin" , [SecondaryDist ]},
750+ {" CLI_ESCRIPTS_DIR=~ts /escript" , [SecondaryDist ]},
751+ {" RABBITMQ_SCRIPTS_DIR=~ts /sbin" , [SecondaryDist ]},
752+ {" RABBITMQ_SERVER=~ts /sbin/rabbitmq-server" , [SecondaryDist ]}
753+ | ExtraArgs4 ];
754+ false ->
755+ ExtraArgs4
756+ end
735757 end ,
736758 MakeVars = [
737759 {" RABBITMQ_NODENAME=~ts " , [Nodename ]},
@@ -1285,6 +1307,10 @@ rabbitmqctl(Config, Node, Args, Timeout) ->
12851307 CanUseSecondary = (I + 1 ) rem 2 =:= 0 ,
12861308 BazelRunSecCmd = rabbit_ct_helpers :get_config (
12871309 Config , rabbitmq_run_secondary_cmd ),
1310+ UseSecondaryDist = case ? config (secondary_dist , Config ) of
1311+ false -> false ;
1312+ _ -> CanUseSecondary
1313+ end ,
12881314 UseSecondaryUmbrella = case ? config (secondary_umbrella , Config ) of
12891315 false ->
12901316 case BazelRunSecCmd of
@@ -1327,7 +1353,14 @@ rabbitmqctl(Config, Node, Args, Timeout) ->
13271353 " rabbitmqctl" ])
13281354 end ;
13291355 false ->
1330- ? config (rabbitmqctl_cmd , Config )
1356+ case UseSecondaryDist of
1357+ true ->
1358+ SecondaryDist = ? config (secondary_dist , Config ),
1359+ rabbit_misc :format (
1360+ " ~ts /sbin/rabbitmqctl" , [SecondaryDist ]);
1361+ false ->
1362+ ? config (rabbitmqctl_cmd , Config )
1363+ end
13311364 end ,
13321365
13331366 NodeConfig = get_node_config (Config , Node ),
0 commit comments