Compare commits

...

No commits in common. "c8" and "c8s" have entirely different histories.
c8 ... c8s

99 changed files with 268 additions and 25 deletions

19
.gitignore vendored
View File

@ -1,12 +1,7 @@
SOURCES/ClusterLabs-resource-agents-55a4e2c9.tar.gz /*.tar.gz
SOURCES/aliyun-cli-2.1.10.tar.gz /*.rpm
SOURCES/aliyun-python-sdk-core-2.13.1.tar.gz /*.whl
SOURCES/aliyun-python-sdk-ecs-4.9.3.tar.gz /.*
SOURCES/aliyun-python-sdk-vpc-3.0.2.tar.gz /*/
SOURCES/colorama-0.3.3.tar.gz !/tests/
SOURCES/google-cloud-sdk-360.0.0-linux-x86_64.tar.gz /tests/*.retry
SOURCES/httplib2-0.20.4.tar.gz
SOURCES/pycryptodome-3.20.0.tar.gz
SOURCES/pyparsing-2.4.7-py2.py3-none-any.whl
SOURCES/pyroute2-0.4.13.tar.gz
SOURCES/urllib3-1.26.18.tar.gz

View File

@ -1,12 +0,0 @@
dfc65f4cac3f95026b2f5674019814a527333004 SOURCES/ClusterLabs-resource-agents-55a4e2c9.tar.gz
306e131d8908ca794276bfe3a0b55ccc3bbd482f SOURCES/aliyun-cli-2.1.10.tar.gz
0a56f6d9ed2014a363486d33b63eca094379be06 SOURCES/aliyun-python-sdk-core-2.13.1.tar.gz
c2a98b9a1562d223a76514f05028488ca000c395 SOURCES/aliyun-python-sdk-ecs-4.9.3.tar.gz
f14647a4d37a9a254c4e711b95a7654fc418e41e SOURCES/aliyun-python-sdk-vpc-3.0.2.tar.gz
0fe5bd8bca54dd71223778a1e0bcca9af324abb1 SOURCES/colorama-0.3.3.tar.gz
81f039cf075e9c8b70d5af99c189296a9e031de3 SOURCES/google-cloud-sdk-360.0.0-linux-x86_64.tar.gz
7caf4412d9473bf17352316249a8133fa70b7e37 SOURCES/httplib2-0.20.4.tar.gz
c55d177e9484d974c95078d4ae945f89ba2c7251 SOURCES/pycryptodome-3.20.0.tar.gz
c8307f47e3b75a2d02af72982a2dfefa3f56e407 SOURCES/pyparsing-2.4.7-py2.py3-none-any.whl
147149db11104c06d405fd077dcd2aa1c345f109 SOURCES/pyroute2-0.4.13.tar.gz
84e2852d8da1655373f7ce5e7d5d3e256b62b4e4 SOURCES/urllib3-1.26.18.tar.gz

View File

@ -0,0 +1,171 @@
From 3bffa541f7bf66e143f14e51551fc91dfebec86c Mon Sep 17 00:00:00 2001
From: Tobias Schug <happytobi@tscoding.de>
Date: Mon, 28 Oct 2024 09:14:41 +0100
Subject: [PATCH] Add azure aznfs filesystem support
---
heartbeat/Filesystem | 37 ++++++++++++++++++++-----------------
1 file changed, 20 insertions(+), 17 deletions(-)
diff --git a/heartbeat/Filesystem b/heartbeat/Filesystem
index 3405e2c26..b48bee142 100755
--- a/heartbeat/Filesystem
+++ b/heartbeat/Filesystem
@@ -2,7 +2,7 @@
#
# Support: users@clusterlabs.org
# License: GNU General Public License (GPL)
-#
+#
# Filesystem
# Description: Manages a Filesystem on a shared storage medium.
# Original Author: Eric Z. Ayers (eric.ayers@compgen.com)
@@ -142,7 +142,7 @@ meta_data() {
<longdesc lang="en">
Resource script for Filesystem. It manages a Filesystem on a
-shared storage medium.
+shared storage medium.
The standard monitor operation of depth 0 (also known as probe)
checks if the filesystem is mounted. If you want deeper tests,
@@ -260,7 +260,7 @@ currently accessing the mount directory.
"true" : Kill processes accessing mount point
"safe" : Kill processes accessing mount point using methods that
avoid functions that could potentially block during process
- detection
+ detection
"false" : Do not kill any processes.
The 'safe' option uses shell logic to walk the /procs/ directory
@@ -373,7 +373,7 @@ determine_blockdevice() {
# Get the current real device name, if possible.
# (specified devname could be -L or -U...)
case "$FSTYPE" in
- nfs4|nfs|efs|smbfs|cifs|glusterfs|ceph|tmpfs|overlay|overlayfs|rozofs|zfs|cvfs|none|lustre)
+ nfs4|nfs|aznfs|efs|smbfs|cifs|glusterfs|ceph|tmpfs|overlay|overlayfs|rozofs|zfs|cvfs|none|lustre)
: ;;
*)
match_string="${TAB}${CANONICALIZED_MOUNTPOINT}${TAB}"
@@ -455,7 +455,7 @@ is_fsck_needed() {
no) false;;
""|auto)
case "$FSTYPE" in
- ext4|ext4dev|ext3|reiserfs|reiser4|nss|xfs|jfs|vfat|fat|nfs4|nfs|efs|cifs|smbfs|ocfs2|gfs2|none|lustre|glusterfs|ceph|tmpfs|overlay|overlayfs|rozofs|zfs|cvfs)
+ ext4|ext4dev|ext3|reiserfs|reiser4|nss|xfs|jfs|vfat|fat|nfs4|nfs|aznfs|efs|cifs|smbfs|ocfs2|gfs2|none|lustre|glusterfs|ceph|tmpfs|overlay|overlayfs|rozofs|zfs|cvfs)
false;;
*)
true;;
@@ -478,7 +478,7 @@ fstype_supported()
fi
if [ -z "$FSTYPE" -o "$FSTYPE" = none ]; then
- : No FSTYPE specified, rely on the system has the right file-system support already
+ : No FSTYPE specified, rely on the system has the right file-system support already
return $OCF_SUCCESS
fi
@@ -487,6 +487,7 @@ fstype_supported()
case "$FSTYPE" in
fuse.*|glusterfs|rozofs) support="fuse";;
efs) check_binary "mount.efs"; support="nfs4";;
+ aznfs) check_binary "mount.aznfs"; support="nfs4";;
esac
if [ "$support" != "$FSTYPE" ]; then
@@ -530,7 +531,7 @@ fstype_supported()
# node on the shared storage, and is not visible yet. Then try
# partprobe to refresh /dev/disk/by-{label,uuid}/* up to date.
#
-# DEVICE can be /dev/xxx, -U, -L
+# DEVICE can be /dev/xxx, -U, -L
#
trigger_udev_rules_if_needed()
{
@@ -545,12 +546,12 @@ trigger_udev_rules_if_needed()
fi
else
tmp="$(echo $DEVICE|awk '{$1=""; print substr($0,2)}')"
- case "$DEVICE" in
- -U*|--uuid*)
- tmp="/dev/disk/by-uuid/$tmp"
+ case "$DEVICE" in
+ -U*|--uuid*)
+ tmp="/dev/disk/by-uuid/$tmp"
;;
-L*|--label*)
- tmp="/dev/disk/by-label/$tmp"
+ tmp="/dev/disk/by-label/$tmp"
;;
*)
# bind mount?
@@ -595,7 +596,7 @@ Filesystem_start()
fstype_supported || exit $OCF_ERR_INSTALLED
- # Check the filesystem & auto repair.
+ # Check the filesystem & auto repair.
# NOTE: Some filesystem types don't need this step... Please modify
# accordingly
@@ -697,7 +698,7 @@ signal_processes() {
local sig=$2
local pids pid
# fuser returns a non-zero return code if none of the
- # specified files is accessed or in case of a fatal
+ # specified files is accessed or in case of a fatal
# error.
pids=$(get_pids "$dir")
if [ -z "$pids" ]; then
@@ -745,6 +746,7 @@ fs_stop_loop() {
try_umount "$force_arg" "$SUB" && return $OCF_SUCCESS
done
}
+
fs_stop() {
local SUB="$1" timeout=$2 grace_time ret
grace_time=$((timeout/2))
@@ -797,7 +799,7 @@ Filesystem_stop()
# For networked filesystems, there's merit in trying -f:
case "$FSTYPE" in
- nfs4|nfs|efs|cifs|smbfs) umount_force="-f" ;;
+ nfs4|nfs|aznfs|efs|cifs|smbfs) umount_force="-f" ;;
esac
# Umount all sub-filesystems mounted under $MOUNTPOINT/ too.
@@ -942,6 +944,7 @@ Filesystem_monitor_20()
fi
return $OCF_SUCCESS
}
+
Filesystem_monitor()
{
Filesystem_status
@@ -1016,7 +1019,7 @@ set_blockdevice_var() {
# these are definitely not block devices
case "$FSTYPE" in
- nfs4|nfs|efs|smbfs|cifs|none|glusterfs|ceph|tmpfs|overlay|overlayfs|rozofs|zfs|cvfs|lustre) return;;
+ nfs4|nfs|aznfs|efs|smbfs|cifs|none|glusterfs|ceph|tmpfs|overlay|overlayfs|rozofs|zfs|cvfs|lustre) return;;
esac
if $(is_option "loop"); then
@@ -1098,7 +1101,7 @@ set_blockdevice_var
if [ -z "$OCF_RESKEY_directory" ]; then
if [ X$OP = "Xstart" -o $blockdevice = "no" ]; then
ocf_exit_reason "Please specify the directory"
- exit $OCF_ERR_CONFIGURED
+ exit $OCF_ERR_CONFIGURED
fi
else
MOUNTPOINT="$(echo "$OCF_RESKEY_directory" | sed 's/\/*$//')"
@@ -1166,7 +1169,7 @@ is_option "ro" &&
CLUSTERSAFE=2
case "$FSTYPE" in
-nfs4|nfs|efs|smbfs|cifs|none|gfs2|glusterfs|ceph|ocfs2|overlay|overlayfs|tmpfs|cvfs|lustre)
+nfs4|nfs|aznfs|efs|smbfs|cifs|none|gfs2|glusterfs|ceph|ocfs2|overlay|overlayfs|tmpfs|cvfs|lustre)
CLUSTERSAFE=1 # this is kind of safe too
systemd_drop_in "99-Filesystem-remote" "After" "remote-fs.target"
;;

6
gating.yaml Normal file
View File

@ -0,0 +1,6 @@
--- !Policy
product_versions:
- rhel-8
decision_context: osci_compose_gate
rules:
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional}

View File

@ -73,7 +73,7 @@
Name: resource-agents Name: resource-agents
Summary: Open Source HA Reusable Cluster Resource Scripts Summary: Open Source HA Reusable Cluster Resource Scripts
Version: 4.9.0 Version: 4.9.0
Release: 54%{?rcver:%{rcver}}%{?numcomm:.%{numcomm}}%{?alphatag:.%{alphatag}}%{?dirty:.%{dirty}}%{?dist}.12 Release: 54%{?rcver:%{rcver}}%{?numcomm:.%{numcomm}}%{?alphatag:.%{alphatag}}%{?dirty:.%{dirty}}%{?dist}.13
License: GPLv2+ and LGPLv2+ License: GPLv2+ and LGPLv2+
URL: https://github.com/ClusterLabs/resource-agents URL: https://github.com/ClusterLabs/resource-agents
%if 0%{?fedora} || 0%{?centos_version} || 0%{?rhel} %if 0%{?fedora} || 0%{?centos_version} || 0%{?rhel}
@ -171,6 +171,7 @@ Patch74: RHEL-79823-portblock-fix-version-detection.patch
Patch75: RHEL-81960-1-aws-agents-reuse-imds-token-until-it-expires.patch Patch75: RHEL-81960-1-aws-agents-reuse-imds-token-until-it-expires.patch
Patch76: RHEL-81960-2-aws-agents-reuse-imds-token-improvements.patch Patch76: RHEL-81960-2-aws-agents-reuse-imds-token-improvements.patch
Patch77: RHEL-85048-tomcat-fix-CATALINA_PID-not-set-and-parameter-defaults.patch Patch77: RHEL-85048-tomcat-fix-CATALINA_PID-not-set-and-parameter-defaults.patch
Patch78: RHEL-91257-Filesystem-add-support-for-aznfs.patch
# bundle patches # bundle patches
Patch1000: 7-gcp-bundled.patch Patch1000: 7-gcp-bundled.patch
@ -432,6 +433,7 @@ exit 1
%patch -p1 -P 75 %patch -p1 -P 75
%patch -p1 -P 76 %patch -p1 -P 76
%patch -p1 -P 77 %patch -p1 -P 77
%patch -p1 -P 78 -F2
chmod 755 heartbeat/nova-compute-wait chmod 755 heartbeat/nova-compute-wait
chmod 755 heartbeat/NovaEvacuate chmod 755 heartbeat/NovaEvacuate
@ -1021,6 +1023,11 @@ ccs_update_schema > /dev/null 2>&1 ||:
%{_usr}/lib/ocf/lib/heartbeat/OCF_*.pm %{_usr}/lib/ocf/lib/heartbeat/OCF_*.pm
%changelog %changelog
* Wed May 14 2025 Oyvind Albrigtsen <oalbrigt@redhat.com> - 4.9.0-54.13
- Filesystem: add support for aznfs
Resolves: RHEL-91257
* Fri Mar 28 2025 Oyvind Albrigtsen <oalbrigt@redhat.com> - 4.9.0-54.12 * Fri Mar 28 2025 Oyvind Albrigtsen <oalbrigt@redhat.com> - 4.9.0-54.12
- tomcat: fix CATALINA_PID not set, and catalina_base and catalina_out - tomcat: fix CATALINA_PID not set, and catalina_base and catalina_out
parameter defaults parameter defaults

22
rpminspect.yaml Normal file
View File

@ -0,0 +1,22 @@
---
xml:
# Do not try to XML-validate this DTD file
ignore:
- /usr/share/resource-agents/ra-api-1.dtd
files:
# These paths are explicitly used in this package
ignore:
- /usr/lib/ocf/resource.d/heartbeat
- /usr/lib/resource-agents
badfuncs:
# This program uses gethostbyname2, inet_aton, and inet_ntoa
ignore:
- /usr/libexec/heartbeat/send_arp
upstream:
ignore:
# these files have to be bundled in resource-agents now
- httplib2-0.20.4.tar.gz
- pyparsing-2.4.7-py2.py3-none-any.whl

12
sources Normal file
View File

@ -0,0 +1,12 @@
SHA512 (ClusterLabs-resource-agents-55a4e2c9.tar.gz) = 0b8dbf466cc4be3e165e4fb3b6a3ce93a6b49a7f4a7dc27916bfe3ec0b5de1e9df5c114d255608fb6ba1ca945ba49a4626e95cd28d6852e2e09d099d6edcb00b
SHA512 (aliyun-cli-2.1.10.tar.gz) = 1c883e1116b695ff87f81bebc506df04004d097157cd817ac8dc81a18bc4df308579c5c34b3396a90a59cd07f5d9079002295231d999fa26eaf56914ea6ede9f
SHA512 (aliyun-python-sdk-core-2.13.1.tar.gz) = c9eaccf3ed06ff2f5edc89d605511223650816ae3b192e6149f1b113d1d04c05c5220bdd588dc83024486748354436fec65fa59f5858befaa7cf9524dbb6da19
SHA512 (aliyun-python-sdk-ecs-4.9.3.tar.gz) = 83b35b7e774fa8892106f771731cc11ca823fe3d6f3e2f5bc5f075e475623573b9123e5ecb2a750d13ebcda9bc76242485636d2d3284c3eec89afcb4ec3070a4
SHA512 (aliyun-python-sdk-vpc-3.0.2.tar.gz) = e9e4f8224f828a0e0737e4515799e62e4d3808ef2985ae733c8dbe88961daae2d7524000d1ec09e6a5d7ec9491f1e29365e61a4bcfa4b6dbf5a4ec338386e209
SHA512 (colorama-0.3.3.tar.gz) = 2e960ee25f89ca4bc21fc5ab7dac12bd09c9139c4af04a5131ead31f01bb86af23e749e85dafe0bda814b032cc917ad03c0152b333eb532646603b470adbbb64
SHA512 (google-cloud-sdk-360.0.0-linux-x86_64.tar.gz) = 0e441359edd981038310c7e66ed3cbdaff1c5b24264bdebdca351ea5cbdef7b54b8d9d56ee45c713f467e65f1bc949c7f5175cd06ed16eae05bd589b187b6260
SHA512 (httplib2-0.20.4.tar.gz) = 67c553926c1e103800bf622a4bb9ee6c3222fb33526f94fc64afa7e876281551bb6e42c8fce5d956f1f64a1727a25d457d23acb26360b69493dcaa3f8991e0be
SHA512 (pycryptodome-3.20.0.tar.gz) = 9fed02190db9ae71b6895af2525d7670858817acf213c494969104da81138dacb11bc00be83b308e070a2c90766cd763e25a611ada402b32f6160a8ac9283f85
SHA512 (pyparsing-2.4.7-py2.py3-none-any.whl) = acb6b4ff90254d73804621d302926deb69bc99ffde16d7aa16cba7d0af7a53c25b7197d422309d9e82a766704fd7ea4c8b078a48d2e7d8658a8b237266fe24f5
SHA512 (pyroute2-0.4.13.tar.gz) = 7a86ef38c4892198a29b688b225df9b7fe7761a1685d7bf0430252783d93cfb13a52c82e05ba808f11b82ff3deac178585487eaa3adf77487a4e8402987fe646
SHA512 (urllib3-1.26.18.tar.gz) = c89e93a032bf6b11375c06ef7c5abc1868f93e7655cfdca09e9bd939ad415d206ea159fe151ecd2e5f725e0e18a831c7a5382ad01dbc32264154fc8af7aec156

26
tests/run_tests.sh Executable file
View File

@ -0,0 +1,26 @@
#!/bin/sh
err=0
agents=$(pcs resource list ocf:heartbeat 2>&1)
if [ $(echo "$agents" | wc -l) -lt 2 ]; then
echo "ERROR: pcs: agents available:\n$agents"
err=$((err+1))
else
echo "INFO: pcs: agents available..."
fi
for bin in aliyuncli-ra "gcloud-ra -v"; do
output="$($bin 2>&1)"
if [ $? -ne 0 ]; then
echo -e "ERROR: $bin failed:\n$output"
err=$((err+1))
else
echo "INFO: $bin works..."
fi
done
if [ $err -ge 1 ]; then
echo -e "\nERROR: $err tests FAILED..."
exit 1
fi

16
tests/tests.yml Normal file
View File

@ -0,0 +1,16 @@
- hosts: localhost
roles:
- role: standard-test-basic
tags:
- classic
- container
required_packages:
- resource-agents
- resource-agents-aliyun
- resource-agents-gcp
- pcs
tests:
- subpackage_tests:
dir: .
run: ./run_tests.sh