Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
mon: add support public_bind_addr option #16189
To support running in dynamic enviornments (like Kubernetes), its desirable for a mon to have two ip addresses. The first it can bind to locally and the other is what goes in the monmap for others to reach the mon.
Added a new config option "public_bind_addr" which if set will be used by the mon to listen locally. The existing "public_addr" is unchanged and can be different from "public_bind_addr".
Also added a new function on Messenger to set_addr which is called by ceph-mon to set
@liewegas would good to get early feedback on the approach here.
@liewegas I reverted back to using the original "bind_addr" due to a number of setbacks (tests make lots of assumptions about mon hosts, and a number of corner cases that came up while testing). The end result looks a lot better and much less churn. Please take a look.
Also added new unit tests that simulate the behavior of "routing" traffic from the public_addr to the public_bind_addr. it did require adding