From c9f09b5361524f64f0b4f03a97d18c85c732e981 Mon Sep 17 00:00:00 2001 From: Gang He Date: Mon, 13 Mar 2017 02:44:24 +0000 Subject: [PATCH] Accepting request 478914 from home:ganghe:branches:network:ha-clustering:Factory Upgrade ocfs2-tools to v1.8.5 OBS-URL: https://build.opensuse.org/request/show/478914 OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/ocfs2-tools?expand=0&rev=94 --- ...dlm-Close-file-description-after-use.patch | 34 -- ...ocfs2-Fix-a-bug-in-process_open_args.patch | 73 ----- 0003-o2cb-add-build-scripts-for-rhel7.patch | 163 --------- 0004-add-systemd-support.patch | 309 ------------------ ...-if-cluster-information-is-not-detec.patch | 86 +++++ ...rite-sysconfig-if-status-not-changed.patch | 49 --- ...-o2cb-mount-debugfs-when-load-config.patch | 79 ----- ...essage-if-DLM-service-is-unavailable.patch | 28 ++ ...2cb-fix-systemd-o2cb.service-failure.patch | 32 -- _service | 2 +- ...tack-as-default-if-no-stack-is-setup.patch | 6 +- bnc804707-reduce-RR-priority.patch | 13 + bug-805764-ocfs2-controld.patch | 84 +++++ debug-ocfs2_hb_ctl.patch | 2 +- extra-debug.patch | 187 +++++++++++ force-debug.patch | 28 ++ ocfs2-tools-1.8.4.tar.gz | 3 - ocfs2-tools-1.8.5.tar.gz | 3 + ocfs2-tools.changes | 20 ++ ocfs2-tools.spec | 30 +- 20 files changed, 468 insertions(+), 763 deletions(-) delete mode 100644 0001-libo2dlm-Close-file-description-after-use.patch delete mode 100644 0002-debugfs.ocfs2-Fix-a-bug-in-process_open_args.patch delete mode 100644 0003-o2cb-add-build-scripts-for-rhel7.patch delete mode 100644 0004-add-systemd-support.patch create mode 100644 0004-mkfs.ocfs2-Abort-if-cluster-information-is-not-detec.patch delete mode 100644 0005-do-not-write-sysconfig-if-status-not-changed.patch delete mode 100644 0006-o2cb-mount-debugfs-when-load-config.patch create mode 100644 0007-Improve-error-message-if-DLM-service-is-unavailable.patch delete mode 100644 0009-o2cb-fix-systemd-o2cb.service-failure.patch create mode 100644 bnc804707-reduce-RR-priority.patch create mode 100644 bug-805764-ocfs2-controld.patch create mode 100644 extra-debug.patch create mode 100644 force-debug.patch delete mode 100644 ocfs2-tools-1.8.4.tar.gz create mode 100644 ocfs2-tools-1.8.5.tar.gz diff --git a/0001-libo2dlm-Close-file-description-after-use.patch b/0001-libo2dlm-Close-file-description-after-use.patch deleted file mode 100644 index 7df2295..0000000 --- a/0001-libo2dlm-Close-file-description-after-use.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 63a8fc605fc8dc1c4e327eb17ba6a5a614928608 Mon Sep 17 00:00:00 2001 -From: piaojun -Date: Thu, 2 Apr 2015 20:46:47 +0800 -Subject: [PATCH 1/2] libo2dlm: Close file description after use - -In o2dlm_generate_random_value(), randfd should be closed after use. - -Signed-off-by: Jun Piao -Reviewed-by: Alex Chen -Signed-off-by: Goldwyn Rodrigues ---- - libo2dlm/o2dlm.c | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -diff --git a/libo2dlm/o2dlm.c b/libo2dlm/o2dlm.c -index dbc642b..375f659 100644 ---- a/libo2dlm/o2dlm.c -+++ b/libo2dlm/o2dlm.c -@@ -102,9 +102,10 @@ static errcode_t o2dlm_generate_random_value(int64_t *value) - if ((randfd = open("/dev/urandom", O_RDONLY)) == -1) - return O2DLM_ET_RANDOM; - -- if (read(randfd, value, readlen) != readlen) -+ if (read(randfd, value, readlen) != readlen) { -+ close(randfd); - return O2DLM_ET_RANDOM; -- -+ } - close(randfd); - - return 0; --- -2.1.2 - diff --git a/0002-debugfs.ocfs2-Fix-a-bug-in-process_open_args.patch b/0002-debugfs.ocfs2-Fix-a-bug-in-process_open_args.patch deleted file mode 100644 index 1ea8780..0000000 --- a/0002-debugfs.ocfs2-Fix-a-bug-in-process_open_args.patch +++ /dev/null @@ -1,73 +0,0 @@ -From 41057a7eef9da9d77cde46d336a7f8a19564d7f8 Mon Sep 17 00:00:00 2001 -From: piaojun -Date: Wed, 6 May 2015 10:25:10 +0800 -Subject: [PATCH 2/2] debugfs.ocfs2: Fix a bug in process_open_args() - -In process_open_args(), 'dev' get the wrong value because getopt() will -change the value of args[1]. This problem will cause failure in -debugfs.ocfs2. ocfs2. So we should assign 'dev' before getopt(). - -This fix fixes the bug introduced in 9693851641bfcd0f2bab226e9f03d9ab05cb7edf - -Signed-off-by: Jun Piao -Reviewed-by: Alex Chen -Signed-off-by: Goldwyn Rodrigues -Reported-by: Gang He ---- - debugfs.ocfs2/commands.c | 20 +++++++++++++------- - 1 file changed, 13 insertions(+), 7 deletions(-) - -diff --git a/debugfs.ocfs2/commands.c b/debugfs.ocfs2/commands.c -index 1b0b2d9..6da396a 100644 ---- a/debugfs.ocfs2/commands.c -+++ b/debugfs.ocfs2/commands.c -@@ -534,6 +534,7 @@ static int process_open_args(char **args, - int num, argc, c; - - for (argc = 0; (args[argc]); ++argc); -+ dev = strdup(args[1]); - optind = 0; - while ((c = getopt(argc, args, "is:")) != EOF) { - switch (c) { -@@ -544,26 +545,31 @@ static int process_open_args(char **args, - s = strtoul(optarg, &ptr, 0); - break; - default: -- return 1; -+ ret = 1; -+ goto bail; - break; - } - } - -- if (!s) -- return 0; -+ if (!s) { -+ ret = 0; -+ goto bail; -+ } - - num = ocfs2_get_backup_super_offsets(NULL, byte_off, - ARRAY_SIZE(byte_off)); -- if (!num) -- return -1; -+ if (!num) { -+ ret = -1; -+ goto bail; -+ } - - if (s < 1 || s > num) { - fprintf(stderr, "Backup super block is outside of valid range" - "(between 1 and %d)\n", num); -- return -1; -+ ret = -1; -+ goto bail; - } - -- dev = strdup(args[1]); - ret = get_blocksize(dev, byte_off[s-1], &blksize, s); - if (ret) { - com_err(args[0],ret, "Can't get the blocksize from the device" --- -2.1.2 - diff --git a/0003-o2cb-add-build-scripts-for-rhel7.patch b/0003-o2cb-add-build-scripts-for-rhel7.patch deleted file mode 100644 index f068cc9..0000000 --- a/0003-o2cb-add-build-scripts-for-rhel7.patch +++ /dev/null @@ -1,163 +0,0 @@ -From: Junxiao Bi -To: -Date: 6/29/2015 4:29 PM -Subject: [Ocfs2-tools-devel] [PATCH 1/6] ocfs2-tools: add build scripts for rhel7 - -Signed-off-by: Junxiao Bi ---- - vendor/Makefile | 2 +- - vendor/rhel7/Makefile | 10 +++++++ - vendor/rhel7/Vendor.make | 10 +++++++ - vendor/rhel7/rpmarch.guess | 68 ++++++++++++++++++++++++++++++++++++++++++++ - vendor/rhel7/vendor.guess | 13 +++++++++ - 5 files changed, 102 insertions(+), 1 deletion(-) - create mode 100644 vendor/rhel7/Makefile - create mode 100644 vendor/rhel7/Vendor.make - create mode 100755 vendor/rhel7/rpmarch.guess - create mode 100755 vendor/rhel7/vendor.guess - -diff --git a/vendor/Makefile b/vendor/Makefile -index 8819586..58ac84d 100644 ---- a/vendor/Makefile -+++ b/vendor/Makefile -@@ -2,6 +2,6 @@ TOPDIR = .. - - include $(TOPDIR)/Preamble.make - --SUBDIRS = common rhel6 rhel5 sles10 rhel4 sles9 fc7 fc8 fc9 -+SUBDIRS = common rhel7 rhel6 rhel5 sles10 rhel4 sles9 fc7 fc8 fc9 - - include $(TOPDIR)/Postamble.make -diff --git a/vendor/rhel7/Makefile b/vendor/rhel7/Makefile -new file mode 100644 -index 0000000..7afe47c ---- /dev/null -+++ b/vendor/rhel7/Makefile -@@ -0,0 +1,10 @@ -+TOPDIR = ../.. -+ -+include $(TOPDIR)/Preamble.make -+ -+DIST_FILES = \ -+ rpmarch.guess \ -+ Vendor.make \ -+ vendor.guess -+ -+include $(TOPDIR)/Postamble.make -diff --git a/vendor/rhel7/Vendor.make b/vendor/rhel7/Vendor.make -new file mode 100644 -index 0000000..b8fc25e ---- /dev/null -+++ b/vendor/rhel7/Vendor.make -@@ -0,0 +1,10 @@ -+# -+# RHEL 7 -+# -+ -+TOOLSARCH = $(shell $(TOPDIR)/vendor/rhel7/rpmarch.guess tools $(TOPDIR)) -+VENDOR_EXTENSION = el7 -+ -+include $(TOPDIR)/vendor/common/Vendor.make -+ -+packages: rpm -diff --git a/vendor/rhel7/rpmarch.guess b/vendor/rhel7/rpmarch.guess -new file mode 100755 -index 0000000..8519589 ---- /dev/null -+++ b/vendor/rhel7/rpmarch.guess -@@ -0,0 +1,68 @@ -+#! /bin/sh -+ -+mode="$1" -+srcdir="$2" -+ -+host_cpu= -+ -+ -+QUERYFILE=/etc/redhat-release -+ -+if test -n "$QUERYFILE"; then -+ host_cpu="`rpm -qf $QUERYFILE --queryformat \"%{ARCH}\"`" -+fi -+ -+if test -z "$host_cpu" -o "$host_cpu" = "noarch" ; then -+ host_alias=`$srcdir/config.guess` -+ host=`$srcdir/config.sub $host_alias` -+ host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -+fi -+ -+case "$host_cpu" in -+ x86_64|ia64|s390x) -+ TOOLSARCH="$host_cpu" -+ ;; -+ i386|i486|i586|i686|i786|k6|k7) -+ TOOLSARCH="i386" -+ ;; -+ ppc|ppc64|ppciseries|ppcpseries|ppc64iseries|ppc64pseries|powerpc|powerpc64) -+ TOOLSARCH="ppc" -+ ;; -+ *) -+ echo "rpmarch.guess: Warning: unknown RPM CPU architecture: $host_cpu" >&2 -+ TOOLSARCH="" -+ ;; -+esac -+ -+# Only a few of these need to be overwritten from RPM's default -+case "$host_cpu" in -+ i386|i586) -+ MODULEARCH="i686" -+ ;; -+ ppc|ppc64|ppciseries|ppcpseries|ppc64iseries|ppc64pseries|powerpc|powerpc64) -+ MODULEARCH="ppc64" -+ ;; -+ *) -+ MODULEARCH="" -+ ;; -+esac -+ -+case "$mode" in -+ module) -+ if [ -n "$MODULEARCH" ] ; then -+ echo "--target $MODULEARCH" -+ fi -+ ;; -+ tools) -+ if [ -n "$TOOLSARCH" ] ; then -+ echo "--target $TOOLSARCH" -+ fi -+ ;; -+ *) -+ echo "rpmarch.guess: Invalid mode: $mode" >&2 -+ echo "error" -+ exit 1 -+ ;; -+esac -+ -+exit 0 -diff --git a/vendor/rhel7/vendor.guess b/vendor/rhel7/vendor.guess -new file mode 100755 -index 0000000..c3a8b12 ---- /dev/null -+++ b/vendor/rhel7/vendor.guess -@@ -0,0 +1,13 @@ -+#!/bin/sh -+ -+if [ ! -f /etc/redhat-release ] -+then -+ exit 1 -+fi -+ -+case "`rpm -qf /etc/redhat-release --qf '%{VERSION}' 2>/dev/null`" in -+ 7*) ;; -+ *) exit 1;; -+esac -+ -+exit 0 --- -1.7.9.5 - - -_______________________________________________ -Ocfs2-tools-devel mailing list -Ocfs2-tools-devel@oss.oracle.com -https://oss.oracle.com/mailman/listinfo/ocfs2-tools-devel diff --git a/0004-add-systemd-support.patch b/0004-add-systemd-support.patch deleted file mode 100644 index 24fdfa2..0000000 --- a/0004-add-systemd-support.patch +++ /dev/null @@ -1,309 +0,0 @@ -From: Junxiao Bi -To: -Date: 6/29/2015 4:29 PM -Subject: [Ocfs2-tools-devel] [PATCH 2/6] ocfs2-tools: add systemd support - -When systemd is enabled, the old way to start/stop/status service -should be disabled, so move /etc/init.d/o2cb and /etc/init.d/ocfs2 -to /sbin. - -Signed-off-by: Junxiao Bi ---- - vendor/common/Makefile | 4 ++- - vendor/common/Vendor.make | 1 + - vendor/common/o2cb.service | 14 ++++++++ - vendor/common/ocfs2-tools.spec-generic.in | 55 +++++++++++++++++++++++------ - vendor/common/ocfs2.service | 14 ++++++++ - vendor/fc7/Vendor.make | 1 + - vendor/fc8/Vendor.make | 1 + - vendor/fc9/Vendor.make | 1 + - vendor/rhel4/Vendor.make | 1 + - vendor/rhel5/Vendor.make | 1 + - vendor/rhel6/Vendor.make | 1 + - vendor/rhel7/Vendor.make | 1 + - vendor/sles10/Vendor.make | 1 + - vendor/sles9/Vendor.make | 1 + - 14 files changed, 85 insertions(+), 12 deletions(-) - create mode 100644 vendor/common/o2cb.service - create mode 100644 vendor/common/ocfs2.service - -diff --git a/vendor/common/Makefile b/vendor/common/Makefile -index 864a71e..3c8902c 100644 ---- a/vendor/common/Makefile -+++ b/vendor/common/Makefile -@@ -25,6 +25,8 @@ DIST_FILES = \ - ocfs2-tools.spec-generic.in \ - 51-ocfs2.rules \ - Vendor.make \ -- o2cb.sysconfig.5.in -+ o2cb.sysconfig.5.in \ -+ o2cb.service \ -+ ocfs2.service - - include $(TOPDIR)/Postamble.make -diff --git a/vendor/common/Vendor.make b/vendor/common/Vendor.make -index e92884e..2526cdc 100644 ---- a/vendor/common/Vendor.make -+++ b/vendor/common/Vendor.make -@@ -20,6 +20,7 @@ $(TOPDIR)/ocfs2-tools-$(DIST_VERSION)-$(PKG_VERSION).$(VENDOR_EXTENSION).src.rpm - -e 's,@@PYVERSION@@,'$(PYVERSION)',g' \ - -e 's,@@COMPILE_PY@@,'$(COMPILE_PY)',g' \ - -e 's,@@CHKCONFIG_DEP@@,'$(CHKCONFIG_DEP)',g' \ -+ -e 's,@@SYSTEMD_ENABLED@@,'$(SYSTEMD_ENABLED)',g' \ - < "$(TOPDIR)/vendor/common/ocfs2-tools.spec-generic" \ - > "$(TOPDIR)/vendor/common/ocfs2-tools.spec" - $(RPMBUILD) -bs --define "_sourcedir $(RPM_TOPDIR)" --define "_srcrpmdir $(RPM_TOPDIR)" "$(TOPDIR)/vendor/common/ocfs2-tools.spec" -diff --git a/vendor/common/o2cb.service b/vendor/common/o2cb.service -new file mode 100644 -index 0000000..94e2b1a ---- /dev/null -+++ b/vendor/common/o2cb.service -@@ -0,0 +1,14 @@ -+[Unit] -+Description=Load o2cb Modules -+Requires=network.service -+After=network.service -+ -+[Service] -+Type=oneshot -+RemainAfterExit=yes -+ExecStart=/sbin/o2cb.init enable -+ExecStop=/sbin/o2cb.init disable -+ExecRestart=/sbin/o2cb.init restart -+ -+[Install] -+WantedBy=multi-user.target -diff --git a/vendor/common/ocfs2-tools.spec-generic.in b/vendor/common/ocfs2-tools.spec-generic.in -index 4fabc8c..9527908 100644 ---- a/vendor/common/ocfs2-tools.spec-generic.in -+++ b/vendor/common/ocfs2-tools.spec-generic.in -@@ -17,6 +17,7 @@ - - %define build_ocfs2console 0 - %define compile_py 0 -+%define systemd_enabled @@SYSTEMD_ENABLED@@ - - %if %{build_ocfs2console} - %define compile_py @@COMPILE_PY@@ -@@ -80,9 +81,18 @@ make - - %install - --mkdir -p $RPM_BUILD_ROOT/etc/init.d --cp -f vendor/common/o2cb.init $RPM_BUILD_ROOT/etc/init.d/o2cb --cp -f vendor/common/ocfs2.init $RPM_BUILD_ROOT/etc/init.d/ocfs2 -+%if %{systemd_enabled} -+ mkdir -p $RPM_BUILD_ROOT/usr/lib/systemd/system -+ cp -f vendor/common/o2cb.service $RPM_BUILD_ROOT/usr/lib/systemd/system/ -+ cp -f vendor/common/ocfs2.service $RPM_BUILD_ROOT/usr/lib/systemd/system/ -+ mkdir -p $RPM_BUILD_ROOT/sbin -+ cp -f vendor/common/o2cb.init $RPM_BUILD_ROOT/sbin -+ cp -f vendor/common/ocfs2.init $RPM_BUILD_ROOT/sbin -+%else -+ mkdir -p $RPM_BUILD_ROOT/etc/init.d -+ cp -f vendor/common/o2cb.init $RPM_BUILD_ROOT/etc/init.d/o2cb -+ cp -f vendor/common/ocfs2.init $RPM_BUILD_ROOT/etc/init.d/ocfs2 -+%endif - if [ -f /etc/redhat-release ] - then - # Red Hat chkconfig is completely and utterly broken -@@ -104,14 +114,27 @@ rm -rf "$RPM_BUILD_ROOT" - - - %post --/sbin/chkconfig --add o2cb >/dev/null --/sbin/chkconfig --add ocfs2 >/dev/null -+%if !%{systemd_enabled} -+ /sbin/chkconfig --add o2cb >/dev/null -+ /sbin/chkconfig --add ocfs2 >/dev/null -+%else -+ # clean up start/kill entry in /etc/rc*.d/ when upgrade. -+ if [ -f /etc/init.d/o2cb ]; then -+ /sbin/chkconfig --del o2cb >/dev/null -+ fi -+ -+ if [ -f /etc/init.d/ocfs2 ]; then -+ /sbin/chkconfig --del ocfs2 >/dev/null -+ fi -+%endif - - %preun --if [ $1 = 0 ]; then # execute this only if we are NOT doing an upgrade -- /sbin/chkconfig --del ocfs2 >/dev/null -- /sbin/chkconfig --del o2cb >/dev/null --fi -+%if !%{systemd_enabled} -+ if [ $1 = 0 ]; then # execute this only if we are NOT doing an upgrade -+ /sbin/chkconfig --del ocfs2 >/dev/null -+ /sbin/chkconfig --del o2cb >/dev/null -+ fi -+%endif - - %files - %defattr(-,root,root) -@@ -127,10 +150,17 @@ fi - /sbin/o2image - /sbin/o2cluster - /sbin/ocfs2_hb_ctl --/usr/bin/o2info --/usr/sbin/o2hbmonitor -+%if %{systemd_enabled} -+/sbin/o2cb.init -+/sbin/ocfs2.init -+/usr/lib/systemd/system/o2cb.service -+/usr/lib/systemd/system/ocfs2.service -+%else - /etc/init.d/o2cb - /etc/init.d/ocfs2 -+%endif -+/usr/bin/o2info -+/usr/sbin/o2hbmonitor - %config(noreplace) /etc/sysconfig/o2cb - /usr/share/man/man8/debugfs.ocfs2.8.gz - /usr/share/man/man8/fsck.ocfs2.8.gz -@@ -172,6 +202,9 @@ fi - - - %changelog -+* Thu Jun 18 2015 Junxiao Bi -+- Add systemd support -+ - * Thu Jan 27 2005 Manish Singh - - Add ocfs2console - -diff --git a/vendor/common/ocfs2.service b/vendor/common/ocfs2.service -new file mode 100644 -index 0000000..768f806 ---- /dev/null -+++ b/vendor/common/ocfs2.service -@@ -0,0 +1,14 @@ -+[Unit] -+Description=Load ocfs2 Modules -+Requires=o2cb.service -+After=o2cb.service -+ -+[Service] -+Type=oneshot -+RemainAfterExit=yes -+ExecStart=/sbin/ocfs2.init start -+ExecStop=/sbin/ocfs2.init stop -+ExecReload=/sbin/ocfs2.init restart -+ -+[Install] -+WantedBy=multi-user.target -diff --git a/vendor/fc7/Vendor.make b/vendor/fc7/Vendor.make -index 025de08..a3002af 100644 ---- a/vendor/fc7/Vendor.make -+++ b/vendor/fc7/Vendor.make -@@ -4,6 +4,7 @@ - - TOOLSARCH = $(shell $(TOPDIR)/vendor/fc7/rpmarch.guess tools $(TOPDIR)) - VENDOR_EXTENSION = fc7 -+SYSTEMD_ENABLED = 0 - - include $(TOPDIR)/vendor/common/Vendor.make - -diff --git a/vendor/fc8/Vendor.make b/vendor/fc8/Vendor.make -index 6a78602..ba9c4f0 100644 ---- a/vendor/fc8/Vendor.make -+++ b/vendor/fc8/Vendor.make -@@ -4,6 +4,7 @@ - - TOOLSARCH = $(shell $(TOPDIR)/vendor/fc8/rpmarch.guess tools $(TOPDIR)) - VENDOR_EXTENSION = fc8 -+SYSTEMD_ENABLED = 0 - - include $(TOPDIR)/vendor/common/Vendor.make - -diff --git a/vendor/fc9/Vendor.make b/vendor/fc9/Vendor.make -index db9fde1..64d03fd 100644 ---- a/vendor/fc9/Vendor.make -+++ b/vendor/fc9/Vendor.make -@@ -4,6 +4,7 @@ - - TOOLSARCH = $(shell $(TOPDIR)/vendor/fc9/rpmarch.guess tools $(TOPDIR)) - VENDOR_EXTENSION = fc9 -+SYSTEMD_ENABLED = 0 - - include $(TOPDIR)/vendor/common/Vendor.make - -diff --git a/vendor/rhel4/Vendor.make b/vendor/rhel4/Vendor.make -index 2245f44..5ce8e05 100644 ---- a/vendor/rhel4/Vendor.make -+++ b/vendor/rhel4/Vendor.make -@@ -4,6 +4,7 @@ - - TOOLSARCH = $(shell $(TOPDIR)/vendor/rhel4/rpmarch.guess tools $(TOPDIR)) - VENDOR_EXTENSION = el4 -+SYSTEMD_ENABLED = 0 - - include $(TOPDIR)/vendor/common/Vendor.make - -diff --git a/vendor/rhel5/Vendor.make b/vendor/rhel5/Vendor.make -index fb5b591..8156000 100644 ---- a/vendor/rhel5/Vendor.make -+++ b/vendor/rhel5/Vendor.make -@@ -4,6 +4,7 @@ - - TOOLSARCH = $(shell $(TOPDIR)/vendor/rhel5/rpmarch.guess tools $(TOPDIR)) - VENDOR_EXTENSION = el5 -+SYSTEMD_ENABLED = 0 - - include $(TOPDIR)/vendor/common/Vendor.make - -diff --git a/vendor/rhel6/Vendor.make b/vendor/rhel6/Vendor.make -index 8f4a470..20144a3 100644 ---- a/vendor/rhel6/Vendor.make -+++ b/vendor/rhel6/Vendor.make -@@ -4,6 +4,7 @@ - - TOOLSARCH = $(shell $(TOPDIR)/vendor/rhel6/rpmarch.guess tools $(TOPDIR)) - VENDOR_EXTENSION = el6 -+SYSTEMD_ENABLED = 0 - - include $(TOPDIR)/vendor/common/Vendor.make - -diff --git a/vendor/rhel7/Vendor.make b/vendor/rhel7/Vendor.make -index b8fc25e..cc3925b 100644 ---- a/vendor/rhel7/Vendor.make -+++ b/vendor/rhel7/Vendor.make -@@ -4,6 +4,7 @@ - - TOOLSARCH = $(shell $(TOPDIR)/vendor/rhel7/rpmarch.guess tools $(TOPDIR)) - VENDOR_EXTENSION = el7 -+SYSTEMD_ENABLED = 1 - - include $(TOPDIR)/vendor/common/Vendor.make - -diff --git a/vendor/sles10/Vendor.make b/vendor/sles10/Vendor.make -index 85969ea..56b1feb 100644 ---- a/vendor/sles10/Vendor.make -+++ b/vendor/sles10/Vendor.make -@@ -4,6 +4,7 @@ - - TOOLSARCH = $(shell $(TOPDIR)/vendor/sles10/rpmarch.guess tools $(TOPDIR)) - VENDOR_EXTENSION = SLE10 -+SYSTEMD_ENABLED = 0 - - include $(TOPDIR)/vendor/common/Vendor.make - -diff --git a/vendor/sles9/Vendor.make b/vendor/sles9/Vendor.make -index 8cb0482..56be69f 100644 ---- a/vendor/sles9/Vendor.make -+++ b/vendor/sles9/Vendor.make -@@ -4,6 +4,7 @@ - - TOOLSARCH = $(shell $(TOPDIR)/vendor/sles9/rpmarch.guess tools $(TOPDIR)) - VENDOR_EXTENSION = SLE9 -+SYSTEMD_ENABLED = 0 - - include $(TOPDIR)/vendor/common/Vendor.make - --- -1.7.9.5 - - -_______________________________________________ -Ocfs2-tools-devel mailing list -Ocfs2-tools-devel@oss.oracle.com -https://oss.oracle.com/mailman/listinfo/ocfs2-tools-devel diff --git a/0004-mkfs.ocfs2-Abort-if-cluster-information-is-not-detec.patch b/0004-mkfs.ocfs2-Abort-if-cluster-information-is-not-detec.patch new file mode 100644 index 0000000..13e32fe --- /dev/null +++ b/0004-mkfs.ocfs2-Abort-if-cluster-information-is-not-detec.patch @@ -0,0 +1,86 @@ +From f7ea242d2bf76c71cfe7fd9555d44c2486610486 Mon Sep 17 00:00:00 2001 +From: Goldwyn Rodrigues +Date: Fri, 27 Dec 2013 10:01:33 -0600 +Subject: [PATCH] mkfs.ocfs2: Abort if cluster information is not detected + +--- + mkfs.ocfs2/check.c | 19 +++++++++++++++---- + mkfs.ocfs2/mkfs.h | 2 +- + 2 files changed, 16 insertions(+), 5 deletions(-) + +diff --git a/mkfs.ocfs2/check.c b/mkfs.ocfs2/check.c +index f05dc72..75f0e7b 100644 +--- a/mkfs.ocfs2/check.c ++++ b/mkfs.ocfs2/check.c +@@ -33,7 +33,7 @@ int is_classic_stack(char *stack_name) + } + + /* For ocfs2_fill_cluster_information(). Errors are to be ignored */ +-void cluster_fill(char **stack_name, char **cluster_name, uint8_t *stack_flags) ++errcode_t cluster_fill(char **stack_name, char **cluster_name, uint8_t *stack_flags) + { + errcode_t err; + struct o2cb_cluster_desc cluster; +@@ -44,11 +44,11 @@ void cluster_fill(char **stack_name, char **cluster_name, uint8_t *stack_flags) + + err = o2cb_init(); + if (err) +- return; ++ goto out; + + err = o2cb_running_cluster_desc(&cluster); + if (err) +- return; ++ goto out; + + if (cluster.c_stack) { + /* +@@ -59,6 +59,8 @@ void cluster_fill(char **stack_name, char **cluster_name, uint8_t *stack_flags) + *cluster_name = cluster.c_cluster; + *stack_flags = cluster.c_flags; + } ++out: ++ return err; + } + + /* For ocfs2_fill_cluster_information(). Errors are to be ignored */ +@@ -132,6 +134,7 @@ int ocfs2_fill_cluster_information(State *s) + uint8_t user_stack_flags, o2cb_stack_flags, disk_stack_flags; + int clusterinfo = 0, userspace = 0; + int ret = -1; ++ errcode_t err; + + if (s->mount == MOUNT_LOCAL) + return 0; +@@ -139,7 +142,15 @@ int ocfs2_fill_cluster_information(State *s) + *user_value = *o2cb_value = *disk_value = '\0'; + + /* get currently active cluster stack */ +- cluster_fill(&o2cb_stack_name, &o2cb_cluster_name, &o2cb_stack_flags); ++ err = cluster_fill(&o2cb_stack_name, &o2cb_cluster_name, &o2cb_stack_flags); ++ if (err && !s->cluster_stack) { ++ com_err(s->progname, 0, "Could not determine cluster " ++ "information.\nEither load the correct kernel module" ++ ", set the cluster_stack and start cluster " ++ "services, or provide --cluster-stack and " ++ "--cluster-name command line arguments.\n"); ++ return -1; ++ } + + /* get cluster stack configured on disk */ + disk_fill(s->device_name, &disk_stack_name, &disk_cluster_name, +diff --git a/mkfs.ocfs2/mkfs.h b/mkfs.ocfs2/mkfs.h +index 13b4fb5..ca2004c 100644 +--- a/mkfs.ocfs2/mkfs.h ++++ b/mkfs.ocfs2/mkfs.h +@@ -243,6 +243,6 @@ struct _State { + }; + + int is_classic_stack(char *stack_name); +-void cluster_fill(char **stack_name, char **cluster_name, uint8_t *stack_flags); ++errcode_t cluster_fill(char **stack_name, char **cluster_name, uint8_t *stack_flags); + int ocfs2_fill_cluster_information(State *s); + int ocfs2_check_volume(State *s); +-- +1.8.4 + diff --git a/0005-do-not-write-sysconfig-if-status-not-changed.patch b/0005-do-not-write-sysconfig-if-status-not-changed.patch deleted file mode 100644 index c0c2bc0..0000000 --- a/0005-do-not-write-sysconfig-if-status-not-changed.patch +++ /dev/null @@ -1,49 +0,0 @@ -From: Junxiao Bi -To: -Date: 6/29/2015 4:29 PM -Subject: [Ocfs2-tools-devel] [PATCH 3/6] o2cb: don't write sysconfig if status not changed - -Signed-off-by: Junxiao Bi ---- - vendor/common/o2cb.init.sh | 16 ++++++++++------ - 1 file changed, 10 insertions(+), 6 deletions(-) - -diff --git a/vendor/common/o2cb.init.sh b/vendor/common/o2cb.init.sh -index 9e0b31c..e2f80f7 100755 ---- a/vendor/common/o2cb.init.sh -+++ b/vendor/common/o2cb.init.sh -@@ -1925,16 +1925,20 @@ case "$1" in - ;; - - enable) -- O2CB_ENABLED=true -- write_sysconfig -- if_fail "$?" "Unable to write the driver configuration" -+ if [ "$O2CB_ENABLED" != "true" ]; then -+ O2CB_ENABLED=true -+ write_sysconfig -+ if_fail "$?" "Unable to write the driver configuration" -+ fi - start - ;; - - disable) -- O2CB_ENABLED=false -- write_sysconfig -- if_fail "$?" "Unable to write the driver configuration" -+ if [ "$O2CB_ENABLED" != "false" ]; then -+ O2CB_ENABLED=false -+ write_sysconfig -+ if_fail "$?" "Unable to write the driver configuration" -+ fi - stop - ;; - --- -1.7.9.5 - - -_______________________________________________ -Ocfs2-tools-devel mailing list -Ocfs2-tools-devel@oss.oracle.com -https://oss.oracle.com/mailman/listinfo/ocfs2-tools-devel diff --git a/0006-o2cb-mount-debugfs-when-load-config.patch b/0006-o2cb-mount-debugfs-when-load-config.patch deleted file mode 100644 index 8023f53..0000000 --- a/0006-o2cb-mount-debugfs-when-load-config.patch +++ /dev/null @@ -1,79 +0,0 @@ -From: Junxiao Bi -To: -Date: 6/29/2015 4:29 PM -Subject: [Ocfs2-tools-devel] [PATCH 4/6] o2cb: mount debugfs when load config - -o2hbmonitor depends on debugfs to work, mount it when -load the config. - -Signed-off-by: Cathy A Avery -Signed-off-by: Adnan G Misherfi -Signed-off-by: Junxiao Bi ---- - vendor/common/o2cb.init.sh | 27 +++++++++++++++++++++++++++ - 1 file changed, 27 insertions(+) - -diff --git a/vendor/common/o2cb.init.sh b/vendor/common/o2cb.init.sh -index e2f80f7..dedb408 100755 ---- a/vendor/common/o2cb.init.sh -+++ b/vendor/common/o2cb.init.sh -@@ -1315,10 +1315,25 @@ check_load_module() - return 2 - } - -+check_debugfs_mount() -+{ -+ echo "checking debugfs..." -+ -+ mount | grep debugfs | grep /sys/kernel/debug > /dev/null -+ if [ "$?" -eq "1" ] -+ then -+ mount -t debugfs nodev /sys/kernel/debug -+ fi -+} -+ -+ -+ - load() - { - PLUGIN="$(select_stack_plugin)" - -+ check_debugfs_mount -+ - touch_lockfile - - # XXX: SPECIAL CASE! We must load configfs for configfs_path() to work -@@ -1820,6 +1835,16 @@ online_status() - online_status_$PLUGIN "$CLUSTER" - } - -+debugfs_mount_status() -+{ -+ if mount | grep debugfs | grep /sys/kernel/debug > /dev/null -+ then -+ echo "Debug file system at /sys/kernel/debug: mounted" -+ else -+ echo "Debug file system at /sys/kernel/debug: not mounted" -+ fi -+} -+ - status() - { - load_status -@@ -1833,6 +1858,8 @@ status() - online_status "$CLUSTER" - - userdlm_status -+ -+ debugfs_mount_status - } - - # --- -1.7.9.5 - - -_______________________________________________ -Ocfs2-tools-devel mailing list -Ocfs2-tools-devel@oss.oracle.com -https://oss.oracle.com/mailman/listinfo/ocfs2-tools-devel diff --git a/0007-Improve-error-message-if-DLM-service-is-unavailable.patch b/0007-Improve-error-message-if-DLM-service-is-unavailable.patch new file mode 100644 index 0000000..9a23abb --- /dev/null +++ b/0007-Improve-error-message-if-DLM-service-is-unavailable.patch @@ -0,0 +1,28 @@ +From 15891da74943b0f878b486741ff67507b9bd6177 Mon Sep 17 00:00:00 2001 +From: Goldwyn Rodrigues +Date: Fri, 23 May 2014 11:41:24 -0500 +Subject: [PATCH 7/7] Improve error message if DLM service is unavailable + +o2dlm_initialize_fsdlm to return O2DLM_ET_SERVICE_UNAVAILABLE if +DLM service is not running (ENOTCONN). +--- + libo2dlm/o2dlm.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/libo2dlm/o2dlm.c b/libo2dlm/o2dlm.c +index dbc642b..c0fbb21 100644 +--- a/libo2dlm/o2dlm.c ++++ b/libo2dlm/o2dlm.c +@@ -1035,6 +1035,9 @@ static errcode_t o2dlm_initialize_fsdlm(const char *domain_name, + case EPERM: + ret = O2DLM_ET_BAD_DOMAIN_DIR; + break; ++ case ENOTCONN: ++ ret = O2DLM_ET_SERVICE_UNAVAILABLE; ++ break; + default: + ret = O2DLM_ET_INTERNAL_FAILURE; + break; +-- +1.8.4.5 + diff --git a/0009-o2cb-fix-systemd-o2cb.service-failure.patch b/0009-o2cb-fix-systemd-o2cb.service-failure.patch deleted file mode 100644 index 12e040e..0000000 --- a/0009-o2cb-fix-systemd-o2cb.service-failure.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 2abe087d41b86198886a076fe222dd6e6537f0d1 Mon Sep 17 00:00:00 2001 -From: Junxiao Bi -Date: Fri, 1 Apr 2016 11:10:13 +0800 -Subject: [PATCH] o2cb: fix systemd o2cb.service failure - -Configfs may have been mounted by "modprobe -s configfs" in -load_filesystem() on ol7 which has systemd supported, in this -case, mount_filesystem() will fail and o2cb.service can't be -started. To fix this, check fs mount status when mount fail, -if already mounted, don't return error. - -Signed-off-by: Junxiao Bi -Reviewed-by: Eric Ren ---- - vendor/common/o2cb.init.sh | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/vendor/common/o2cb.init.sh b/vendor/common/o2cb.init.sh -index 9e0b31c..2d8c9e4 100755 ---- a/vendor/common/o2cb.init.sh -+++ b/vendor/common/o2cb.init.sh -@@ -610,6 +610,7 @@ mount_filesystem() - mount -t ${FSNAME} ${FSNAME} ${MOUNTPOINT} - if [ $? != 0 ] - then -+ check_filesystem "$FSNAME" "$MOUNTPOINT" && return 2 - echo "Unable to mount ${FSNAME} filesystem" >&2 - return 1 - fi --- -2.6.6 - diff --git a/_service b/_service index c4e80e7..cd8eb68 100644 --- a/_service +++ b/_service @@ -3,7 +3,7 @@ https://github.com/markfasheh/ocfs2-tools.git git .git - 1.8.4 + 1.8.5 master diff --git a/auto-setup-pcmk-stack-as-default-if-no-stack-is-setup.patch b/auto-setup-pcmk-stack-as-default-if-no-stack-is-setup.patch index edf0edf..84c2593 100644 --- a/auto-setup-pcmk-stack-as-default-if-no-stack-is-setup.patch +++ b/auto-setup-pcmk-stack-as-default-if-no-stack-is-setup.patch @@ -1,8 +1,8 @@ -Index: ocfs2-tools-1.8.4/libo2cb/o2cb_abi.c +Index: ocfs2-tools-1.8.5/libo2cb/o2cb_abi.c =================================================================== --- a/libo2cb/o2cb_abi.c +++ b/libo2cb/o2cb_abi.c -@@ -200,7 +200,7 @@ redo: +@@ -201,7 +201,7 @@ redo: } } else if (len == -ENOENT) { if (!setup_performed) { @@ -10,4 +10,4 @@ Index: ocfs2-tools-1.8.4/libo2cb/o2cb_abi.c + o2cb_setup_stack(OCFS2_PCMK_CLUSTER_STACK); setup_performed = 1; goto redo; - } + } else { diff --git a/bnc804707-reduce-RR-priority.patch b/bnc804707-reduce-RR-priority.patch new file mode 100644 index 0000000..fee21b2 --- /dev/null +++ b/bnc804707-reduce-RR-priority.patch @@ -0,0 +1,13 @@ +Index: ocfs2-tools/ocfs2_controld/main.c +=================================================================== +--- ocfs2-tools.orig/ocfs2_controld/main.c ++++ ocfs2-tools/ocfs2_controld/main.c +@@ -1233,7 +1233,7 @@ static void set_scheduler(void) + struct sched_param sched_param; + int rv; + +- rv = sched_get_priority_max(SCHED_RR); ++ rv = sched_get_priority_min(SCHED_RR); + if (rv != -1) { + sched_param.sched_priority = rv; + rv = sched_setscheduler(0, SCHED_RR, &sched_param); diff --git a/bug-805764-ocfs2-controld.patch b/bug-805764-ocfs2-controld.patch new file mode 100644 index 0000000..f086a24 --- /dev/null +++ b/bug-805764-ocfs2-controld.patch @@ -0,0 +1,84 @@ +Index: ocfs2-tools/ocfs2_controld/main.c +=================================================================== +--- ocfs2-tools.orig/ocfs2_controld/main.c ++++ ocfs2-tools/ocfs2_controld/main.c +@@ -948,6 +948,68 @@ static void cpg_joined(int first) + } + } + ++static int find_minors(void) ++{ ++ FILE *fl; ++ char name[256]; ++ uint32_t number; ++ int c; ++ int control_minor = 0; ++ ++ if (!(fl = fopen("/proc/misc", "r"))) { ++ log_error("failed to open /proc/misc: %s", strerror(errno)); ++ goto out; ++ } ++ ++ while (!feof(fl)) { ++ if (fscanf(fl, "%d %255s\n", &number, &name[0]) == 2) { ++ if (!strcmp(name, "ocfs2_control")) ++ control_minor = number; ++ } else do { ++ c = fgetc(fl); ++ } while (c != EOF && c != '\n'); ++ ++ if (control_minor) ++ break; ++ } ++ fclose(fl); ++ ++ if (!control_minor) ++ log_error("Is ocfs2 missing from kernel? No misc devices found"); ++out: ++ return control_minor; ++} ++ ++static int find_udev_device(const char *path, uint32_t minor) ++{ ++ struct stat st; ++ int i; ++ ++ for (i = 0; i < 10; i++) { ++ if (stat(path, &st) == 0 && minor(st.st_rdev) == minor) ++ return 0; ++ sleep(1); ++ } ++ ++ log_error("cannot find device %s with minor %d", path, minor); ++ return -1; ++} ++ ++static int setup_misc_device(void) ++{ ++ int rv = -1; ++ int control_minor = find_minors(); ++ ++ if (control_minor) { ++ rv = find_udev_device("/dev/misc/ocfs2_control", control_minor); ++ if (rv < 0) ++ return rv; ++ log_debug("found /dev/misc/ocfs2_control %u", control_minor); ++ } ++ ++ return rv; ++} ++ + static int loop(void) + { + int rv, i, poll_timeout = -1; +@@ -968,6 +1030,10 @@ static int loop(void) + if (rv < 0) + goto out; + ++ rv = setup_misc_device(); ++ if (rv < 0) ++ goto out; ++ + rv = setup_cpg(cpg_joined); + if (rv < 0) + goto out; diff --git a/debug-ocfs2_hb_ctl.patch b/debug-ocfs2_hb_ctl.patch index 6108267..e8c876c 100644 --- a/debug-ocfs2_hb_ctl.patch +++ b/debug-ocfs2_hb_ctl.patch @@ -87,7 +87,7 @@ Index: ocfs2-tools/ocfs2_hb_ctl/ocfs2_hb_ctl.c struct hb_ctl_options hbo = { .action = HB_ACTION_UNKNOWN, }; - char hbuuid[33]; + char *hbuuid = NULL; + char tmp[1024]; + + openlog("ocfs2_hb_ctl", LOG_CONS|LOG_NDELAY|LOG_PID, LOG_KERN); diff --git a/extra-debug.patch b/extra-debug.patch new file mode 100644 index 0000000..f825c43 --- /dev/null +++ b/extra-debug.patch @@ -0,0 +1,187 @@ +--- + ocfs2_controld/ckpt.c | 2 - + ocfs2_controld/main.c | 53 ++++++++++++++++++++++++++++++++++------ + ocfs2_controld/mount.c | 2 + + ocfs2_controld/ocfs2_controld.h | 1 + ocfs2_controld/pacemaker.c | 2 - + 5 files changed, 51 insertions(+), 9 deletions(-) + +Index: ocfs2-tools/ocfs2_controld/ckpt.c +=================================================================== +--- ocfs2-tools.orig/ocfs2_controld/ckpt.c 2012-08-24 10:02:19.000000000 -0500 ++++ ocfs2-tools/ocfs2_controld/ckpt.c 2012-08-24 10:14:42.000000000 -0500 +@@ -413,7 +413,7 @@ static int call_section_read(struct ckpt + + /* -ENOENT is a clean error for the caller to handle */ + if (rc == -ENOENT) { +- log_debug("Checkpoint \"%.*s\" does not have a " ++ log_error("Checkpoint \"%.*s\" does not have a " + "section named \"%s\"", + handle->ch_name.length, + handle->ch_name.value, name); +Index: ocfs2-tools/ocfs2_controld/main.c +=================================================================== +--- ocfs2-tools.orig/ocfs2_controld/main.c 2012-08-24 10:02:19.000000000 -0500 ++++ ocfs2-tools/ocfs2_controld/main.c 2012-08-24 10:14:42.000000000 -0500 +@@ -74,7 +74,7 @@ static int time_to_die = 0; + static int sigpipe_write_fd; + + char *prog_name; +-int daemon_debug_opt; ++int daemon_debug_opt = 0; + char daemon_debug_buf[1024]; + char dump_buf[DUMP_SIZE]; + int dump_point; +@@ -1030,8 +1030,7 @@ static void lockfile(void) + fd = open(LOCKFILE_NAME, O_CREAT|O_WRONLY, + S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH); + if (fd < 0) { +- fprintf(stderr, "cannot open/create lock file %s\n", +- LOCKFILE_NAME); ++ log_error("cannot open/create lock file %s", LOCKFILE_NAME); + exit(EXIT_FAILURE); + } + +@@ -1042,13 +1041,13 @@ static void lockfile(void) + + error = fcntl(fd, F_SETLK, &lock); + if (error) { +- fprintf(stderr, "ocfs2_controld is already running\n"); ++ log_error("ocfs2_controld is already running"); + exit(EXIT_FAILURE); + } + + error = ftruncate(fd, 0); + if (error) { +- fprintf(stderr, "cannot clear lock file %s\n", LOCKFILE_NAME); ++ log_error("cannot clear lock file %s", LOCKFILE_NAME); + exit(EXIT_FAILURE); + } + +@@ -1056,7 +1055,7 @@ static void lockfile(void) + + error = write(fd, buf, strlen(buf)); + if (error <= 0) { +- fprintf(stderr, "cannot write lock file %s\n", LOCKFILE_NAME); ++ log_error("cannot write lock file %s", LOCKFILE_NAME); + exit(EXIT_FAILURE); + } + } +@@ -1066,13 +1065,13 @@ static void daemonize(void) + int fd; + pid_t pid = fork(); + if (pid < 0) { ++ log_error("main: cannot fork"); + perror("main: cannot fork"); + exit(EXIT_FAILURE); + } + if (pid) + exit(EXIT_SUCCESS); + setsid(); +- chdir("/"); + umask(0); + close(0); + close(1); +@@ -1143,6 +1142,7 @@ static void decode_arguments(int argc, c + break; + + default: ++ log_error("unknown option: %c\n", optchar); + fprintf(stderr, "unknown option: %c\n", optchar); + exit(EXIT_FAILURE); + break; +@@ -1180,12 +1180,53 @@ static void set_scheduler(void) + } + } + ++#include ++#include ++ ++static int ++hack_enable_coredumps(void) ++{ ++ int rc; ++ struct rlimit rlim; ++ int doenable = 1; ++ ++ if ((rc = getrlimit(RLIMIT_CORE, &rlim)) < 0) { ++ int errsave = errno; ++ log_error("Cannot get current core limit value. %d", errsave); ++ errno = errsave; ++ return rc; ++ } ++ if (rlim.rlim_max == 0 && geteuid() == 0) { ++ rlim.rlim_max = RLIM_INFINITY; ++ } ++ ++ rlim.rlim_cur = (doenable ? rlim.rlim_max : 0); ++ ++ if (doenable && rlim.rlim_max == 0) { ++ log_error("Not possible to enable core dumps (rlim_max is 0)"); ++ } ++ ++ if ((rc = setrlimit(RLIMIT_CORE, &rlim)) < 0) { ++ int errsave = errno; ++ log_error("Unable to enable core dumps: %d", errsave); ++ errno = errsave; ++ return rc; ++ } ++ chdir("/var/lib/openais"); ++ log_debug("Core dumps enabled: /var/lib/openais"); ++ return 0; ++} ++ + int main(int argc, char **argv) + { + errcode_t err; + prog_name = argv[0]; + const char *stack = NULL; + ++ decode_arguments(argc, argv); ++ ++ hack_enable_coredumps(); ++ + init_mounts(); + + initialize_o2cb_error_table(); +@@ -1201,13 +1242,11 @@ int main(int argc, char **argv) + return 1; + } + if (strcmp(stack, stackname)) { +- fprintf(stderr, "%s: This daemon supports the \"%s\" stack, but the \"%s\" stack is in use\n", +- prog_name, stackname, stack); ++ log_error("%s: This daemon supports the \"%s\" stack, but the \"%s\" stack is in use", ++ prog_name, stackname, stack); + return 1; + } + +- decode_arguments(argc, argv); +- + if (!daemon_debug_opt) + daemonize(); + +Index: ocfs2-tools/ocfs2_controld/mount.c +=================================================================== +--- ocfs2-tools.orig/ocfs2_controld/mount.c 2012-08-24 10:02:19.000000000 -0500 ++++ ocfs2-tools/ocfs2_controld/mount.c 2012-08-24 10:14:42.000000000 -0500 +@@ -176,6 +176,8 @@ static void notify_mount_client(struct m + else + mg->mg_mount_notified = 1; + ++ log_debug("Notified client: %d", mg->mg_mount_notified); ++ + /* + * XXX If we failed to notify the client, what can we do? I'm + * guessing that our main loop will get POLLHUP and we'll clean +Index: ocfs2-tools/ocfs2_controld/ocfs2_controld.h +=================================================================== +--- ocfs2-tools.orig/ocfs2_controld/ocfs2_controld.h 2012-08-24 10:14:40.000000000 -0500 ++++ ocfs2-tools/ocfs2_controld/ocfs2_controld.h 2012-08-24 10:14:42.000000000 -0500 +@@ -60,6 +60,7 @@ do { \ + #define log_error(fmt, args...) \ + do { \ + log_debug(fmt, ##args); \ ++ fprintf(stderr, fmt "\n", ##args); \ + syslog(LOG_ERR, fmt, ##args); \ + } while (0) + diff --git a/force-debug.patch b/force-debug.patch new file mode 100644 index 0000000..ba2ae2f --- /dev/null +++ b/force-debug.patch @@ -0,0 +1,28 @@ +--- + ocfs2_controld/ocfs2_controld.h | 7 +++++++ + 1 file changed, 7 insertions(+) + +Index: ocfs2_controld/ocfs2_controld.h +=================================================================== +--- a/ocfs2_controld/ocfs2_controld.h.orig 2008-10-26 18:10:50.000000000 +0100 ++++ b/ocfs2_controld/ocfs2_controld.h 2009-03-10 22:22:52.719197000 +0100 +@@ -44,12 +44,19 @@ extern void daemon_dump_save(void); + + #define log_debug(fmt, args...) \ + do { \ ++ syslog(LOG_DEBUG, fmt, ##args); \ + snprintf(daemon_debug_buf, 1023, "%ld %s@%d: " fmt "\n", \ + time(NULL), __FUNCTION__, __LINE__, ##args); \ + if (daemon_debug_opt) fprintf(stderr, "%s", daemon_debug_buf); \ + daemon_dump_save(); \ + } while (0) + ++#define log_info(fmt, args...) \ ++do { \ ++ log_debug(fmt, ##args); \ ++ syslog(LOG_INFO, fmt, ##args); \ ++} while (0) ++ + #define log_error(fmt, args...) \ + do { \ + log_debug(fmt, ##args); \ diff --git a/ocfs2-tools-1.8.4.tar.gz b/ocfs2-tools-1.8.4.tar.gz deleted file mode 100644 index 67a5b36..0000000 --- a/ocfs2-tools-1.8.4.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6a55b7c49b833562ddb4958e9bfaa7fbf28a955a8f9e6e19a8334cb82c18a9d0 -size 1479049 diff --git a/ocfs2-tools-1.8.5.tar.gz b/ocfs2-tools-1.8.5.tar.gz new file mode 100644 index 0000000..61ece46 --- /dev/null +++ b/ocfs2-tools-1.8.5.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dfa2f4ca4285abb592f2d0d968c5a04cf9d72b035965aa7ff48cf4d10cc75281 +size 1528141 diff --git a/ocfs2-tools.changes b/ocfs2-tools.changes index 7824f62..e333314 100644 --- a/ocfs2-tools.changes +++ b/ocfs2-tools.changes @@ -1,3 +1,23 @@ +------------------------------------------------------------------- +Thu Mar 9 12:36:30 UTC 2017 - ghe@suse.com + +- Update ocfs2-tools.tar.gz to upstream v1.8.5 +- Drop patches (merged upstream): + - 0001-libo2dlm-Close-file-description-after-use.patch + - 0002-debugfs.ocfs2-Fix-a-bug-in-process_open_args.patch + - 0003-o2cb-add-build-scripts-for-rhel7.patch + - 0004-add-systemd-support.patch + - 0005-do-not-write-sysconfig-if-status-not-changed.patch + - 0006-o2cb-mount-debugfs-when-load-config.patch + - 0009-o2cb-fix-systemd-o2cb.service-failure.patch +- Add patches (from SLE12SP2): + + force-debug.patch + + extra-debug.patch + + bug-805764-ocfs2-controld.patch + + bnc804707-reduce-RR-priority.patch + + 0004-mkfs.ocfs2-Abort-if-cluster-information-is-not-detec.patch + + 0007-Improve-error-message-if-DLM-service-is-unavailable.patch + ------------------------------------------------------------------- Thu Apr 21 09:57:15 UTC 2016 - zren@suse.com diff --git a/ocfs2-tools.spec b/ocfs2-tools.spec index 7d4e547..b4bd8a2 100644 --- a/ocfs2-tools.spec +++ b/ocfs2-tools.spec @@ -1,7 +1,7 @@ # # spec file for package ocfs2-tools # -# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,7 +17,7 @@ Name: ocfs2-tools -Version: 1.8.4 +Version: 1.8.5 Release: 0 Summary: Oracle Cluster File System 2 Core Tools License: GPL-2.0+ @@ -27,6 +27,8 @@ Source: ocfs2-tools-%{version}.tar.gz Source1: o2cb.ocf Source2: reflink.tar.bz2 Patch001: auto-setup-pcmk-stack-as-default-if-no-stack-is-setup.patch +Patch101: force-debug.patch +Patch102: extra-debug.patch Patch103: debug-ocfs2_hb_ctl.patch Patch105: bug-470741-debug_start_failures.patch Patch106: ocfs2-devel.diff @@ -36,15 +38,12 @@ Patch202: fix-configure-check-libs.patch Patch204: dont-use-var-lock-subsys.patch Patch205: ocfs2-tools-kernel33.patch Patch206: ocfs2-tools-resource.patch -Patch301: 0001-libo2dlm-Close-file-description-after-use.patch -Patch302: 0002-debugfs.ocfs2-Fix-a-bug-in-process_open_args.patch -Patch401: 0003-o2cb-add-build-scripts-for-rhel7.patch -Patch402: 0004-add-systemd-support.patch -Patch403: 0005-do-not-write-sysconfig-if-status-not-changed.patch -Patch404: 0006-o2cb-mount-debugfs-when-load-config.patch +Patch212: bug-805764-ocfs2-controld.patch +Patch213: bnc804707-reduce-RR-priority.patch +Patch225: 0004-mkfs.ocfs2-Abort-if-cluster-information-is-not-detec.patch +Patch228: 0007-Improve-error-message-if-DLM-service-is-unavailable.patch Patch405: 0007-vendor-Add-vendor-files-for-sles12.patch Patch406: 0008-ocfs2-tools-add-systemd-support-fix.patch -Patch407: 0009-o2cb-fix-systemd-o2cb.service-failure.patch Patch501: bnc#96864-ocfs2console-fix-starting-failure.patch BuildRequires: autoconf @@ -141,6 +140,8 @@ OCFS2 filesystem. %prep %setup -q -a 2 %patch001 -p1 +%patch101 -p1 +%patch102 -p1 %patch103 -p1 %patch105 -p1 %patch106 -p1 @@ -150,15 +151,12 @@ OCFS2 filesystem. %patch204 -p1 %patch205 -p1 %patch206 -p1 -%patch301 -p1 -%patch302 -p1 -%patch401 -p1 -%patch402 -p1 -%patch403 -p1 -%patch404 -p1 +%patch212 -p1 +%patch213 -p1 +%patch225 -p1 +%patch228 -p1 %patch405 -p1 %patch406 -p1 -%patch407 -p1 %patch501 -p1 %build