Skip to content

Commit d64c8d8

Browse files
author
Rob Harrop
committed
Merge bug24095 into default
2 parents 8087fc7 + 5b8affb commit d64c8d8

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

src/rabbit_amqqueue.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ check_declare_arguments(QueueName, Args) ->
320320
ok -> ok;
321321
{error, Error} -> rabbit_misc:protocol_error(
322322
precondition_failed,
323-
"invalid arg '~s' for ~s: ~w",
323+
"invalid arg '~s' for ~s: ~255p",
324324
[Key, rabbit_misc:rs(QueueName), Error])
325325
end || {Key, Fun} <-
326326
[{<<"x-expires">>, fun check_integer_argument/2},

src/rabbit_mnesia.erl

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,10 @@ cluster(ClusterNodes, Force) ->
122122
ensure_mnesia_not_running(),
123123
ensure_mnesia_dir(),
124124

125-
case not Force andalso is_only_disc_node(node(), false) andalso
126-
not should_be_disc_node(ClusterNodes) of
125+
case not Force andalso is_clustered() andalso
126+
is_only_disc_node(node(), false) andalso
127+
not should_be_disc_node(ClusterNodes)
128+
of
127129
true -> log_both("last running disc node leaving cluster");
128130
_ -> ok
129131
end,
@@ -715,7 +717,9 @@ wait_for_tables(TableNames) ->
715717

716718
reset(Force) ->
717719
ensure_mnesia_not_running(),
718-
case not Force andalso is_only_disc_node(node(), false) of
720+
case not Force andalso is_clustered() andalso
721+
is_only_disc_node(node(), false)
722+
of
719723
true -> log_both("no other disc nodes running");
720724
false -> ok
721725
end,

0 commit comments

Comments
 (0)