ctdb-daemon: Add AllowMixedVersions tunable
[samba.git] / ctdb / server / ctdb_keepalive.c
index 1a8f0f4f76e588ee72daf2cfc6d93e34df3ac71e..a4569ec2502265af2d0ebed32e8a210339a24ad1 100644 (file)
@@ -153,6 +153,11 @@ void ctdb_start_keepalive(struct ctdb_context *ctdb)
        CTDB_NO_MEMORY_FATAL(ctdb, te);
 
        DEBUG(DEBUG_NOTICE,("Keepalive monitoring has been started\n"));
+
+       if (ctdb->tunable.allow_mixed_versions == 1) {
+               DEBUG(DEBUG_WARNING,
+                     ("CTDB cluster with mixed versions configured\n"));
+       }
 }
 
 void ctdb_stop_keepalive(struct ctdb_context *ctdb)
@@ -169,6 +174,11 @@ void ctdb_request_keepalive(struct ctdb_context *ctdb,
        uint32_t my_version = keepalive_version();
        uint32_t my_uptime = keepalive_uptime(ctdb);
 
+       /* Don't check anything if mixed versions are allowed */
+       if (ctdb->tunable.allow_mixed_versions == 1) {
+               return;
+       }
+
        if (hdr->length == sizeof(struct ctdb_req_header)) {
                /* Old keepalive */
                goto fail1;