mirror of
https://github.com/samba-team/samba.git
synced 2025-03-20 22:50:26 +03:00
ctdb will now verify that the generation id for all CTDB_REQ_CALLs that
it receives from remote nodes with its own generation number. if the generation id do not match the daemon will just discard the packet completely. this will require that clients such as samba3 will have to be aware that calls it sends to remote nodes may get lost and will have to resend the requests after a timeout. during cluster recovery/reconfiguration the generation nnumbers will be changing and this can be used to prevent nodes that are still in the "old" instance from talking to nodes that belong to the new generation instance (This used to be ctdb commit 4c197f1cbfdd5f65af9c059aae2b4508ebd0cd34)
This commit is contained in:
parent
8d670cbf74
commit
21331d3c94
@ -238,6 +238,20 @@ void ctdb_recv_pkt(struct ctdb_context *ctdb, uint8_t *data, uint32_t length)
|
||||
|
||||
switch (hdr->operation) {
|
||||
case CTDB_REQ_CALL:
|
||||
/* verify that the remote node that sent us the call
|
||||
is running in the same generation instance as this node
|
||||
*/
|
||||
if (ctdb->vnn_map->generation != hdr->generation) {
|
||||
DEBUG(0,(__location__ " ctdb request %d of type"
|
||||
" %d length %d from node %d to %d had an"
|
||||
" invalid generation id:%d while our"
|
||||
" generation id is:%d\n",
|
||||
hdr->reqid, hdr->operation, hdr->length,
|
||||
hdr->srcnode, hdr->destnode,
|
||||
ctdb->vnn_map->generation,
|
||||
hdr->generation));
|
||||
break;
|
||||
}
|
||||
ctdb->status.count.req_call++;
|
||||
ctdb_request_call(ctdb, hdr);
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user