From af23895dba85e23586a7bc2aee544fa8575d4514 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Mon, 14 Jan 2019 18:08:03 +0800 Subject: [PATCH] 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 --- src/common/ipaddr.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/common/ipaddr.cc b/src/common/ipaddr.cc index bceb32578af15..debf4ba2b2aa6 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, -- 2.39.5