]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mon/OSDMonitor: send MRemoveSnaps back to octopus MDS
authorSage Weil <sage@redhat.com>
Fri, 31 May 2019 21:33:22 +0000 (16:33 -0500)
committerSage Weil <sage@redhat.com>
Tue, 2 Jul 2019 13:37:49 +0000 (08:37 -0500)
The octopus MDS wants an explicit ack when snaps are removed.

Signed-off-by: Sage Weil <sage@redhat.com>
src/mon/OSDMonitor.cc

index 72298fd70434e7677888028eff2a79db7bfb5534..874108287bebc5dc6eacf80f12a8ecba76949abc 100644 (file)
@@ -3589,6 +3589,12 @@ bool OSDMonitor::preprocess_remove_snaps(MonOpRequestRef op)
     }
   }
 
+  if (HAVE_FEATURE(m->get_connection()->get_features(), SERVER_OCTOPUS)) {
+    auto reply = make_message<MRemoveSnaps>();
+    reply->snaps = m->snaps;
+    mon->send_reply(op, reply.detach());
+  }
+
  ignore:
   return true;
 }
@@ -3633,6 +3639,13 @@ bool OSDMonitor::prepare_remove_snaps(MonOpRequestRef op)
       }
     }
   }
+
+  if (HAVE_FEATURE(m->get_connection()->get_features(), SERVER_OCTOPUS)) {
+    auto reply = make_message<MRemoveSnaps>();
+    reply->snaps = m->snaps;
+    wait_for_finished_proposal(op, new C_ReplyOp(this, op, reply));
+  }
+
   return true;
 }