forked from vitalif/vitastor
Compare commits
1 Commits
master
...
rm-left-on
Author | SHA1 | Date |
---|---|---|
Vitaliy Filippov | 0f964d62db |
|
@ -867,6 +867,7 @@ void etcd_state_client_t::parse_state(const etcd_kv_t & kv)
|
|||
}
|
||||
else
|
||||
{
|
||||
fprintf(stderr, "RECEIVED PG %u/%u HISTORY: %s\n", pool_id, pg_num, value.dump().c_str());
|
||||
auto & pg_cfg = this->pool_config[pool_id].pg_config[pg_num];
|
||||
pg_cfg.target_history.clear();
|
||||
pg_cfg.all_peers.clear();
|
||||
|
|
|
@ -694,6 +694,20 @@ void osd_t::apply_pg_config()
|
|||
}
|
||||
else
|
||||
{
|
||||
printf(
|
||||
"Repeer %u/%u because of history: %s vs %s\n",
|
||||
pool_id, pg_num,
|
||||
json11::Json(json11::Json::object {
|
||||
{ "target_set", pg_cfg.target_set },
|
||||
{ "osd_sets", pg_cfg.target_history },
|
||||
{ "all_peers", vec_all_peers },
|
||||
}).dump().c_str(),
|
||||
json11::Json(json11::Json::object {
|
||||
{ "target_set", pg_it->second.target_set },
|
||||
{ "osd_sets", pg_it->second.target_history },
|
||||
{ "all_peers", pg_it->second.all_peers },
|
||||
}).dump().c_str()
|
||||
);
|
||||
// Stop PG, reapply change after stopping
|
||||
stop_pg(pg_it->second);
|
||||
all_applied = false;
|
||||
|
@ -871,6 +885,7 @@ void osd_t::report_pg_states()
|
|||
{ "all_peers", pg.all_peers },
|
||||
{ "osd_sets", pg.target_history },
|
||||
};
|
||||
printf("PG %u/%u HISTORY -> %s\n", pg.pool_id, pg.pg_num, json11::Json(history_value).dump().c_str());
|
||||
checks.push_back(json11::Json::object {
|
||||
{ "target", "MOD" },
|
||||
{ "key", history_key },
|
||||
|
|
Loading…
Reference in New Issue