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"
+ DEBUG(0,(__location__ " ctdb request %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->reqid, hdr->length,
hdr->srcnode, hdr->destnode,
ctdb->vnn_map->generation,
hdr->generation));
until the cluster has recovered.
*/
if (ctdb->recovery_mode != CTDB_RECOVERY_NORMAL) {
- DEBUG(0,(__location__ " ctdb request %d of type"
- " %d length %d from node %d to %d"
+ DEBUG(0,(__location__ " ctdb request %d"
+ " length %d from node %d to %d"
" while we are in recovery mode\n",
- hdr->reqid, hdr->operation, hdr->length,
+ hdr->reqid, hdr->length,
hdr->srcnode, hdr->destnode));
break;
}
break;
case CTDB_REQ_DMASTER:
+ /* verify that the remote node that sent us dmaster req
+ is running in the same generation instance as this node
+ */
+ if (ctdb->vnn_map->generation != hdr->generation) {
+ DEBUG(0,(__location__ " ctdb dmaster request %d"
+ " length %d from node %d to %d had an"
+ " invalid generation id:%d while our"
+ " generation id is:%d\n",
+ hdr->reqid, hdr->length,
+ hdr->srcnode, hdr->destnode,
+ ctdb->vnn_map->generation,
+ hdr->generation));
+ break;
+ }
+ /* if we are in recovery mode we discard all traffic
+ until the cluster has recovered.
+ */
+ if (ctdb->recovery_mode != CTDB_RECOVERY_NORMAL) {
+ DEBUG(0,(__location__ " ctdb dmaster request %d"
+ " length %d from node %d to %d"
+ " while we are in recovery mode\n",
+ hdr->reqid, hdr->length,
+ hdr->srcnode, hdr->destnode));
+ break;
+ }
+
ctdb->status.count.req_dmaster++;
ctdb_request_dmaster(ctdb, hdr);
break;
case CTDB_REPLY_DMASTER:
+ /* verify that the remote node that sent us dmaster reply
+ is running in the same generation instance as this node
+ */
+ if (ctdb->vnn_map->generation != hdr->generation) {
+ DEBUG(0,(__location__ " ctdb dmaster reply %d"
+ " length %d from node %d to %d had an"
+ " invalid generation id:%d while our"
+ " generation id is:%d\n",
+ hdr->reqid, hdr->length,
+ hdr->srcnode, hdr->destnode,
+ ctdb->vnn_map->generation,
+ hdr->generation));
+ break;
+ }
+ /* if we are in recovery mode we discard all traffic
+ until the cluster has recovered.
+ */
+ if (ctdb->recovery_mode != CTDB_RECOVERY_NORMAL) {
+ DEBUG(0,(__location__ " ctdb dmaster reply %d "
+ " length %d from node %d to %d"
+ " while we are in recovery mode\n",
+ hdr->reqid, hdr->length,
+ hdr->srcnode, hdr->destnode));
+ break;
+ }
+
ctdb->status.count.reply_dmaster++;
ctdb_reply_dmaster(ctdb, hdr);
break;