Skip to content

Commit

Permalink
mds: prevent scrub start for standby-replay MDS
Browse files Browse the repository at this point in the history
Fixes: https://tracker.ceph.com/issues/62537
Signed-off-by: Neeraj Pratap Singh <neesingh@redhat.com>
  • Loading branch information
neeraj pratap singh committed Sep 13, 2023
1 parent 89a571f commit c181dd8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/mds/MDSRank.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2734,7 +2734,12 @@ void MDSRankDispatcher::handle_asok_command(
r = config_client(client_id, !got_value, option, value, *css);
} else if (command == "scrub start" ||
command == "scrub_start") {
if (whoami != 0) {
if (!is_active()) {
*css << "MDS is not active";
r = -CEPHFS_EINVAL;
goto out;
}
else if (whoami != 0) {
*css << "Not rank 0";
r = -CEPHFS_EXDEV;
goto out;
Expand Down

0 comments on commit c181dd8

Please sign in to comment.