* [Cluster-devel] DLM patches from PLD Linux
@ 2012-11-02 15:39 Jacek Konieczny
2012-11-02 15:39 ` [Cluster-devel] [PATCH 1/3] Fix linking order Jacek Konieczny
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Jacek Konieczny @ 2012-11-02 15:39 UTC (permalink / raw)
To: cluster-devel.redhat.com
Hello,
These are three of the patches I have applied to dlm when packaging
it for PLD Linux. I think they could be applied upstream.
Greets,
Jacek
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Cluster-devel] [PATCH 1/3] Fix linking order
2012-11-02 15:39 [Cluster-devel] DLM patches from PLD Linux Jacek Konieczny
@ 2012-11-02 15:39 ` Jacek Konieczny
2012-11-02 15:39 ` [Cluster-devel] [PATCH 2/3] Run dlm.service after sys-kernel-config.mount Jacek Konieczny
2012-11-02 15:39 ` [Cluster-devel] [PATCH 3/3] Do not crash uncleanly on SIGINT and SIGHUP Jacek Konieczny
2 siblings, 0 replies; 4+ messages in thread
From: Jacek Konieczny @ 2012-11-02 15:39 UTC (permalink / raw)
To: cluster-devel.redhat.com
Objects should generally be listed before the libraries they require.
DLM building fails for me without these changes.
Signed-off-by: Jacek Konieczny <jajcus@jajcus.net>
---
dlm_controld/Makefile | 4 ++--
dlm_tool/Makefile | 2 +-
fence/Makefile | 2 +-
libdlm/Makefile | 8 ++++----
4 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/dlm_controld/Makefile b/dlm_controld/Makefile
index d279b0d..f42a913 100644
--- a/dlm_controld/Makefile
+++ b/dlm_controld/Makefile
@@ -62,10 +62,10 @@ LIB_LDFLAGS += -Wl,-z,relro -pie
all: $(LIB_TARGET) $(BIN_TARGET)
$(BIN_TARGET): $(BIN_SOURCE)
- $(CC) $(BIN_CFLAGS) $(BIN_LDFLAGS) $(BIN_SOURCE) -o $@ -L.
+ $(CC) $(BIN_SOURCE) $(BIN_CFLAGS) $(BIN_LDFLAGS) -o $@ -L.
$(LIB_TARGET): $(LIB_SOURCE)
- $(CC) $(LIB_CFLAGS) $(LIB_LDFLAGS) -shared -fPIC -o $@ -Wl,-soname=$(LIB_SMAJOR) $^
+ $(CC) $^ $(LIB_CFLAGS) $(LIB_LDFLAGS) -shared -fPIC -o $@ -Wl,-soname=$(LIB_SMAJOR)
ln -sf $(LIB_TARGET) $(LIB_SO)
ln -sf $(LIB_TARGET) $(LIB_SMAJOR)
diff --git a/dlm_tool/Makefile b/dlm_tool/Makefile
index fe43677..c16d8f5 100644
--- a/dlm_tool/Makefile
+++ b/dlm_tool/Makefile
@@ -39,7 +39,7 @@ BIN_LDFLAGS += -lpthread -ldlm -ldlmcontrol
all: $(BIN_TARGET)
$(BIN_TARGET): $(BIN_SOURCE)
- $(CC) $(BIN_CFLAGS) $(BIN_LDFLAGS) $(BIN_SOURCE) -o $@
+ $(CC) $(BIN_SOURCE) $(BIN_CFLAGS) $(BIN_LDFLAGS) -o $@
clean:
rm -f *.o *.so *.so.* $(BIN_TARGET)
diff --git a/fence/Makefile b/fence/Makefile
index 0f1a29c..b4c59dd 100644
--- a/fence/Makefile
+++ b/fence/Makefile
@@ -40,7 +40,7 @@ BIN_LDFLAGS += -ldl
all: $(BIN_TARGET)
$(BIN_TARGET): $(BIN_SOURCE)
- $(CC) $(BIN_CFLAGS) $(BIN_LDFLAGS) $(BIN_SOURCE) -o $@ -L.
+ $(CC) $(BIN_SOURCE) $(BIN_CFLAGS) $(BIN_LDFLAGS) -o $@ -L.
clean:
rm -f *.o *.so *.so.* $(BIN_TARGET)
diff --git a/libdlm/Makefile b/libdlm/Makefile
index 565a600..76d3504 100644
--- a/libdlm/Makefile
+++ b/libdlm/Makefile
@@ -86,18 +86,18 @@ LLT_LDFLAGS += $(LDFLAGS)
all: $(LIB_TARGET) $(LLT_TARGET) $(LIB_PC) $(LLT_PC)
$(LIB_O): $(SOURCE)
- $(CC) $(LIB_CFLAGS) -c -o $@ $<
+ $(CC) $< $(LIB_CFLAGS) -c -o $@
$(LLT_O): $(SOURCE)
- $(CC) $(LLT_CFLAGS) -c -o $@ $<
+ $(CC) $< $(LLT_CFLAGS) -c -o $@
$(LIB_TARGET): $(LIB_O)
- $(CC) $(LIB_LDFLAGS) -shared -o $@ -Wl,-soname=$(LIB_SMAJOR) $^
+ $(CC) $^ $(LIB_LDFLAGS) -shared -o $@ -Wl,-soname=$(LIB_SMAJOR)
ln -sf $(LIB_TARGET) $(LIB_SO)
ln -sf $(LIB_TARGET) $(LIB_SMAJOR)
$(LLT_TARGET): $(LLT_O)
- $(CC) $(LLT_LDFLAGS) -shared -o $@ -Wl,-soname=$(LLT_SMAJOR) $^
+ $(CC) $^ $(LLT_LDFLAGS) -shared -o $@ -Wl,-soname=$(LLT_SMAJOR)
ln -sf $(LLT_TARGET) $(LLT_SO)
ln -sf $(LLT_TARGET) $(LLT_SMAJOR)
--
1.7.12.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Cluster-devel] [PATCH 2/3] Run dlm.service after sys-kernel-config.mount
2012-11-02 15:39 [Cluster-devel] DLM patches from PLD Linux Jacek Konieczny
2012-11-02 15:39 ` [Cluster-devel] [PATCH 1/3] Fix linking order Jacek Konieczny
@ 2012-11-02 15:39 ` Jacek Konieczny
2012-11-02 15:39 ` [Cluster-devel] [PATCH 3/3] Do not crash uncleanly on SIGINT and SIGHUP Jacek Konieczny
2 siblings, 0 replies; 4+ messages in thread
From: Jacek Konieczny @ 2012-11-02 15:39 UTC (permalink / raw)
To: cluster-devel.redhat.com
dlm_controld requires configfs mounted. systemd can take care for that,
but it does it better if the order is set in the unit file.
Signed-off-by: Jacek Konieczny <jajcus@jajcus.net>
---
init/dlm.service | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/init/dlm.service b/init/dlm.service
index d7cf9c7..3c4e53e 100644
--- a/init/dlm.service
+++ b/init/dlm.service
@@ -1,6 +1,6 @@
[Unit]
Description=dlm control daemon
-After=syslog.target network.target corosync.service
+After=syslog.target network.target corosync.service sys-kernel-config.mount
[Service]
Type=forking
--
1.7.12.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Cluster-devel] [PATCH 3/3] Do not crash uncleanly on SIGINT and SIGHUP
2012-11-02 15:39 [Cluster-devel] DLM patches from PLD Linux Jacek Konieczny
2012-11-02 15:39 ` [Cluster-devel] [PATCH 1/3] Fix linking order Jacek Konieczny
2012-11-02 15:39 ` [Cluster-devel] [PATCH 2/3] Run dlm.service after sys-kernel-config.mount Jacek Konieczny
@ 2012-11-02 15:39 ` Jacek Konieczny
2 siblings, 0 replies; 4+ messages in thread
From: Jacek Konieczny @ 2012-11-02 15:39 UTC (permalink / raw)
To: cluster-devel.redhat.com
Unclean shut-down of dlm_controld may trigger a node fencing,
this should not be triggered by mistake.
SIGINT is the natural way to stop dlm_controld started on a terminal
with '-D' for debugging ? let this work like SIGTERM.
SIGHUP is often used for config reload. dlm_controld doesn't support
that, but when someone tries this by mistake, this is not a reason to
crash.
Signed-off-by: Jacek Konieczny <jajcus@jajcus.net>
---
dlm_controld/main.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/dlm_controld/main.c b/dlm_controld/main.c
index 6eafa49..fd469f9 100644
--- a/dlm_controld/main.c
+++ b/dlm_controld/main.c
@@ -1582,6 +1582,15 @@ int main(int argc, char **argv)
rv = sigaction(SIGTERM, &act, NULL);
if (rv < 0)
return -rv;
+ rv = sigaction(SIGINT, &act, NULL);
+ if (rv < 0)
+ return -rv;
+
+ memset(&act, 0, sizeof(act));
+ act.sa_handler = SIG_IGN;
+ rv = sigaction(SIGHUP, &act, NULL);
+ if (rv < 0)
+ return -rv;
memset(&act, 0, sizeof(act));
act.sa_handler = sigchld_handler;
--
1.7.12.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-11-02 15:39 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-02 15:39 [Cluster-devel] DLM patches from PLD Linux Jacek Konieczny
2012-11-02 15:39 ` [Cluster-devel] [PATCH 1/3] Fix linking order Jacek Konieczny
2012-11-02 15:39 ` [Cluster-devel] [PATCH 2/3] Run dlm.service after sys-kernel-config.mount Jacek Konieczny
2012-11-02 15:39 ` [Cluster-devel] [PATCH 3/3] Do not crash uncleanly on SIGINT and SIGHUP Jacek Konieczny
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).