Add allow_net_split parameter

This commit is contained in:
Vitaliy Filippov
2025-03-23 02:12:32 +03:00
parent 8b0389b4e8
commit 7a835fcd8f
10 changed files with 89 additions and 9 deletions
+1
View File
@@ -186,6 +186,7 @@ void osd_t::parse_config(bool init)
no_recovery = json_is_true(config["no_recovery"]);
auto old_no_scrub = no_scrub;
no_scrub = json_is_true(config["no_scrub"]);
allow_net_split = json_is_true(config["allow_net_split"]);
auto old_autosync_interval = autosync_interval;
if (!config["autosync_interval"].is_null())
{
+1
View File
@@ -106,6 +106,7 @@ class osd_t
bool no_rebalance = false;
bool no_recovery = false;
bool no_scrub = false;
bool allow_net_split = false;
std::string bind_address;
int bind_port, listen_backlog = 128;
// FIXME: Implement client queue depth limit
+1 -1
View File
@@ -211,7 +211,7 @@ void osd_t::start_pg_peering(pg_t & pg)
all_connected = false;
}
}
if (!all_connected)
if (!all_connected && !allow_net_split)
{
// Wait until all OSDs are either connected or their /osd/state disappears from etcd
pg.state = PG_INCOMPLETE;