Compare commits

...

11 Commits

Author SHA1 Message Date
openeuler-ci-bot
1e6ce3e323
!23 [sync] PR-19: libdlm_lt: fix pc file
From: @openeuler-sync-bot 
Reviewed-by: @xiangbudaomz 
Signed-off-by: @xiangbudaomz
2024-05-22 01:10:19 +00:00
zouzhimin
a9d1359cc7 libdlm_lt: fix pc file
(cherry picked from commit d8774863e50d6b28fffa3f07d9cba81077a4cfca)
2024-05-21 17:52:29 +08:00
openeuler-ci-bot
139a5ae5fd
!21 [sync] PR-18: dlm_controld: be sure we stop lockspaces before shutdown and add yaml file
From: @openeuler-sync-bot 
Reviewed-by: @xiangbudaomz 
Signed-off-by: @xiangbudaomz
2024-05-21 09:52:04 +00:00
zouzhimin
7f09de451c dlm_controld: be sure we stop lockspaces before shutdown and add yaml file
(cherry picked from commit 3b946317883200ce844592dd97a6db0d66accf93)
2024-05-21 17:35:40 +08:00
openeuler-ci-bot
c379382a16
!16 [sync] PR-15: dlm_tool: fix missing fclose calls
From: @openeuler-sync-bot 
Reviewed-by: @xiangbudaomz 
Signed-off-by: @xiangbudaomz
2024-05-06 09:23:38 +00:00
zouzhimin
3ab9b86b8d dlm_tool: fix missing fclose calls
(cherry picked from commit 6827b881e9416f7045d9b65355d55454284523ff)
2024-05-06 09:28:32 +08:00
openeuler-ci-bot
431f85fbef
!14 [sync] PR-12: build: dlm_controld disable annobin plugin
From: @openeuler-sync-bot 
Reviewed-by: @jxy_git 
Signed-off-by: @jxy_git
2024-04-09 02:17:17 +00:00
zouzhimin
52818d4b33 build: dlm_controld disable annobin plugin
(cherry picked from commit 8eee45009c9292b11b74a24a6d50c0188e9b9877)
2024-03-08 11:31:59 +08:00
openeuler-ci-bot
cb366d910d
!11 Modify the version of the spec file,delete -fcf-protection=full
From: @xiangbudaomz 
Reviewed-by: @jxy_git 
Signed-off-by: @jxy_git
2024-03-07 01:28:00 +00:00
zouzhimin
5019e7cb75 Merge branch 'master' of gitee.com:src-openeuler/dlm into master
Signed-off-by: zouzhimin <zouzhimin@kylinos.cn>
2024-03-07 01:18:20 +00:00
zouzhimin
259bd39764 !9 dlm_controld: update Linux kernel implementations
From: @xiangbudaomz 
Reviewed-by: @jxy_git 
Signed-off-by: @jxy_git
2024-03-07 01:05:44 +00:00
7 changed files with 2880 additions and 5 deletions

View File

@ -0,0 +1,37 @@
From 346f9e3dd25cbdc2a45b9d97720405daf2696e04 Mon Sep 17 00:00:00 2001
From: Fabio M. Di Nitto <fdinitto@redhat.com>
Date: Apr 18 2023 05:31:00 +0000
Subject: build: dlm_controld disable annobin plugin
annobin plugin is not universally available and has several
prerequisite before it can be enabled.
For reference:
https://github.com/kronosnet/kronosnet/commit/9a8fd89bf52c8381f7c46f427a024eb3d70d0ccf
https://github.com/kronosnet/kronosnet/commit/e95bd0d2d1b996894f76e12716c66a3bbc637cc6
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
---
dlm_controld/Makefile | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/dlm_controld/Makefile b/dlm_controld/Makefile
index 2d37975..76f4b39 100644
--- a/dlm_controld/Makefile
+++ b/dlm_controld/Makefile
@@ -47,7 +47,9 @@ CFLAGS += -D_GNU_SOURCE -O2 -ggdb \
BIN_CFLAGS += $(CFLAGS) -fPIE -DPIE
BIN_CFLAGS += -I../include -I../libdlm
-LIB_CFLAGS += $(CFLAGS) -fPIC -fplugin=annobin
+LIB_CFLAGS += $(CFLAGS) -fPIC
+# Temporary disable annobin plugin
+# LIB_CFLAGS += -fplugin=annobin
BIN_LDFLAGS += $(LDFLAGS) -Wl,-z,relro -Wl,-z,now -pie
BIN_LDFLAGS += -lpthread -lrt -lcpg -lcmap -lcfg -lquorum -luuid
--
2.33.0

View File

@ -1,6 +1,6 @@
Name: dlm
Version: 4.2.0
Release: 4
Release: 9
License: GPLv2 and GPLv2+ and LGPLv2+
Group: System Environment/Kernel
Summary: dlm control daemon and tool
@ -12,10 +12,16 @@ BuildRequires: libxml2-devel
BuildRequires: systemd-units
BuildRequires: systemd-devel
BuildRequires: annobin
Source0: https://releases.pagure.org/dlm/%{name}-%{version}.tar.gz
Patch0001: 0030-dlm_controld-remove-unnecessary-header-include.patch
Source0: https://releases.pagure.org/dlm/%{name}-%{version}.tar.gz
Patch0001: 0030-dlm_controld-remove-unnecessary-header-include.patch
Patch0002: fix-various-deadcode-issues.patch
Patch0003: Revert-treewide-add-fcf-protection-full-to-CFLAGS.patch
Patch0003: update-Linux-kernel-implementations.patch
Patch0004: Revert-treewide-add-fcf-protection-full-to-CFLAGS.patch
Patch0005: build-dlm_controld-disable-annobin-plugin.patch
Patch0006: dlm_tool-fix-missing-fclose-calls.patch
Patch0007: dlm_controld-be-sure-we-stop-lockspaces-before-shutdown.patch
Patch0008: libdlm_lt-fix-pc-file.patch
Requires: %{name}-lib = %{version}-%{release}
Requires: corosync >= 3.1.0
Requires(post): systemd-units
@ -98,9 +104,24 @@ install -Dm 0644 init/dlm.sysconfig %{buildroot}/etc/sysconfig/dlm
%{_libdir}/pkgconfig/*.pc
%changelog
* Wed Mar 06 2024 zouzhimin <zouzhimin@kylinos.cn> - 4.2.0-4
* Mon May 13 2024 zouzhimin <zouzhimin@kylinos.cn> - 4.2.0-9
- libdlm_lt: fix pc file
* Mon May 06 2024 zouzhimin <zouzhimin@kylinos.cn> - 4.2.0-8
- dlm_controld: be sure we stop lockspaces before shutdown and add yaml file
* Mon Apr 29 2024 zouzhimin <zouzhimin@kylinos.cn> - 4.2.0-7
- dlm_tool: fix missing fclose calls
* Fri Mar 08 2024 zouzhimin <zouzhimin@kylinos.cn> - 4.2.0-6
- build: dlm_controld disable annobin plugin
* Wed Mar 06 2024 zouzhimin <zouzhimin@kylinos.cn> - 4.2.0-5
- Revert "treewide: add -fcf-protection=full to CFLAGS"
* Tue Mar 05 2024 zouzhimin <zouzhimin@kylinos.cn> - 4.2.0-4
- dlm_controld: update Linux kernel implementations
* Mon Mar 04 2024 laokz <zhangkai@iscas.ac.cn> - 4.2.0-3
- riscv64: remove -fcf-protection

4
dlm.yaml Normal file
View File

@ -0,0 +1,4 @@
version_control: git
src_repo: https://pagure.io/dlm.git
tag_prefix: ^
seperator: .

View File

@ -0,0 +1,54 @@
From e74cc7ee33481dd31d4149b8d8af1b5e364f6294 Mon Sep 17 00:00:00 2001
From: Alexander Aring <aahringo@redhat.com>
Date: Thu, 23 Feb 2023 10:36:12 -0500
Subject: [PATCH] dlm_controld: be sure we stop lockspaces before shutdown
The dlm_controld shutdown process will drop all dlm configfs entries of
dlm communication settings regarding corosync address configuration.
This will end in an socket close in the dlm subsystem of the connection
which belongs to it. Newly introduced kernel warnings will check if the
lockspace is stopped before we close the socket connection. This is
necessary because no new dlm messages should be triggered afterwards. To
be sure dlm_controld does stop the lockspaces we will make sure that it
does it always in close_cpg_daemon. Currently there is a missing handle
to stop all lockspaces when there is no cpg_handle_daemon anymore.
---
dlm_controld/daemon_cpg.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/dlm_controld/daemon_cpg.c b/dlm_controld/daemon_cpg.c
index 2e0634d4..10c80ddc 100644
--- a/dlm_controld/daemon_cpg.c
+++ b/dlm_controld/daemon_cpg.c
@@ -2527,6 +2527,15 @@ int setup_cpg_daemon(void)
return -1;
}
+static void stop_lockspaces(void)
+{
+ struct lockspace *ls;
+
+ list_for_each_entry(ls, &lockspaces, list) {
+ cpg_stop_kernel(ls);
+ }
+}
+
void close_cpg_daemon(void)
{
struct lockspace *ls;
@@ -2534,8 +2543,11 @@ void close_cpg_daemon(void)
struct cpg_name name;
int i = 0;
- if (!cpg_handle_daemon)
+ if (!cpg_handle_daemon) {
+ stop_lockspaces();
return;
+ }
+
if (cluster_down)
goto fin;
--
2.25.1

View File

@ -0,0 +1,47 @@
From e5ca08c20e6f530bfb95db67cbd62e6958f9af26 Mon Sep 17 00:00:00 2001
From: Alexander Aring <aahringo@redhat.com>
Date: Thu, 30 Mar 2023 15:21:58 -0400
Subject: [PATCH] dlm_tool: fix missing fclose calls
This patch will fix missing fclose() calls when fgets() of do_lockdump()
fails.
---
dlm_tool/main.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/dlm_tool/main.c b/dlm_tool/main.c
index 52fd5b89..2e6810d6 100644
--- a/dlm_tool/main.c
+++ b/dlm_tool/main.c
@@ -1177,8 +1177,9 @@ static void do_lockdump(char *name)
}
/* skip the header on the first line */
- if (!fgets(line, LOCK_LINE_MAX, file))
- return;
+ if (!fgets(line, LOCK_LINE_MAX, file)) {
+ goto out;
+ }
while (fgets(line, LOCK_LINE_MAX, file)) {
rv = sscanf(line, "%x %d %x %u %llu %x %x %hhd %hhd %hhd %u %d %d",
@@ -1199,7 +1200,7 @@ static void do_lockdump(char *name)
if (rv != 13) {
fprintf(stderr, "invalid debugfs line %d: %s\n",
rv, line);
- return;
+ goto out;
}
memset(r_name, 0, sizeof(r_name));
@@ -1229,6 +1230,7 @@ static void do_lockdump(char *name)
ownpid, nodeid, r_name);
}
+ out:
fclose(file);
}
--
2.25.1

View File

@ -0,0 +1,25 @@
From f1b2adb5b76c2ba80ddfb84a9929ef7bbb9768ef Mon Sep 17 00:00:00 2001
From: David Teigland <teigland@redhat.com>
Date: Fri, 17 Feb 2023 10:07:12 -0600
Subject: [PATCH] libdlm_lt: fix pc file
---
libdlm/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libdlm/Makefile b/libdlm/Makefile
index 5069ccf1..918fb46e 100644
--- a/libdlm/Makefile
+++ b/libdlm/Makefile
@@ -108,7 +108,7 @@ $(LIB_PC): $(LIB_PCIN)
cat $(LIB_PCIN) | sed -e 's#@PREFIX@#$(PREFIX)#g;s#@LIBDIR@#$(LIBDIR)#g' > $@
$(LLT_PC): $(LLT_PCIN)
- cat $(LIB_PCIN) | sed -e 's#@PREFIX@#$(PREFIX)#g;s#@LIBDIR@#$(LIBDIR)#g' > $@
+ cat $(LLT_PCIN) | sed -e 's#@PREFIX@#$(PREFIX)#g;s#@LIBDIR@#$(LIBDIR)#g' > $@
clean:
rm -f *.o *.so *.so.* *.a *.pc
--
2.25.1

File diff suppressed because it is too large Load Diff