From 102a7191998401798ecf7f5e71ac8d21137659cc Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Tue, 7 Dec 2021 14:32:54 -0500 Subject: [PATCH] import resource-agents-4.10.0-3.el9 --- .gitignore | 2 +- .resource-agents.metadata | 2 +- .../bz1991855-nfsserver-add-nfsconvert.patch | 429 ------------------ ...39-nfsnotify-fix-notify_args-default.patch | 22 - .../bz2021125-gcp-ilb-1-fix-log_enable.patch | 29 ++ ...-2-only-check-log_cmd-if-log-enabled.patch | 51 +++ SOURCES/ha-cloud-support-aws.patch | 8 +- SPECS/resource-agents.spec | 57 ++- 8 files changed, 133 insertions(+), 467 deletions(-) delete mode 100644 SOURCES/bz1991855-nfsserver-add-nfsconvert.patch delete mode 100644 SOURCES/bz1998039-nfsnotify-fix-notify_args-default.patch create mode 100644 SOURCES/bz2021125-gcp-ilb-1-fix-log_enable.patch create mode 100644 SOURCES/bz2021125-gcp-ilb-2-only-check-log_cmd-if-log-enabled.patch diff --git a/.gitignore b/.gitignore index 5b2683b..11e610e 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/ClusterLabs-resource-agents-e76b7d3a.tar.gz +SOURCES/ClusterLabs-resource-agents-fd0720f7.tar.gz diff --git a/.resource-agents.metadata b/.resource-agents.metadata index 802a19c..d893801 100644 --- a/.resource-agents.metadata +++ b/.resource-agents.metadata @@ -1 +1 @@ -b1c1e65d690d94e080319217486f8dcd248b2a2a SOURCES/ClusterLabs-resource-agents-e76b7d3a.tar.gz +3b517ecdbe2103df77813050e5c998e102c5de7e SOURCES/ClusterLabs-resource-agents-fd0720f7.tar.gz diff --git a/SOURCES/bz1991855-nfsserver-add-nfsconvert.patch b/SOURCES/bz1991855-nfsserver-add-nfsconvert.patch deleted file mode 100644 index e955c1a..0000000 --- a/SOURCES/bz1991855-nfsserver-add-nfsconvert.patch +++ /dev/null @@ -1,429 +0,0 @@ -From 6a1e619d46d7ff04b610eb9f6e20ed41ac23b0ab Mon Sep 17 00:00:00 2001 -From: Oyvind Albrigtsen -Date: Thu, 19 Aug 2021 09:37:57 +0200 -Subject: [PATCH] tools: add nfsconvert for RHEL-based distros - ---- - .gitignore | 1 + - configure.ac | 5 + - heartbeat/nfsserver-redhat.sh | 6 + - tools/Makefile.am | 5 + - tools/nfsconvert.in | 324 ++++++++++++++++++++++++++++++++++ - 5 files changed, 341 insertions(+) - create mode 100644 tools/nfsconvert.in - -diff --git a/.gitignore b/.gitignore -index f7277bf04e..ec30a3bb00 100644 ---- a/.gitignore -+++ b/.gitignore -@@ -99,6 +99,7 @@ ldirectord/init.d/ldirectord.debian.default - ldirectord/systemd/ldirectord.service - systemd/resource-agents.conf - tools/findif -+tools/nfsconvert - tools/ocf-tester - tools/send_arp - tools/tickle_tcp -diff --git a/configure.ac b/configure.ac -index c125df98f6..058c0f1da7 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -787,11 +787,15 @@ case $host_os in - *Linux*|*linux*) sendarp_linux=1;; - esac - -+redhat_based=0 -+AC_CHECK_FILE(/etc/redhat-release, [redhat_based=1]) -+ - AC_SUBST(LIBNETLIBS) - AC_SUBST(LIBNETDEFINES) - - AM_CONDITIONAL(SENDARP_LINUX, test $sendarp_linux = 1 ) - AM_CONDITIONAL(USE_LIBNET, test "x$libnet_version" != "xnone" ) -+AM_CONDITIONAL(NFSCONVERT, test $redhat_based = 1 ) - - dnl ************************************************************************ - dnl * Check for netinet/icmp6.h to enable the IPv6addr resource agent -@@ -932,6 +936,7 @@ heartbeat/Makefile \ - systemd/Makefile \ - systemd/resource-agents.conf \ - tools/Makefile \ -+ tools/nfsconvert \ - tools/ocf-tester \ - tools/ocft/Makefile \ - tools/ocft/ocft \ -diff --git a/heartbeat/nfsserver-redhat.sh b/heartbeat/nfsserver-redhat.sh -index 73a70c186c..aec0966050 100644 ---- a/heartbeat/nfsserver-redhat.sh -+++ b/heartbeat/nfsserver-redhat.sh -@@ -1,6 +1,7 @@ - NFS_SYSCONFIG="/etc/sysconfig/nfs" - NFS_SYSCONFIG_LOCAL_BACKUP="/etc/sysconfig/nfs.ha.bu" - NFS_SYSCONFIG_AUTOGEN_TAG="AUTOGENERATED by $0 high availability resource-agent" -+NFSCONVERT="$HA_BIN/nfsconvert" - - nfsserver_redhat_meta_data() { - cat< 0 or not os.path.exists(backupfile): -+ try: -+ os.replace(SYSCONF_NFS, backupfile) -+ except OSError as err: -+ eprint("Error moving old config %s: %s" % (SYSCONF_NFS, err)) -+ raise -+ -+# Main routine -+try: -+ map_values() -+except Exception as e: -+ eprint(e) -+ eprint("Conversion failed. Please correct the error and try again.") -+ exit(1) diff --git a/SOURCES/bz1998039-nfsnotify-fix-notify_args-default.patch b/SOURCES/bz1998039-nfsnotify-fix-notify_args-default.patch deleted file mode 100644 index 75ca836..0000000 --- a/SOURCES/bz1998039-nfsnotify-fix-notify_args-default.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 1c037b3ac0288509fb2b74fb4a661a504155da15 Mon Sep 17 00:00:00 2001 -From: Oyvind Albrigtsen -Date: Thu, 26 Aug 2021 12:27:50 +0200 -Subject: [PATCH] nfsnotify: fix default value for "notify_args" - ---- - heartbeat/nfsnotify.in | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/heartbeat/nfsnotify.in b/heartbeat/nfsnotify.in -index 851f6ad6b4..fe6d2793ba 100644 ---- a/heartbeat/nfsnotify.in -+++ b/heartbeat/nfsnotify.in -@@ -33,7 +33,7 @@ - # Parameter defaults - - OCF_RESKEY_source_host_default="" --OCF_RESKEY_notify_args_default="false" -+OCF_RESKEY_notify_args_default="" - - : ${OCF_RESKEY_source_host=${OCF_RESKEY_source_host_default}} - : ${OCF_RESKEY_notify_args=${OCF_RESKEY_notify_args_default}} diff --git a/SOURCES/bz2021125-gcp-ilb-1-fix-log_enable.patch b/SOURCES/bz2021125-gcp-ilb-1-fix-log_enable.patch new file mode 100644 index 0000000..b72f3e3 --- /dev/null +++ b/SOURCES/bz2021125-gcp-ilb-1-fix-log_enable.patch @@ -0,0 +1,29 @@ +From 9a7b47f1838e9d6e3c807e9db5312097adb5c499 Mon Sep 17 00:00:00 2001 +From: Oyvind Albrigtsen +Date: Fri, 5 Nov 2021 10:30:49 +0100 +Subject: [PATCH] gcp-ilb/Squid: fix issues detected by CI + +--- + heartbeat/Squid.in | 2 +- + heartbeat/gcp-ilb | 4 ++-- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/heartbeat/gcp-ilb b/heartbeat/gcp-ilb +index 28484b241..48dc3ac4e 100755 +--- a/heartbeat/gcp-ilb ++++ b/heartbeat/gcp-ilb +@@ -53,12 +53,12 @@ pidfile="/var/run/$OCF_RESOURCE_INSTANCE.pid" + + + #Validate command for logging +-if $OCF_RESKEY_log_enable = "true"; then ++if [ $OCF_RESKEY_log_enable = "true" ]; then + if type $OCF_RESKEY_log_cmd > /dev/null 2>&1; then + logging_cmd="$OCF_RESKEY_log_cmd $OCF_RESKEY_log_params" + ocf_log debug "Logging command is: \'$logging_cmd\' " + else +- $OCF_RESKEY_log_enable = "false" ++ OCF_RESKEY_log_enable="false" + ocf_log err "\'$logging_cmd\' is invalid. External logging disabled." + + fi; diff --git a/SOURCES/bz2021125-gcp-ilb-2-only-check-log_cmd-if-log-enabled.patch b/SOURCES/bz2021125-gcp-ilb-2-only-check-log_cmd-if-log-enabled.patch new file mode 100644 index 0000000..8a7df42 --- /dev/null +++ b/SOURCES/bz2021125-gcp-ilb-2-only-check-log_cmd-if-log-enabled.patch @@ -0,0 +1,51 @@ +From 14576f7ca02fb0abff188238ac019e88ab06e878 Mon Sep 17 00:00:00 2001 +From: Oyvind Albrigtsen +Date: Tue, 9 Nov 2021 11:49:36 +0100 +Subject: [PATCH] gcp-ilb: only check if log_cmd binary is available if + log_enable is true + +--- + heartbeat/gcp-ilb | 9 +++++---- + 1 file changed, 5 insertions(+), 4 deletions(-) + +diff --git a/heartbeat/gcp-ilb b/heartbeat/gcp-ilb +index 48dc3ac4e..f84f373b7 100755 +--- a/heartbeat/gcp-ilb ++++ b/heartbeat/gcp-ilb +@@ -37,7 +37,7 @@ if type "socat" > /dev/null 2>&1; then + OCF_RESKEY_cat_default="socat" + else + OCF_RESKEY_cat_default="nc" +-fi; ++fi + + + : ${OCF_RESKEY_cat=${OCF_RESKEY_cat_default}} +@@ -53,7 +53,7 @@ pidfile="/var/run/$OCF_RESOURCE_INSTANCE.pid" + + + #Validate command for logging +-if [ $OCF_RESKEY_log_enable = "true" ]; then ++if ocf_is_true "$OCF_RESKEY_log_enable"; then + if type $OCF_RESKEY_log_cmd > /dev/null 2>&1; then + logging_cmd="$OCF_RESKEY_log_cmd $OCF_RESKEY_log_params" + ocf_log debug "Logging command is: \'$logging_cmd\' " +@@ -61,7 +61,7 @@ if [ $OCF_RESKEY_log_enable = "true" ]; then + OCF_RESKEY_log_enable="false" + ocf_log err "\'$logging_cmd\' is invalid. External logging disabled." + +- fi; ++ fi + fi + + +@@ -285,7 +285,8 @@ ilb_stop() { + + ilb_validate() { + check_binary "$OCF_RESKEY_cat" +- check_binary "$OCF_RESKEY_log_cmd" ++ ++ ocf_is_true "$OCF_RESKEY_log_enable" && check_binary "$OCF_RESKEY_log_cmd" + + if ! ocf_is_decimal "$OCF_RESKEY_port"; then + ocf_exit_reason "$OCF_RESKEY_port is not a valid port" diff --git a/SOURCES/ha-cloud-support-aws.patch b/SOURCES/ha-cloud-support-aws.patch index d858d5a..fbda111 100644 --- a/SOURCES/ha-cloud-support-aws.patch +++ b/SOURCES/ha-cloud-support-aws.patch @@ -6,7 +6,7 @@ diff --color -uNr a/heartbeat/awseip b/heartbeat/awseip # Defaults # -OCF_RESKEY_awscli_default="/usr/bin/aws" -+OCF_RESKEY_awscli_default="/usr/lib/fence-agents/support/aws/bin/aws" ++OCF_RESKEY_awscli_default="/usr/lib/fence-agents/support/awscli/bin/aws" OCF_RESKEY_profile_default="default" OCF_RESKEY_api_delay_default="3" @@ -18,7 +18,7 @@ diff --color -uNr a/heartbeat/awsvip b/heartbeat/awsvip # Defaults # -OCF_RESKEY_awscli_default="/usr/bin/aws" -+OCF_RESKEY_awscli_default="/usr/lib/fence-agents/support/aws/bin/aws" ++OCF_RESKEY_awscli_default="/usr/lib/fence-agents/support/awscli/bin/aws" OCF_RESKEY_profile_default="default" OCF_RESKEY_api_delay_default="3" @@ -30,7 +30,7 @@ diff --color -uNr a/heartbeat/aws-vpc-move-ip b/heartbeat/aws-vpc-move-ip # Defaults -OCF_RESKEY_awscli_default="/usr/bin/aws" -+OCF_RESKEY_awscli_default="/usr/lib/fence-agents/support/aws/bin/aws" ++OCF_RESKEY_awscli_default="/usr/lib/fence-agents/support/awscli/bin/aws" OCF_RESKEY_profile_default="default" OCF_RESKEY_region_default="" OCF_RESKEY_ip_default="" @@ -42,7 +42,7 @@ diff --color -uNr a/heartbeat/aws-vpc-route53.in b/heartbeat/aws-vpc-route53.in # Defaults -OCF_RESKEY_awscli_default="/usr/bin/aws" -+OCF_RESKEY_awscli_default="/usr/lib/fence-agents/support/aws/bin/aws" ++OCF_RESKEY_awscli_default="/usr/lib/fence-agents/support/awscli/bin/aws" OCF_RESKEY_profile_default="default" OCF_RESKEY_hostedzoneid_default="" OCF_RESKEY_fullname_default="" diff --git a/SPECS/resource-agents.spec b/SPECS/resource-agents.spec index d7d81e5..6b2eece 100644 --- a/SPECS/resource-agents.spec +++ b/SPECS/resource-agents.spec @@ -20,7 +20,7 @@ # %global upstream_prefix ClusterLabs-resource-agents -%global upstream_version e76b7d3a +%global upstream_version fd0720f7 # Whether this platform defaults to using systemd as an init system # (needs to be evaluated prior to BuildRequires being enumerated and @@ -44,15 +44,15 @@ Name: resource-agents Summary: Open Source HA Reusable Cluster Resource Scripts -Version: 4.8.0 -Release: 13%{?rcver:%{rcver}}%{?numcomm:.%{numcomm}}%{?alphatag:.%{alphatag}}%{?dirty:.%{dirty}}%{?dist} +Version: 4.10.0 +Release: 3%{?rcver:%{rcver}}%{?numcomm:.%{numcomm}}%{?alphatag:.%{alphatag}}%{?dirty:.%{dirty}}%{?dist} License: GPLv2+ and LGPLv2+ URL: https://github.com/ClusterLabs/resource-agents Source0: %{upstream_prefix}-%{upstream_version}.tar.gz Patch0: nova-compute-wait-NovaEvacuate.patch Patch1: bz1952005-pgsqlms-new-ra.patch -Patch2: bz1991855-nfsserver-add-nfsconvert.patch -Patch3: bz1998039-nfsnotify-fix-notify_args-default.patch +Patch2: bz2021125-gcp-ilb-1-fix-log_enable.patch +Patch3: bz2021125-gcp-ilb-2-only-check-log_cmd-if-log-enabled.patch # bundled ha-cloud-support libs Patch500: ha-cloud-support-aws.patch @@ -100,6 +100,7 @@ BuildRequires: libxslt docbook_4 docbook-xsl-stylesheets Requires: /bin/bash /usr/bin/grep /bin/sed /bin/gawk Requires: /bin/ps /usr/bin/pkill /usr/bin/hostname /usr/bin/netstat Requires: /usr/sbin/fuser /bin/mount +Requires: which # Filesystem / fs.sh / netfs.sh Requires: /sbin/fsck @@ -123,6 +124,9 @@ Requires: /usr/sbin/lvm # nfsserver / netfs.sh Requires: /usr/sbin/rpc.nfsd /sbin/rpc.statd /usr/sbin/rpc.mountd +# ocf.py +Requires: python3 + # rgmanager %if %{with rgmanager} # ip.sh @@ -145,6 +149,7 @@ License: GPLv2+ and LGPLv2+ Summary: Cloud resource agents Requires: %{name} = %{version}-%{release} Requires: ha-cloud-support +Requires: socat Provides: resource-agents-aliyun Obsoletes: resource-agents-aliyun <= %{version} Provides: resource-agents-gcp @@ -173,13 +178,13 @@ exit 1 %setup -q -n %{upstream_prefix}-%{upstream_version} %patch0 -p1 -F1 %patch1 -p1 -%patch2 -p1 -F1 +%patch2 -p1 %patch3 -p1 # bundled ha-cloud-support libs %patch500 -p1 %patch501 -p1 -%patch502 -p1 -F2 +%patch502 -p1 chmod 755 heartbeat/nova-compute-wait chmod 755 heartbeat/NovaEvacuate @@ -219,10 +224,10 @@ export CFLAGS %endif %{conf_opt_fatal} \ %if %{defined _unitdir} - --with-systemdsystemunitdir=%{_unitdir} \ + SYSTEMD_UNIT_DIR=%{_unitdir} \ %endif %if %{defined _tmpfilesdir} - --with-systemdtmpfilesdir=%{_tmpfilesdir} \ + SYSTEMD_TMPFILES_DIR=%{_tmpfilesdir} \ --with-rsctmpdir=/run/resource-agents \ %endif --with-pkg-name=%{name} \ @@ -350,6 +355,8 @@ rm -rf %{buildroot}/usr/share/doc/resource-agents %exclude %{_usr}/lib/ocf/resource.d/heartbeat/clvm %exclude %{_usr}/lib/ocf/resource.d/heartbeat/dnsupdate %exclude %{_usr}/lib/ocf/resource.d/heartbeat/docker* +%exclude %{_usr}/lib/ocf/resource.d/heartbeat/dovecot +%exclude %{_usr}/lib/ocf/resource.d/heartbeat/dummypy %exclude %{_usr}/lib/ocf/resource.d/heartbeat/eDir88 %exclude %{_usr}/lib/ocf/resource.d/heartbeat/fio %exclude %{_usr}/lib/ocf/resource.d/heartbeat/ids @@ -364,12 +371,15 @@ rm -rf %{buildroot}/usr/share/doc/resource-agents %exclude %{_usr}/lib/ocf/resource.d/heartbeat/lxd-info %exclude %{_usr}/lib/ocf/resource.d/heartbeat/machine-info %exclude %{_usr}/lib/ocf/resource.d/heartbeat/mariadb +%exclude %{_usr}/lib/ocf/resource.d/heartbeat/mdraid %exclude %{_usr}/lib/ocf/resource.d/heartbeat/minio %exclude %{_usr}/lib/ocf/resource.d/heartbeat/mpathpersist %exclude %{_usr}/lib/ocf/resource.d/heartbeat/mysql-proxy +%exclude %{_usr}/lib/ocf/resource.d/heartbeat/nvmet-* %exclude %{_usr}/lib/ocf/resource.d/heartbeat/openstack-cinder-volume %exclude %{_usr}/lib/ocf/resource.d/heartbeat/openstack-floating-ip %exclude %{_usr}/lib/ocf/resource.d/heartbeat/openstack-info +%exclude %{_usr}/lib/ocf/resource.d/heartbeat/openstack-virtual-ip %exclude %{_usr}/lib/ocf/resource.d/heartbeat/ovsmonitor %exclude %{_usr}/lib/ocf/resource.d/heartbeat/pgagent %exclude %{_usr}/lib/ocf/resource.d/heartbeat/pingd @@ -380,6 +390,7 @@ rm -rf %{buildroot}/usr/share/doc/resource-agents %exclude %{_usr}/lib/ocf/resource.d/heartbeat/scsi2reservation %exclude %{_usr}/lib/ocf/resource.d/heartbeat/sfex %exclude %{_usr}/lib/ocf/resource.d/heartbeat/sg_persist +%exclude %{_usr}/lib/ocf/resource.d/heartbeat/smb-share %exclude %{_usr}/lib/ocf/resource.d/heartbeat/syslog-ng %exclude %{_usr}/lib/ocf/resource.d/heartbeat/varnish %exclude %{_usr}/lib/ocf/resource.d/heartbeat/vmware @@ -413,6 +424,8 @@ rm -rf %{buildroot}/usr/share/doc/resource-agents %exclude %{_mandir}/man7/ocf_heartbeat_clvm.7.gz %exclude %{_mandir}/man7/ocf_heartbeat_dnsupdate.7.gz %exclude %{_mandir}/man7/ocf_heartbeat_docker*.7.gz +%exclude %{_mandir}/man7/ocf_heartbeat_dovecot.7.gz +%exclude %{_mandir}/man7/ocf_heartbeat_dummypy.7.gz %exclude %{_mandir}/man7/ocf_heartbeat_eDir88.7.gz %exclude %{_mandir}/man7/ocf_heartbeat_fio.7.gz %exclude %{_mandir}/man7/ocf_heartbeat_ids.7.gz @@ -426,12 +439,15 @@ rm -rf %{buildroot}/usr/share/doc/resource-agents %exclude %{_mandir}/man7/ocf_heartbeat_lxd-info.7.gz %exclude %{_mandir}/man7/ocf_heartbeat_machine-info.7.gz %exclude %{_mandir}/man7/ocf_heartbeat_mariadb.7.gz +%exclude %{_mandir}/man7/ocf_heartbeat_mdraid.7.gz %exclude %{_mandir}/man7/ocf_heartbeat_minio.7.gz %exclude %{_mandir}/man7/ocf_heartbeat_mpathpersist.7.gz %exclude %{_mandir}/man7/ocf_heartbeat_mysql-proxy.7.gz +%exclude %{_mandir}/man7/ocf_heartbeat_nvmet-*.7.gz %exclude %{_mandir}/man7/ocf_heartbeat_openstack-cinder-volume.7.gz %exclude %{_mandir}/man7/ocf_heartbeat_openstack-floating-ip.7.gz %exclude %{_mandir}/man7/ocf_heartbeat_openstack-info.7.gz +%exclude %{_mandir}/man7/ocf_heartbeat_openstack-virtual-ip.7.gz %exclude %{_mandir}/man7/ocf_heartbeat_ovsmonitor.7.gz %exclude %{_mandir}/man7/ocf_heartbeat_pgagent.7.gz %exclude %{_mandir}/man7/ocf_heartbeat_pingd.7.gz @@ -442,6 +458,7 @@ rm -rf %{buildroot}/usr/share/doc/resource-agents %exclude %{_mandir}/man7/ocf_heartbeat_scsi2reservation.7.gz %exclude %{_mandir}/man7/ocf_heartbeat_sfex.7.gz %exclude %{_mandir}/man7/ocf_heartbeat_sg_persist.7.gz +%exclude %{_mandir}/man7/ocf_heartbeat_smb-share.7.gz %exclude %{_mandir}/man7/ocf_heartbeat_syslog-ng.7.gz %exclude %{_mandir}/man7/ocf_heartbeat_varnish.7.gz %exclude %{_mandir}/man7/ocf_heartbeat_vmware.7.gz @@ -492,6 +509,27 @@ rm -rf %{buildroot}/usr/share/doc/resource-agents %{_usr}/lib/ocf/lib/heartbeat/OCF_*.pm %changelog +* Tue Nov 9 2021 Oyvind Albrigtsen - 4.10.0-3 +- gcp-ilb: new resource agent + + Resolves: rhbz#2021125 + +* Wed Nov 3 2021 Oyvind Albrigtsen - 4.10.0-1 +- Rebase to resource-agents 4.10.0 upstream release. +- nfsserver: add nfs_server_scope parameter + + Resolves: rhbz#1995918 + Resolves: rhbz#2015171 + +* Thu Oct 7 2021 Oyvind Albrigtsen - 4.9.0-2 +- Rebase to resource-agents 4.9.0 upstream release. +- Add "which" dependency +- All agents: set correct agent and OCF version in metadata + + Resolves: rhbz#1995918 + Resolves: rhbz#2011142 + Resolves: rhbz#2003118 + * Thu Aug 26 2021 Oyvind Albrigtsen - 4.8.0-13 - nfsnotify: fix default value for "notify_args" @@ -503,7 +541,6 @@ rm -rf %{buildroot}/usr/share/doc/resource-agents - nfsserver: fix nfs-convert issue Resolves: rhbz#1997548, rhbz#1997576, rhbz#1991855 - * Mon Aug 16 2021 Oyvind Albrigtsen - 4.8.0-11 - Filesystem: force_unmount: remove "Default value" text from metadata