Compare commits
3 Commits
32cc481cdd
...
4f3a45da29
Author | SHA1 | Date |
---|---|---|
|
4f3a45da29 | |
|
a4b6a83998 | |
|
24f6c5d251 |
|
@ -169,7 +169,15 @@ void osd_t::parse_config(bool init)
|
|||
else
|
||||
immediate_commit = IMMEDIATE_NONE;
|
||||
// Bind address
|
||||
bind_address = config["bind_address"].string_value();
|
||||
cfg_bind_addresses.clear();
|
||||
if (config.find("bind_address") != config.end())
|
||||
{
|
||||
if (config["bind_address"].is_string())
|
||||
cfg_bind_addresses.push_back(config["bind_address"].string_value());
|
||||
else if (config["bind_address"].is_array())
|
||||
for (auto & addr: config["bind_address"].array_items())
|
||||
cfg_bind_addresses.push_back(addr.string_value());
|
||||
}
|
||||
bind_port = config["bind_port"].uint64_value();
|
||||
if (bind_port <= 0 || bind_port > 65535)
|
||||
bind_port = 0;
|
||||
|
@ -332,9 +340,9 @@ void osd_t::parse_config(bool init)
|
|||
|
||||
void osd_t::bind_socket()
|
||||
{
|
||||
if (bind_address != "")
|
||||
if (cfg_bind_addresses.size())
|
||||
{
|
||||
bind_addresses.push_back(bind_address);
|
||||
bind_addresses = cfg_bind_addresses;
|
||||
}
|
||||
else if (msgr.all_osd_network_masks.size())
|
||||
{
|
||||
|
|
|
@ -107,7 +107,7 @@ class osd_t
|
|||
bool no_recovery = false;
|
||||
bool no_scrub = false;
|
||||
bool allow_net_split = false;
|
||||
std::string bind_address;
|
||||
std::vector<std::string> cfg_bind_addresses;
|
||||
int bind_port, listen_backlog = 128;
|
||||
bool use_rdmacm = false;
|
||||
bool disable_tcp = false;
|
||||
|
|
Loading…
Reference in New Issue