Available for testing and user downgrade.
Signed-off-by: David Zafman <dzafman@redhat.com>
(cherry picked from commit
3e4d68640cc43efc0cf10ea8119b3aa583b7f36b)
Conflicts:
src/tools/ceph_osdomap_tool.cc (trivial)
state.v = 2;
+ set_state();
+ return 0;
+}
+
+void DBObjectMap::set_state()
+{
Mutex::Locker l(header_lock);
KeyValueDB::Transaction t = db->get_transaction();
write_state(t);
db->submit_transaction_sync(t);
dout(1) << __func__ << " done" << dendl;
- return 0;
+ return;
}
int DBObjectMap::get_state()
/// Read initial state from backing store
int get_state();
+ /// Write current state settings to DB
+ void set_state();
/// Read initial state and upgrade or initialize state
int init(bool upgrade = false);
}
for (auto i : headers)
std::cout << i << std::endl;
+ } else if (cmd == "resetv2") {
+ omap.state.v = 2;
+ omap.set_state();
} else {
std::cerr << "Did not recognize command " << cmd << std::endl;
r = 1;