.set_default(100_M)
.set_description(""),
+ Option("ms_bind_ipv4", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
+ .set_default(true)
+ .set_description("Bind servers to IPV4 address(es)")
+ .add_see_also("ms_bind_ipv6"),
+
Option("ms_bind_ipv6", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
.set_default(false)
- .set_description(""),
+ .set_description("Bind servers to IPV6 address(es)")
+ .add_see_also("ms_bind_ipv4"),
+
+ Option("ms_bind_prefer_ipv4", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
+ .set_default(false)
+ .set_description("Prefer IPV4 over IPV6 address(es)"),
+
+ Option("ms_bind_msgr1", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
+ .set_default(true)
+ .set_description("Bind servers to msgr1 (legacy) protocol address(es)")
+ .add_see_also("ms_bind_msgr2"),
+
+ Option("ms_bind_msgr2", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
+ .set_default(false)
+ .set_description("Bind servers to msgr2 (nautilus+) protocol address(es)")
+ .add_see_also("ms_bind_msgr1"),
Option("ms_bind_port_min", Option::TYPE_INT, Option::LEVEL_ADVANCED)
.set_default(6800)
unsigned msgrv = flags & (CEPH_PICK_ADDRESS_MSGR1 |
CEPH_PICK_ADDRESS_MSGR2);
if (msgrv == 0) {
- return -EINVAL;
+ if (cct->_conf->get_val<bool>("ms_bind_msgr1")) {
+ msgrv |= CEPH_PICK_ADDRESS_MSGR1;
+ }
+ if (cct->_conf->get_val<bool>("ms_bind_msgr2")) {
+ msgrv |= CEPH_PICK_ADDRESS_MSGR2;
+ }
+ if (msgrv == 0) {
+ return -EINVAL;
+ }
}
unsigned ipv = flags & (CEPH_PICK_ADDRESS_IPV4 |
CEPH_PICK_ADDRESS_IPV6);
if (ipv == 0) {
- return -EINVAL;
+ if (cct->_conf->get_val<bool>("ms_bind_ipv4")) {
+ ipv |= CEPH_PICK_ADDRESS_IPV4;
+ }
+ if (cct->_conf->get_val<bool>("ms_bind_ipv6")) {
+ ipv |= CEPH_PICK_ADDRESS_IPV6;
+ }
+ if (ipv == 0) {
+ return -EINVAL;
+ }
+ if (cct->_conf->get_val<bool>("ms_bind_prefer_ipv4")) {
+ flags |= CEPH_PICK_ADDRESS_PREFER_IPV4;
+ } else {
+ flags &= ~CEPH_PICK_ADDRESS_PREFER_IPV4;
+ }
}
entity_addr_t addr;