summaryrefslogtreecommitdiff
path: root/ctdb/cluster
diff options
context:
space:
mode:
authorMartin Schwenke <martin@meltin.net>2022-01-10 19:18:14 +1100
committerMartin Schwenke <martins@samba.org>2022-01-17 10:21:33 +0000
commitf5a39058f0743f5607df91cb698a2b15618e1360 (patch)
tree4890d63e38d47490bba2abf1bb93ce2682d8d934 /ctdb/cluster
parentd752a92e1153fa355b0cbaa1f482fdc0d88e42f5 (diff)
downloadsamba-f5a39058f0743f5607df91cb698a2b15618e1360.tar.gz
ctdb-config: [cluster] recovery lock -> [cluster] cluster lock
Retain "recovery lock" and mark as deprecated for backward compatibility. Some documentation is still inconsistent. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Diffstat (limited to 'ctdb/cluster')
-rw-r--r--ctdb/cluster/cluster_conf.c25
-rw-r--r--ctdb/cluster/cluster_conf.h1
2 files changed, 25 insertions, 1 deletions
diff --git a/ctdb/cluster/cluster_conf.c b/ctdb/cluster/cluster_conf.c
index be79d5942a8..3b86bad80ef 100644
--- a/ctdb/cluster/cluster_conf.c
+++ b/ctdb/cluster/cluster_conf.c
@@ -113,6 +113,24 @@ good:
mode);
}
+static bool validate_recovery_lock(const char *key,
+ const char *old_reclock,
+ const char *new_reclock,
+ enum conf_update_mode mode)
+{
+ bool status;
+
+ if (new_reclock != NULL) {
+ D_WARNING("Configuration option [%s] -> %s is deprecated\n",
+ CLUSTER_CONF_SECTION,
+ key);
+ }
+
+ status = check_static_string_change(key, old_reclock, new_reclock, mode);
+
+ return status;
+}
+
void cluster_conf_init(struct conf_context *conf)
{
conf_define_section(conf, CLUSTER_CONF_SECTION, NULL);
@@ -129,7 +147,12 @@ void cluster_conf_init(struct conf_context *conf)
validate_node_address);
conf_define_string(conf,
CLUSTER_CONF_SECTION,
- CLUSTER_CONF_RECOVERY_LOCK,
+ CLUSTER_CONF_CLUSTER_LOCK,
NULL,
check_static_string_change);
+ conf_define_string(conf,
+ CLUSTER_CONF_SECTION,
+ CLUSTER_CONF_RECOVERY_LOCK,
+ NULL,
+ validate_recovery_lock);
}
diff --git a/ctdb/cluster/cluster_conf.h b/ctdb/cluster/cluster_conf.h
index 6b797ef1085..cdd42e15b7d 100644
--- a/ctdb/cluster/cluster_conf.h
+++ b/ctdb/cluster/cluster_conf.h
@@ -26,6 +26,7 @@
#define CLUSTER_CONF_TRANSPORT "transport"
#define CLUSTER_CONF_NODE_ADDRESS "node address"
+#define CLUSTER_CONF_CLUSTER_LOCK "cluster lock"
#define CLUSTER_CONF_RECOVERY_LOCK "recovery lock"
void cluster_conf_init(struct conf_context *conf);