Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
88c9f9bd6d |
@@ -1051,8 +1051,15 @@ void osd_t::report_pg_states()
|
|||||||
etcd_reporting_pg_state = true;
|
etcd_reporting_pg_state = true;
|
||||||
st_cli.etcd_txn(json11::Json::object {
|
st_cli.etcd_txn(json11::Json::object {
|
||||||
{ "compare", checks }, { "success", success }, { "failure", failure }
|
{ "compare", checks }, { "success", success }, { "failure", failure }
|
||||||
}, st_cli.etcd_quick_timeout, 0, 0, [this, reporting_pgs](std::string err, json11::Json data)
|
}, st_cli.etcd_quick_timeout, 0, 0, [this, reporting_pgs, success_count = success.size(), failure_count = failure.size()](std::string err, json11::Json data)
|
||||||
{
|
{
|
||||||
|
int expected_count = (data["succeeded"].bool_value() ? success_count : failure_count);
|
||||||
|
if (expected_count != data["responses"].array_items().size())
|
||||||
|
{
|
||||||
|
printf("Unexpected response from etcd - 'responses' count (%u) isn't equal to expected (%u), stopping\n",
|
||||||
|
data["responses"].array_items().size(), expected_count);
|
||||||
|
force_stop(1);
|
||||||
|
}
|
||||||
etcd_reporting_pg_state = false;
|
etcd_reporting_pg_state = false;
|
||||||
if (!data["succeeded"].bool_value())
|
if (!data["succeeded"].bool_value())
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user