summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Klishin <klishinm@vmware.com>2021-03-24 23:12:48 +0300
committerGitHub <noreply@github.com>2021-03-24 23:12:48 +0300
commit411d4946488fe328b029bdbcac89a02f83e30912 (patch)
tree7f1ef874ab5c7ba0fe4b016376b43e40191c67b0
parent6ad235cc64582c16e46273b0d6da6c547d4bad24 (diff)
parent647b2ad45300a682012842c2f3f8513719884bf3 (diff)
downloadrabbitmq-server-git-411d4946488fe328b029bdbcac89a02f83e30912.tar.gz
Merge pull request #2925 from rabbitmq/mk-drain-revive-with-disabled-feature-flag
Revisit what drain and revive do when their feature flag is not enabled
-rw-r--r--deps/rabbit/src/rabbit_maintenance.erl8
1 files changed, 6 insertions, 2 deletions
diff --git a/deps/rabbit/src/rabbit_maintenance.erl b/deps/rabbit/src/rabbit_maintenance.erl
index 97de68bc6f..f8e93b4d6d 100644
--- a/deps/rabbit/src/rabbit_maintenance.erl
+++ b/deps/rabbit/src/rabbit_maintenance.erl
@@ -67,7 +67,9 @@ is_enabled() ->
drain() ->
case is_enabled() of
true -> do_drain();
- false -> rabbit_log:warning("Feature flag `~s` is not enabled, draining is a no-op", [?FEATURE_FLAG])
+ false ->
+ rabbit_log:error("Feature flag '~s' is not enabled, cannot put this node under maintenance", [?FEATURE_FLAG]),
+ {error, rabbit_misc:format("Feature flag '~s' is not enabled, cannot put this node under maintenance", [?FEATURE_FLAG])}
end.
-spec do_drain() -> ok.
@@ -102,7 +104,9 @@ do_drain() ->
revive() ->
case is_enabled() of
true -> do_revive();
- false -> rabbit_log:warning("Feature flag `~s` is not enabled, reviving is a no-op", [?FEATURE_FLAG])
+ false ->
+ rabbit_log:error("Feature flag '~s' is not enabled, cannot put this node out of maintenance", [?FEATURE_FLAG]),
+ {error, rabbit_misc:format("Feature flag '~s' is not enabled, cannot put this node out of maintenance", [?FEATURE_FLAG])}
end.
-spec do_revive() -> ok.