exit(1);
}
+
if ((needs & CEPH_PICK_ADDRESS_PUBLIC)
&& cct->_conf->public_addr.is_blank_ip()
&& !cct->_conf->public_network.empty()) {
}
if ((needs & CEPH_PICK_ADDRESS_CLUSTER)
- && cct->_conf->cluster_addr.is_blank_ip()
- && !cct->_conf->cluster_network.empty()) {
- fill_in_one_address(cct, ifa, cct->_conf->cluster_network, "cluster_addr");
+ && cct->_conf->cluster_addr.is_blank_ip()) {
+ if (!cct->_conf->cluster_network.empty()) {
+ fill_in_one_address(cct, ifa, cct->_conf->cluster_network, "cluster_addr");
+ } else {
+ if (!cct->_conf->public_network.empty()) {
+ lderr(cct) << "Public network was set, but cluster network was not set " << dendl;
+ lderr(cct) << " Using public network also for cluster network" << dendl;
+ fill_in_one_address(cct, ifa, cct->_conf->public_network, "cluster_addr");
+ }
+ }
}
freeifaddrs(ifa);