Skip to content

Commit

Permalink
Merge pull request #12929 from wjwithagen/wip-wjw-empty-cluster_network
Browse files Browse the repository at this point in the history
common/pick_address.cc: Copy public_netw to cluster_netw if cluster empty

Reviewed-by: Sage Weil <sage@redhat.com>
  • Loading branch information
liewegas committed Jan 24, 2017
2 parents f9f9b63 + d0740a3 commit 7eddf91
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 4 deletions.
11 changes: 10 additions & 1 deletion PendingReleaseNotes
@@ -1,7 +1,16 @@
12.0.0
------

* Some varients of the omap_get_keys and omap_get_vals librados
* When assigning a network to the public network and not to
the cluster network the network specification of the public
network will be used for the cluster network as well.
In older versions this would lead to cluster services
being bound to 0.0.0.0:<port>, thus making the
cluster service even more publicly available than the
public services. When only specifying a cluster network it
will still result in the public services binding to 0.0.0.0.

* Some variants of the omap_get_keys and omap_get_vals librados
functions have been deprecated in favor of omap_get_vals2 and
omap_get_keys2. The new methods include an output argument
indicating whether there are additional keys left to fetch.
Expand Down
14 changes: 11 additions & 3 deletions src/common/pick_address.cc
Expand Up @@ -112,16 +112,24 @@ void pick_addresses(CephContext *cct, int needs)
exit(1);
}


if ((needs & CEPH_PICK_ADDRESS_PUBLIC)
&& cct->_conf->public_addr.is_blank_ip()
&& !cct->_conf->public_network.empty()) {
fill_in_one_address(cct, ifa, cct->_conf->public_network, "public_addr");
}

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);
Expand Down

0 comments on commit 7eddf91

Please sign in to comment.