1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

ctdb-takeover: Don't release IPs from nodes where they are not known

This avoids confusing log messages like:

  ctdbd[21635]: releaseip called for an ip '10.1.1.1' that is not a public address

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>

Autobuild-User(master): Martin Schwenke <martins@samba.org>
Autobuild-Date(master): Fri Feb 24 11:50:36 CET 2017 on sn-devel-144
This commit is contained in:
Martin Schwenke 2017-02-07 15:30:08 +11:00 committed by Martin Schwenke
parent 75d0822985
commit 52c4d33d01
2 changed files with 10 additions and 4 deletions

View File

@ -301,6 +301,12 @@ static struct tevent_req *release_ip_send(TALLOC_CTX *mem_ctx,
for (i = 0; i < count; i++) {
uint32_t pnn = pnns[i];
/* Skip this node if IP is not known */
if (! bitmap_query(tmp_ip->known_on, pnn)) {
continue;
}
/* If pnn is not the node that should be
* hosting the IP then add it to the list of
* nodes that need to do a release. */

View File

@ -33,10 +33,10 @@ Fetched public IPs from node 2
10.0.0.33 -> 2 [+0]
10.0.0.31 -> 0 [+14884]
10.0.0.32 -> 2 [+16129]
RELEASE_IP 10.0.0.34 succeeded on 2 nodes
RELEASE_IP 10.0.0.33 succeeded on 2 nodes
RELEASE_IP 10.0.0.32 succeeded on 2 nodes
RELEASE_IP 10.0.0.31 succeeded on 2 nodes
RELEASE_IP 10.0.0.34 succeeded on 1 nodes
RELEASE_IP 10.0.0.33 succeeded on 1 nodes
RELEASE_IP 10.0.0.32 succeeded on 1 nodes
RELEASE_IP 10.0.0.31 succeeded on 1 nodes
TAKEOVER_IP 10.0.0.34 succeeded on node 0
TAKEOVER_IP 10.0.0.33 succeeded on node 2
TAKEOVER_IP 10.0.0.32 succeeded on node 2