From: Kefu Chai Date: Mon, 14 Jan 2019 10:08:03 +0000 (+0800) Subject: common/ip_addr: do not support numa preference if WITH_SEASTAR X-Git-Tag: v14.1.0~379^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=af23895dba85e23586a7bc2aee544fa8575d4514;p=ceph.git common/ip_addr: do not support numa preference if WITH_SEASTAR in pick_address.cc, set_val_or_die() is called to set the "public_addr" and/or "cluster_addr". but since the sharded ConfigProxy cannot set_val_or_die() synchronously, we cannot do it this way. we need to fix pick_addresses() so it works with seastar later. either by making the involved function return future<>, or making the set_val() call non-blocking or synchronous if we can go with 1:1 mapping threading model. but at this moment, let's just disable this feature in crimson-osd. Signed-off-by: Kefu Chai --- diff --git a/src/common/ipaddr.cc b/src/common/ipaddr.cc index bceb32578af..debf4ba2b2a 100644 --- a/src/common/ipaddr.cc +++ b/src/common/ipaddr.cc @@ -31,12 +31,16 @@ void netmask_ipv4(const struct in_addr *addr, static bool match_numa_node(const string& if_name, int numa_node) { +#ifdef WITH_SEASTAR + return true; +#else int if_node = -1; int r = get_iface_numa_node(if_name, &if_node); if (r < 0) { return false; } return if_node == numa_node; +#endif } const struct ifaddrs *find_ipv4_in_subnet(const struct ifaddrs *addrs,