This allows to mix CTDB major versions in a single cluster.
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Autobuild-User(master): Amitay Isaacs <amitay@samba.org>
Autobuild-Date(master): Wed May 24 21:06:28 CEST 2017 on sn-devel-144
offsetof(struct ctdb_tunable_list, queue_buffer_size) },
{ "IPAllocAlgorithm", 2, false,
offsetof(struct ctdb_tunable_list, ip_alloc_algorithm) },
+ { "AllowMixedVersions", 0, false,
+ offsetof(struct ctdb_tunable_list, allow_mixed_versions) },
{ NULL, 0, true, }
};
</para>
</refsect2>
+ <refsect2>
+ <title>AllowMixedVersions</title>
+ <para>Default: 0</para>
+ <para>
+ CTDB will not allow incompatible versions to co-exist in
+ a cluster. If a version mismatch is found, then losing CTDB
+ will shutdown. To disable the incompatible version check,
+ set this tunable to 1.
+ </para>
+ <para>
+ For version checking, CTDB uses major and minor version.
+ For example, CTDB 4.6.1 and CTDB CTDB 4.6.2 are matching versions;
+ CTDB 4.5.x and CTDB 4.6.y do not match.
+ </para>
+ <para>
+ CTDB with version check support will lose to CTDB without
+ version check support. Between two different CTDB versions with
+ version check support, one running for less time will lose.
+ If the running time for both CTDB versions with version check
+ support is equal (to seconds), then the older version will lose.
+ The losing CTDB daemon will shutdown.
+ </para>
+ </refsect2>
+
<refsect2>
<title>AllowUnhealthyDBRead</title>
<para>Default: 0</para>
uint32_t rec_buffer_size_limit;
uint32_t queue_buffer_size;
uint32_t ip_alloc_algorithm;
+ uint32_t allow_mixed_versions;
};
struct ctdb_tickle_list {
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)
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;
RecBufferSizeLimit = 1000000
QueueBufferSize = 1024
IPAllocAlgorithm = 2
+AllowMixedVersions = 0
EOF
simple_test