[packages/dlm] dlm_controld-remove-fence_all-from-cli fedora patch
jajcus
jajcus at pld-linux.org
Fri Nov 2 09:37:53 CET 2012
commit 1cb5a3b87e63ad06c32ba244e486b9e4f681c133
Author: Jacek Konieczny <j.konieczny at eggsoft.pl>
Date: Fri Nov 2 09:20:56 2012 +0100
dlm_controld-remove-fence_all-from-cli fedora patch
0003-dlm_controld-remove-fence_all-from-cli.patch | 125 ++++++++++++++++++++++
dlm.spec | 2 +
2 files changed, 127 insertions(+)
---
diff --git a/dlm.spec b/dlm.spec
index 903da6c..10df3bd 100644
--- a/dlm.spec
+++ b/dlm.spec
@@ -18,6 +18,7 @@ Patch1: %{name}-after_configfs.patch
Patch2: %{name}_stonith-build.patch
Patch3: %{name}-mem_init.patch
Patch4: %{name}-signals.patch
+Patch5: 0003-dlm_controld-remove-fence_all-from-cli.patch
URL: http://sources.redhat.com/cluster/dlm/
BuildRequires: corosync-devel
%{?with_dlm_stonith:BuildRequires: corosync-devel}
@@ -72,6 +73,7 @@ Pliki nagłówkowe i dokumentacja programisty dla DLM-a.
%patch2 -p1
%patch3 -p1
%patch4 -p1
+%patch5 -p1
%build
%{__make} \
diff --git a/0003-dlm_controld-remove-fence_all-from-cli.patch b/0003-dlm_controld-remove-fence_all-from-cli.patch
new file mode 100644
index 0000000..c265485
--- /dev/null
+++ b/0003-dlm_controld-remove-fence_all-from-cli.patch
@@ -0,0 +1,125 @@
+From 7b0b7b33b052fbd3a5b0cafd8dc134ce2ce713ec Mon Sep 17 00:00:00 2001
+From: David Teigland <teigland at redhat.com>
+Date: Thu, 16 Aug 2012 15:41:12 -0500
+Subject: [PATCH 3/3] dlm_controld: remove fence_all from cli
+
+The fence_all (and unfence_all) options were
+allowed as cli options, and as a fence config.
+This made parsing dlm.conf ambiguous because
+cli options in dlm.conf have x=y syntax, which
+is not the same as the fence config syntax.
+Remove the cli option because the config file
+will be more common/useful.
+
+Signed-off-by: David Teigland <teigland at redhat.com>
+---
+ dlm_controld/daemon_cpg.c | 11 ++---------
+ dlm_controld/dlm.conf.5 | 4 ----
+ dlm_controld/dlm_daemon.h | 2 --
+ dlm_controld/fence.c | 2 +-
+ dlm_controld/main.c | 14 ++------------
+ 5 files changed, 5 insertions(+), 28 deletions(-)
+
+diff --git a/dlm_controld/daemon_cpg.c b/dlm_controld/daemon_cpg.c
+index fee0ef6..61d2da2 100644
+--- a/dlm_controld/daemon_cpg.c
++++ b/dlm_controld/daemon_cpg.c
+@@ -455,20 +455,13 @@ static struct node_daemon *add_node_daemon(int nodeid)
+ fc = &node->fence_config;
+ fc->nodeid = nodeid;
+
+- /* explicit command line arg has first priority */
+-
+- if (dlm_options[fence_all_ind].cli_set) {
+- fc->dev[0] = &fence_all_device;
+- goto out;
+- }
+-
+- /* explicit config file setting has second priority */
++ /* explicit config file setting */
+
+ rv = fence_config_init(fc, (unsigned int)nodeid, (char *)CONF_FILE_PATH);
+ if (!rv)
+ goto out;
+
+- /* no command line, no config file, so use default */
++ /* no config file setting, so use default */
+
+ if (rv == -ENOENT) {
+ fc->dev[0] = &fence_all_device;
+diff --git a/dlm_controld/dlm.conf.5 b/dlm_controld/dlm.conf.5
+index d722de7..95f74b9 100644
+--- a/dlm_controld/dlm.conf.5
++++ b/dlm_controld/dlm.conf.5
+@@ -65,10 +65,6 @@ enable_quorum_fencing
+ .br
+ enable_quorum_lockspace
+ .br
+-fence_all
+-.br
+-unfence_all
+-.br
+
+ .SH Fencing
+
+diff --git a/dlm_controld/dlm_daemon.h b/dlm_controld/dlm_daemon.h
+index 7cb3c01..ffd501c 100644
+--- a/dlm_controld/dlm_daemon.h
++++ b/dlm_controld/dlm_daemon.h
+@@ -107,8 +107,6 @@ enum {
+ enable_startup_fencing_ind,
+ enable_quorum_fencing_ind,
+ enable_quorum_lockspace_ind,
+- fence_all_ind,
+- unfence_all_ind,
+ help_ind,
+ version_ind,
+ dlm_options_max,
+diff --git a/dlm_controld/fence.c b/dlm_controld/fence.c
+index e53f840..0094b3a 100644
+--- a/dlm_controld/fence.c
++++ b/dlm_controld/fence.c
+@@ -194,7 +194,7 @@ int unfence_node(int nodeid)
+ }
+ if (rv < 0) {
+ /* there's a problem with the config */
+- log_error("fence config %d error %d", nodeid, rv);
++ log_error("unfence %d fence_config_init error %d", nodeid, rv);
+ return rv;
+ }
+
+diff --git a/dlm_controld/main.c b/dlm_controld/main.c
+index c002520..6eafa49 100644
+--- a/dlm_controld/main.c
++++ b/dlm_controld/main.c
+@@ -1335,16 +1335,6 @@ static void set_opt_defaults(void)
+ 1, NULL,
+ "enable/disable quorum requirement for lockspace operations");
+
+- set_opt_default(fence_all_ind,
+- "fence_all", '\0', req_arg_str,
+- -1, "dlm_stonith",
+- "fence all nodes with this agent");
+-
+- set_opt_default(unfence_all_ind,
+- "unfence_all", '\0', no_arg,
+- 0, NULL,
+- "enable unfencing self with fence_all agent");
+-
+ set_opt_default(help_ind,
+ "help", 'h', no_arg,
+ -1, NULL,
+@@ -1565,8 +1555,8 @@ int main(int argc, char **argv)
+ set_opt_file(0);
+
+ strcpy(fence_all_device.name, "fence_all");
+- strcpy(fence_all_device.agent, opts(fence_all_ind));
+- fence_all_device.unfence = opt(unfence_all_ind);
++ strcpy(fence_all_device.agent, "dlm_stonith");
++ fence_all_device.unfence = 0;
+
+ INIT_LIST_HEAD(&lockspaces);
+ INIT_LIST_HEAD(&fs_register_list);
+--
+1.7.10.1.362.g242cab3
+
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/dlm.git/commitdiff/97d51e0728de3e9fb5f2a01188d02059dffdff6f
More information about the pld-cvs-commit
mailing list