This patch adds an option to specify the port number for dlm. Although
the cluster attribute is named tcp_port, you can declare the port value
for any transport protocol. All nodes needs to have the same value,
otherwise dlm will get into a deadlock.
---
dlm_controld/action.c | 4 ++++
dlm_controld/dlm_daemon.h | 1 +
dlm_controld/main.c | 5 +++++
3 files changed, 10 insertions(+)
diff --git a/dlm_controld/action.c b/dlm_controld/action.c
index 9e18d286..0eff2799 100644
--- a/dlm_controld/action.c
+++ b/dlm_controld/action.c
@@ -881,6 +881,10 @@ int setup_configfs_options(void)
dlm_options[timewarn_ind].file_set)
set_configfs_cluster("timewarn_cs", NULL, opt(timewarn_ind));
+ if (dlm_options[port_ind].cli_set ||
+ dlm_options[port_ind].file_set)
+ set_configfs_cluster("tcp_port", NULL, optu(port_ind));
+
set_configfs_cluster("mark", NULL, optu(mark_ind));
proto_name = opts(protocol_ind);
diff --git a/dlm_controld/dlm_daemon.h b/dlm_controld/dlm_daemon.h
index 95848201..45b295ea 100644
--- a/dlm_controld/dlm_daemon.h
+++ b/dlm_controld/dlm_daemon.h
@@ -99,6 +99,7 @@ enum {
log_debug_ind,
timewarn_ind,
protocol_ind,
+ port_ind,
debug_logfile_ind,
bind_all_ind,
mark_ind,
diff --git a/dlm_controld/main.c b/dlm_controld/main.c
index 41b03efb..c35756d4 100644
--- a/dlm_controld/main.c
+++ b/dlm_controld/main.c
@@ -1778,6 +1778,11 @@ static void set_opt_defaults(void)
-1, "detect", 0,
"dlm kernel lowcomms protocol: tcp, sctp, detect");
+ set_opt_default(port_ind,
+ "port", 'R', req_arg_uint,
+ -1, NULL, 21064,
+ "dlm kernel lowcomms protocol port");
+
set_opt_default(bind_all_ind,
"bind_all", '\0', req_arg_int,
0, NULL, 0,
--
2.26.2