]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
mon: add support public_bind_addr option
authorBassam Tabbara <bassam.tabbara@quantum.com>
Thu, 13 Jul 2017 21:05:20 +0000 (14:05 -0700)
committerBassam Tabbara <bassam.tabbara@quantum.com>
Fri, 14 Jul 2017 17:41:49 +0000 (10:41 -0700)
commitbf4938567943c80345966f9c5a3bdc75a913175b
treec6b23c5c3561d7e710e5416be3e1f428d28b931d
parentb3404bd8418d3b0fd15bfab4b6c0f900fa5d1aaf
mon: add support public_bind_addr option

To support running in dynamic enviornments (like Kubernetes) the mon needs
to be able to advertise and ip address that is different from the ip address
that it listens on locally.

Added a new config option "public_bind_addr" which if set becomes the address
that the mon will bind to locally. If empty (the default) the public_addr
will be used to bind locally.

added a new function on Messenger to set_addr which is called by ceph-mon to set
the advertised address after doing the bind.

also relaxed the "wrong node!" errors in AsyncMessenger and SimpleMessenger as
its now valid to talk to a peer whose peer_addr_of_me is different from what
we expect.

Signed-off-by: Bassam Tabbara <bassam.tabbara@quantum.com>
src/ceph_mon.cc
src/common/config_opts.h
src/msg/Messenger.h
src/msg/async/AsyncConnection.cc
src/msg/async/AsyncMessenger.cc
src/msg/async/AsyncMessenger.h
src/msg/simple/Pipe.cc
src/msg/simple/SimpleMessenger.cc
src/msg/simple/SimpleMessenger.h
src/msg/xio/XioMessenger.h
src/test/direct_messenger/DirectMessenger.h