Signed-off-by: Kefu Chai <kchai@redhat.com>
return start_boot();
}
} else {
- logger().info("osd.{}: now ???", whoami);
+ logger().info("osd.{}: now {}", whoami, state);
// XXX
return seastar::now();
}
#pragma once
+#include <string_view>
+#include <ostream>
+
class OSDMap;
class OSDState {
void set_stopping() {
state = State::STOPPING;
}
- const char* print() {
+ std::string_view to_string() const {
switch (state) {
case State::INITIALIZING: return "initializing";
case State::PREBOOT: return "preboot";
}
}
};
+
+inline std::ostream&
+operator<<(std::ostream& os, const OSDState& s) {
+ return os << s.to_string();
+}