From a38fdd3f849e58b3b3cfa556d7a8ee3891447902 Mon Sep 17 00:00:00 2001 From: zouzhimin Date: Tue, 1 Jul 2025 16:54:31 +0800 Subject: [PATCH] Filesystem: dont report warnings when creating a Filesystem resource Filesystem: fix getting the wrong block device when doing grep Filesystem: remove validate-all fstype check, as there isnt a reliable and portable way to check --- ...report-warnings-when-creating-a-File.patch | 26 ++++++++++ ...etting-the-wrong-block-device-when-d.patch | 35 ++++++++++++++ ...e-validate-all-fstype-check-as-there.patch | 48 +++++++++++++++++++ resource-agents.spec | 10 +++- 4 files changed, 118 insertions(+), 1 deletion(-) create mode 100644 backport-Filesystem-dont-report-warnings-when-creating-a-File.patch create mode 100644 backport-Filesystem-fix-getting-the-wrong-block-device-when-d.patch create mode 100644 backport-Filesystem-remove-validate-all-fstype-check-as-there.patch diff --git a/backport-Filesystem-dont-report-warnings-when-creating-a-File.patch b/backport-Filesystem-dont-report-warnings-when-creating-a-File.patch new file mode 100644 index 0000000..6b5d5c3 --- /dev/null +++ b/backport-Filesystem-dont-report-warnings-when-creating-a-File.patch @@ -0,0 +1,26 @@ +From ec35d4da4a494740f63239c1494a76d422e154c0 Mon Sep 17 00:00:00 2001 +From: Satomi OSAWA <112363662+SatomiOSAWA@users.noreply.github.com> +Date: Thu, 23 Jan 2025 18:07:20 +0900 +Subject: [PATCH] Filesystem: dont report warnings when creating a Filesystem + resource + +--- + heartbeat/Filesystem | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/heartbeat/Filesystem b/heartbeat/Filesystem +index b48bee14..0c43220d 100755 +--- a/heartbeat/Filesystem ++++ b/heartbeat/Filesystem +@@ -1145,7 +1145,7 @@ check_binary $FSCK + check_binary $MOUNT + check_binary $UMOUNT + +-if [ "$OP" != "monitor" ]; then ++if [ "$OP" != "monitor" ] && [ "$OP" != "validate-all" ]; then + ocf_log info "Running $OP for $DEVICE on $MOUNTPOINT" + fi + +-- +2.25.1 + diff --git a/backport-Filesystem-fix-getting-the-wrong-block-device-when-d.patch b/backport-Filesystem-fix-getting-the-wrong-block-device-when-d.patch new file mode 100644 index 0000000..3ce49ea --- /dev/null +++ b/backport-Filesystem-fix-getting-the-wrong-block-device-when-d.patch @@ -0,0 +1,35 @@ +From 843c3b6f3bc4d2d60fd2c4dccbf00c10f29c5894 Mon Sep 17 00:00:00 2001 +From: Lidong Zhong +Date: Fri, 25 Apr 2025 14:24:41 +0800 +Subject: [PATCH] Filesystem: fix getting the wrong block device when doing + grep + +If we have such a filesystem structure mounted in our cluster +/dev/drbd50 /export/prq/upgrade_emspq xfs +/dev/drbd55 /export/prq/upgrade_sharedmsb xfs +/dev/drbd1 /export/devAGN/share xfs +/dev/drbd5 /export/dev/archivesn1agn xfs + +When we want to stop the filesystem mounted on +/export/dev/archivesn1agn, we probably will get the wrong entry returned +here and thus will try to stop the wrong target. +--- + heartbeat/Filesystem | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/heartbeat/Filesystem b/heartbeat/Filesystem +index 0c43220d..d10e5a71 100755 +--- a/heartbeat/Filesystem ++++ b/heartbeat/Filesystem +@@ -408,7 +408,7 @@ list_bindmounts() { + fi + + if [ -b "$mount_disk" ]; then +- list_mounts | grep "$mount_disk" | grep -v "$match_string" | cut -d"$TAB" -f2 | sort -r ++ list_mounts | grep -w "$mount_disk" | grep -v "$match_string" | cut -d"$TAB" -f2 | sort -r + fi + } + +-- +2.25.1 + diff --git a/backport-Filesystem-remove-validate-all-fstype-check-as-there.patch b/backport-Filesystem-remove-validate-all-fstype-check-as-there.patch new file mode 100644 index 0000000..3ca7085 --- /dev/null +++ b/backport-Filesystem-remove-validate-all-fstype-check-as-there.patch @@ -0,0 +1,48 @@ +From 08c5b856a671b1583d3547dd76faf8a907485a12 Mon Sep 17 00:00:00 2001 +From: Oyvind Albrigtsen +Date: Thu, 19 Jun 2025 13:11:29 +0200 +Subject: [PATCH] Filesystem: remove validate-all fstype check, as there isnt a + reliable and portable way to check + +This check cause Warnings and might cause errors in future pcs versions +when running "pcs resource create". + +Example: +Warning: Validating resource options using the resource agent itself is enabled by default and produces warnings. In a future version, this might be changed to errors. Specify --agent-validation to switch to the future behavior. +Warning: Validation result from agent: + Jun 19 06:13:45 INFO: It seems we do not have ext3 support +--- + heartbeat/Filesystem | 17 ----------------- + 1 file changed, 17 deletions(-) + +diff --git a/heartbeat/Filesystem b/heartbeat/Filesystem +index d10e5a71..6d396016 100755 +--- a/heartbeat/Filesystem ++++ b/heartbeat/Filesystem +@@ -978,23 +978,6 @@ Filesystem_monitor() + # + Filesystem_validate_all() + { +- # Check if the $FSTYPE is workable +- # NOTE: Without inserting the $FSTYPE module, this step may be imprecise +- # TODO: This is Linux specific crap. +- if [ ! -z "$FSTYPE" -a "$FSTYPE" != none ]; then +- cut -f2 /proc/filesystems | grep "^${FSTYPE}$" >/dev/null 2>&1 +- if [ $? -ne 0 ]; then +- modpath=/lib/modules/$(uname -r) +- moddep=$modpath/modules.dep +- # Do we have $FSTYPE in modules.dep? +- cut -d' ' -f1 $moddep \ +- | grep "^${modpath}.*${FSTYPE}\.k\?o:$" >/dev/null 2>&1 +- if [ $? -ne 0 ]; then +- ocf_log info "It seems we do not have $FSTYPE support" +- fi +- fi +- fi +- + # If we are supposed to do monitoring with status files, then + # we need a utility to write in O_DIRECT mode. + if [ $OCF_CHECK_LEVEL -gt 0 ]; then +-- +2.25.1 + diff --git a/resource-agents.spec b/resource-agents.spec index 40c5370..4342d3d 100644 --- a/resource-agents.spec +++ b/resource-agents.spec @@ -1,7 +1,7 @@ Name: resource-agents Summary: Open Source HA Reusable Cluster Resource Scripts Version: 4.16.0 -Release: 6 +Release: 7 License: GPLv2+ and LGPLv2+ URL: https://github.com/ClusterLabs/resource-agents Source0: https://github.com/ClusterLabs/resource-agents/releases/tag/v%{version}.tar.gz @@ -13,6 +13,9 @@ Patch0004: backport-aws.sh-chmod-600-TOKEN_FILE-add-get_instance_id-wi Patch0005: backport-aws.sh-ocf-shellfuncs-add-ability-to-fresh-token-if-.patch Patch0006: backport-aws.sh-add-get_interface_mac.patch Patch0007: backport-awsvip-let-user-specify-which-interface-to-use-and-m.patch +Patch0008: backport-Filesystem-dont-report-warnings-when-creating-a-File.patch +Patch0009: backport-Filesystem-fix-getting-the-wrong-block-device-when-d.patch +Patch0010: backport-Filesystem-remove-validate-all-fstype-check-as-there.patch Obsoletes: heartbeat-resources <= %{version} Provides: heartbeat-resources = %{version} BuildRequires: automake autoconf pkgconfig gcc perl-interpreter perl-generators python3-devel @@ -110,6 +113,11 @@ export CFLAGS="$(echo '%{optflags}')" %{_mandir}/man8/{ocf-tester.8*,ldirectord.8*} %changelog +* Fri Aug 22 2025 zouzhimin - 4.16.0-7 +- Filesystem: dont report warnings when creating a Filesystem resource +- Filesystem: fix getting the wrong block device when doing grep +- Filesystem: remove validate-all fstype check, as there isnt a reliable and portable way to check + * Wed Jul 2 2025 wubijie123 - 4.16.0-6 - Type:cves - ID:CVE-2024-47081 -- Gitee