diff options
| author | Jean-Sébastien Pédron <jean-sebastien@rabbitmq.com> | 2020-01-22 12:10:16 +0100 |
|---|---|---|
| committer | Jean-Sébastien Pédron <jean-sebastien@rabbitmq.com> | 2020-02-03 10:12:57 +0100 |
| commit | 96359ed3c6d7d1555e3ffaa9ffb59d2b1a7d8b52 (patch) | |
| tree | 6f07a50c4021f4567d09aee2c087e2e83e69bb08 | |
| parent | 15b07b66ceba56509da843f73c8c9a151bd6d08c (diff) | |
| download | rabbitmq-server-git-96359ed3c6d7d1555e3ffaa9ffb59d2b1a7d8b52.tar.gz | |
rabbit_mnesia_rename: Use the new rabbit_nodes_common:name_type() function
... instead of calling rabbit_nodes:name_type(). The latter now uses the
context to return the name type of the current node (instead of the
environment variable which may not be set). However, this function is
executed in the context of the CLI which does not start
rabbit_prelaunch. Therefore, there is no context to get the name type
from.
Anyway, the name type should be determined based on the node name we are
about to impersonate. So use the argument to deduce the name type.
| -rw-r--r-- | src/rabbit_mnesia_rename.erl | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/rabbit_mnesia_rename.erl b/src/rabbit_mnesia_rename.erl index c74a390ae2..5715816adb 100644 --- a/src/rabbit_mnesia_rename.erl +++ b/src/rabbit_mnesia_rename.erl @@ -281,4 +281,5 @@ become(BecomeNode) -> start_distribution(Name) -> rabbit_nodes:ensure_epmd(), - net_kernel:start([Name, rabbit_nodes:name_type()]). + NameType = rabbit_nodes_common:name_type(Name), + net_kernel:start([Name, NameType]). |
