]> 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 36536/head
authorMatthew Oliver <moliver@suse.com>
Mon, 10 Aug 2020 04:46:21 +0000 (04:46 +0000)
committerMatthew Oliver <moliver@suse.com>
Wed, 14 Oct 2020 05:46:16 +0000 (05:46 +0000)
commit9f75dfbf364f5140b3f291e0a2c6769bc3d8cbac
tree6b66c3ad142aec079ef5dbccf51c71a06e93ebde
parent6447e20f784fd231d490a9cb948871189e24316c
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
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