]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
crimson: common/admin_socket kludge so that it builds
authorSage Weil <sage@redhat.com>
Thu, 3 Oct 2019 12:43:01 +0000 (07:43 -0500)
committerSage Weil <sage@redhat.com>
Fri, 4 Oct 2019 14:07:03 +0000 (09:07 -0500)
Signed-off-by: Sage Weil <sage@redhat.com>
src/common/admin_socket.cc

index 4dfe7bdec46f1f666dd5648202dbe8b4c27e6883..60812caf5bf20461a281c84e3cf495930b2dcf6f 100644 (file)
 #include "common/Thread.h"
 #include "common/version.h"
 #include "common/ceph_mutex.h"
+
+#ifndef WITH_SEASTAR
 #include "common/Cond.h"
+#endif
 
 #include "messages/MCommand.h"
 #include "messages/MCommandReply.h"
@@ -395,7 +398,11 @@ void AdminSocket::do_tell_queue()
        auto reply = new MCommandReply(r, err);
        reply->set_tid(m->get_tid());
        reply->set_data(outbl);
+#ifdef WITH_SEASTAR
+#warning "fix message send with crimson"
+#else
        m->get_connection()->send_message(reply);
+#endif
       });
   }
 }
@@ -406,6 +413,10 @@ int AdminSocket::execute_command(
   std::ostream& errss,
   bufferlist *outbl)
 {
+#ifdef WITH_SEASTAR
+#warning "must implement admin socket blocking execute_command() for crimson"
+  return -ENOSYS;
+#else
   bool done = false;
   int rval = 0;
   ceph::mutex mylock = ceph::make_mutex("admin_socket::excute_command::mylock");
@@ -424,6 +435,7 @@ int AdminSocket::execute_command(
     mycond.wait(l, [&done] { return done;});
   }
   return rval;
+#endif
 }
 
 void AdminSocket::execute_command(