]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/osd: fix CyanStore boot with crimson OSD 69331/head
authorMatan Breizman <mbreizma@redhat.com>
Mon, 8 Jun 2026 12:45:20 +0000 (15:45 +0300)
committerMatan Breizman <mbreizma@redhat.com>
Tue, 7 Jul 2026 10:48:44 +0000 (10:48 +0000)
- Remove dead cyan_store.h includes from pg.cc and shard_services.cc.
- Fix CyanStore::mkfs to write type="cyanstore" instead of "memstore"
- Handle missing device class in OSD::start: stores that return an empty
  device class (e.g CyanStore) now fall back to is_rotational=false with
  a warning instead of throwing

Signed-off-by: Matan Breizman <mbreizma@redhat.com>
src/crimson/os/cyanstore/cyan_store.cc
src/crimson/osd/osd.cc
src/crimson/osd/pg.cc
src/crimson/osd/shard_services.cc

index cf45dbb556f47b24033bb2b3706d0415f68dcfef..7b29afc8c2233c5359f35cc67634d1098411502c 100644 (file)
@@ -179,7 +179,7 @@ CyanStore::mkfs_ertr::future<> CyanStore::mkfs(uuid_d new_osd_fsid)
       }
     }
   }).safe_then([this]{
-    return write_meta("type", "memstore");
+    return write_meta("type", "cyanstore");
   }).safe_then([this] {
     return shard_stores.invoke_on_all([](auto &local_store) {
       return seastar::do_for_each(local_store.mshard_stores, [](auto& mshard_store) {
index 25096a1fb8a8c52cbdf25730bc124181c939e6d1..791338db7ac74544f80a1c690d7fd02aa0546834 100644 (file)
@@ -600,7 +600,8 @@ seastar::future<> OSD::start()
       local_service.local_state.initialize_scheduler(local_service.get_cct(), *is_rotational);
     });
   } else {
-    throw std::runtime_error("No device class is set");
+    WARN("no device class set, defaulting is_rotational to false");
+    is_rotational = false;
   }
   monc->sub_want("osd_pg_creates", last_pg_create_epoch, 0);
   monc->sub_want("mgrmap", 0, 0);
index dfd756f9908011ad6add0fd4423bb48b45757828..fd382088f7f3e2710cb1257cd959fceb57b58990 100644 (file)
@@ -35,7 +35,6 @@
 #include "crimson/common/log.h"
 #include "crimson/net/Connection.h"
 #include "crimson/net/Messenger.h"
-#include "crimson/os/cyanstore/cyan_store.h"
 #include "crimson/os/futurized_collection.h"
 #include "crimson/osd/ec_backend.h"
 #include "crimson/osd/ec_recovery_backend.h"
index bf108a1c73b12aeabe7c62b9080b2c2bcabf6d35..7b1df03eba2c82989ee93dc49319d16cc2964e40 100644 (file)
@@ -20,7 +20,6 @@
 #include "crimson/mon/MonClient.h"
 #include "crimson/net/Messenger.h"
 #include "crimson/net/Connection.h"
-#include "crimson/os/cyanstore/cyan_store.h"
 #include "crimson/osd/osdmap_service.h"
 #include "crimson/osd/osd_operations/pg_advance_map.h"
 #include "crimson/osd/pg.h"