|
40 | 40 | -spec is_process_running(node(), atom()) -> boolean(). |
41 | 41 | -spec cluster_name() -> binary(). |
42 | 42 | -spec set_cluster_name(binary()) -> 'ok'. |
43 | | --spec ensure_epmd() -> 'ok'. |
44 | 43 | -spec all_running() -> [node()]. |
45 | 44 |
|
46 | 45 | %%---------------------------------------------------------------------------- |
@@ -212,19 +211,6 @@ set_cluster_name(Name) -> |
212 | 211 | rabbit_runtime_parameters:set_global(cluster_name, Name). |
213 | 212 |
|
214 | 213 | ensure_epmd() -> |
215 | | - {ok, Prog} = init:get_argument(progname), |
216 | | - ID = rabbit_misc:random(1000000000), |
217 | | - Port = open_port( |
218 | | - {spawn_executable, os:find_executable(Prog)}, |
219 | | - [{args, ["-sname", rabbit_misc:format("epmd-starter-~b", [ID]), |
220 | | - "-noshell", "-eval", "halt()."]}, |
221 | | - exit_status, stderr_to_stdout, use_stdio]), |
222 | | - port_shutdown_loop(Port). |
223 | | - |
224 | | -port_shutdown_loop(Port) -> |
225 | | - receive |
226 | | - {Port, {exit_status, _Rc}} -> ok; |
227 | | - {Port, _} -> port_shutdown_loop(Port) |
228 | | - end. |
| 214 | + rabbit_nodes_common:ensure_epmd(). |
229 | 215 |
|
230 | 216 | all_running() -> rabbit_mnesia:cluster_nodes(running). |
0 commit comments