mirror of
https://github.com/samba-team/samba.git
synced 2024-12-24 21:34:56 +03:00
use our own netmask when deciding if we should takeover a IP, not the other nodes
- check if ctdb dies while waiting for the startup event (This used to be ctdb commit 8b59f73c527a6d0a8abe8030dc3cbbc4329657be)
This commit is contained in:
parent
1e72af9c51
commit
d510ce3281
@ -318,8 +318,9 @@ int ctdb_takeover_run(struct ctdb_context *ctdb, struct ctdb_node_map *nodemap)
|
||||
j != i;
|
||||
j=(j+1)%nodemap->num) {
|
||||
if ((nodemap->nodes[j].flags & NODE_FLAGS_CONNECTED) &&
|
||||
ctdb_same_subnet(ctdb->nodes[j]->public_address, ctdb->nodes[i]->public_address,
|
||||
ctdb->nodes[i]->public_netmask_bits)) {
|
||||
ctdb_same_subnet(ctdb->nodes[j]->public_address,
|
||||
ctdb->nodes[i]->public_address,
|
||||
ctdb->nodes[j]->public_netmask_bits)) {
|
||||
ctdb->nodes[i]->takeover_vnn = nodemap->nodes[j].vnn;
|
||||
break;
|
||||
}
|
||||
|
@ -18,6 +18,10 @@ case $cmd in
|
||||
/usr/bin/nc -z 127.0.0.1 $p || all_ok=0
|
||||
done
|
||||
[ $all_ok -eq 1 ] || sleep 1
|
||||
/usr/bin/ctdb status > /dev/null 2>&1 || {
|
||||
echo "ctdb daemon has died. Exiting event startup"
|
||||
exit 1
|
||||
}
|
||||
done
|
||||
echo "Local tcp services on $CTDB_WAIT_TCP_PORTS are up"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user