]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
crush, crimson: don't support crush_location_hook as crimson lacks SubProcess. 43166/head
authorRadoslaw Zarzynski <rzarzyns@redhat.com>
Tue, 14 Sep 2021 16:39:28 +0000 (16:39 +0000)
committerRadoslaw Zarzynski <rzarzyns@redhat.com>
Tue, 14 Sep 2021 17:21:21 +0000 (17:21 +0000)
See: https://gist.github.com/rzarzynski/7827e23f162e5f0ad9b2955e938918c7.

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
src/crush/CrushLocation.cc

index fa475fa53e7c4e9ce8114b328772c86707f98457..12a62064f1d2d74918e4bdc31a374b2a009f59ef 100644 (file)
@@ -5,7 +5,9 @@
 
 #include "CrushLocation.h"
 #include "CrushWrapper.h"
+#if defined(WITH_SEASTAR) && !defined(WITH_ALIEN)
 #include "common/SubProcess.h"
+#endif
 #include "common/ceph_context.h"
 #include "common/config.h"
 #include "common/debug.h"
@@ -46,6 +48,9 @@ int CrushLocation::update_from_hook()
   if (cct->_conf->crush_location_hook.length() == 0)
     return 0;
  
+#if defined(WITH_SEASTAR) && !defined(WITH_ALIEN)
+  ceph_abort_msg("crimson does not support crush_location_hook, it must stay empty");
+#else
   if (0 != access(cct->_conf->crush_location_hook.c_str(), R_OK)) {
     lderr(cct) << "the user define crush location hook: " << cct->_conf->crush_location_hook
                << " may not exist or can not access it" << dendl;
@@ -93,6 +98,7 @@ int CrushLocation::update_from_hook()
   bl.begin().copy(bl.length(), out);
   out.erase(out.find_last_not_of(" \n\r\t")+1);
   return _parse(out);
+#endif // WITH_SEASTAR && !WITH_ALIEN
 }
 
 int CrushLocation::init_on_startup()