mirror of
https://github.com/ceph/ceph
synced 2025-03-30 15:31:01 +00:00
common/pick_address: improves log message when no IP is found
Signed-off-by: Ricardo Dias <rdias@suse.com>
This commit is contained in:
parent
89a6c39e94
commit
61f93afe9a
@ -237,8 +237,16 @@ static int fill_in_one_address(
|
|||||||
const struct sockaddr *found = find_ip_in_subnet_list(cct, ifa, ipv, networks,
|
const struct sockaddr *found = find_ip_in_subnet_list(cct, ifa, ipv, networks,
|
||||||
interfaces, numa_node);
|
interfaces, numa_node);
|
||||||
if (!found) {
|
if (!found) {
|
||||||
lderr(cct) << "unable to find any IP address in networks '" << networks
|
std::string ip_type = "";
|
||||||
<< "' interfaces '" << interfaces << "'" << dendl;
|
if ((ipv & CEPH_PICK_ADDRESS_IPV4) && (ipv & CEPH_PICK_ADDRESS_IPV6)) {
|
||||||
|
ip_type = "IPv4 or IPv6";
|
||||||
|
} else if (ipv & CEPH_PICK_ADDRESS_IPV4) {
|
||||||
|
ip_type = "IPv4";
|
||||||
|
} else {
|
||||||
|
ip_type = "IPv6";
|
||||||
|
}
|
||||||
|
lderr(cct) << "unable to find any " << ip_type << " address in networks '"
|
||||||
|
<< networks << "' interfaces '" << interfaces << "'" << dendl;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user