]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
pick_address: Warn and continue when you find at least 1 IPv4 or IPv6 address
authorMatthew Oliver <moliver@suse.com>
Mon, 10 Aug 2020 04:46:21 +0000 (04:46 +0000)
committerKefu Chai <kchai@redhat.com>
Thu, 13 May 2021 01:25:32 +0000 (09:25 +0800)
commita266937cbce1f590a175ea20254c28d4f23b7af1
tree56724cdb0abcaa09b85c2c6fac1e6e65b8c12b45
parent98b8bc5c5ac34c69e60d7c5b689116edb20f3ac0
pick_address: Warn and continue when you find at least 1 IPv4 or IPv6 address

Currently if specify a single public or cluster network, yet have both
`ms bind ipv4` and `ms bind ipv6` set daemons crash when they can't find
both IPs from the same network:

    unable to find any IPv4 address in networks '2001:db8:11d::/120' interfaces ''

And rightly so, of course it can't find an IPv4 network in an IPv6
network.
This patch, adds a new helper method, networks_address_family_coverage,
that takes the list of networks and returns a bitmap of address families
supported.
We then check to see if we have enough networks defined and if you don't
it'll warn and then continue.

Also update the network-config-ref to mention having to define both
address family addresses for cluster and or public networks.

As well as a warning about `ms bind ipv4` being enabled by default which
is easy to miss, there by enabling dual stack when you may only be
expect single stack IPv6.

Thee is also a drive by to fix a `note` that wan't being displayed due
to missing RST syntax.

Signed-off-by: Matthew Oliver <moliver@suse.com>
Fixes: https://tracker.ceph.com/issues/46845
Fixes: https://tracker.ceph.com/issues/39711
(cherry picked from commit 9f75dfbf364f5140b3f291e0a2c6769bc3d8cbac)
doc/rados/configuration/msgr2.rst
doc/rados/configuration/network-config-ref.rst
src/common/pick_address.cc
src/common/pick_address.h
src/test/test_ipaddr.cc