]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
common/pick_address: prefer non-loopback addresses
authorKefu Chai <kchai@redhat.com>
Wed, 21 Apr 2021 11:50:48 +0000 (19:50 +0800)
committerKefu Chai <kchai@redhat.com>
Sun, 25 Jul 2021 11:12:32 +0000 (19:12 +0800)
commita61d71dcc868a1100aab1572a8a039e077cad3dd
tree8f769d2388bd113750c2a4a1b056a9c0b3e7ef53
parent96c2879880889126b957b752a1c45da896cb1ae9
common/pick_address: prefer non-loopback addresses

instead of filtering out loopback ifaces, check for loopback addresses,
and prefer non-loopback addresses over loopback addresses.

before this change, iface named "lo" is filtered out by default,
and "lo" is allowed if `ms_bind_exclude_lo_iface` is false.

after this change, iface with address out of 127/8 is prefered.
the iface marked down is not considered.

the option of "ms_bind_exclude_lo_iface" is removed. the tests are
updated accordingly.

Fixes: https://tracker.ceph.com/issues/50456
Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit a9b9bcd53215a07608a28ac2c8e4a8c8b8e80e66)

Conflicts:
src/common/options/global.yaml.in: global.yaml.in was introduced
in master only, so, in this change src/common/options.cc is updated
instead.
src/common/options.cc
src/common/pick_address.cc
src/common/pick_address.h
src/test/test_ipaddr.cc