From f5261364f250c0164dbe6b440fa35627bd4a4105 Mon Sep 17 00:00:00 2001 From: liupei Date: Fri, 25 Oct 2024 14:09:41 +0800 Subject: [PATCH] http-mon.sh: change curl opts to match wget & doc curl as preferred client --- ...on_sh-change-curl-opts-to-match-wget.patch | 29 +++++++++++++++++++ ...-mon_sh-doc-curl-as-preferred-client.patch | 25 ++++++++++++++++ resource-agents.spec | 8 ++++- 3 files changed, 61 insertions(+), 1 deletion(-) create mode 100644 backport-apache-http-mon_sh-change-curl-opts-to-match-wget.patch create mode 100644 backport-apache-http-mon_sh-doc-curl-as-preferred-client.patch diff --git a/backport-apache-http-mon_sh-change-curl-opts-to-match-wget.patch b/backport-apache-http-mon_sh-change-curl-opts-to-match-wget.patch new file mode 100644 index 0000000..a19ec69 --- /dev/null +++ b/backport-apache-http-mon_sh-change-curl-opts-to-match-wget.patch @@ -0,0 +1,29 @@ +From 72f8ce893664640745ff277247e7be7fddfd20e7 Mon Sep 17 00:00:00 2001 +From: Athos Ribeiro +Date: Wed, 4 Sep 2024 17:38:47 -0300 +Subject: [PATCH 05/17] apache/http-mon.sh: change curl opts to match wget + +curl was recently moved to be de default http client, deprecating wget, +the former preferred one. However, the curl options being used differ +from the ones set for wget, changing the behavior of the agents using +the monitor when using one or the other client. +--- + heartbeat/http-mon.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/heartbeat/http-mon.sh b/heartbeat/http-mon.sh +index 44ca8968..163d70d1 100644 +--- a/heartbeat/http-mon.sh ++++ b/heartbeat/http-mon.sh +@@ -22,7 +22,7 @@ if ocf_is_true "$OCF_RESKEY_use_ipv6" || echo "$STATUSURL" | grep -qs "::"; then + curl_ipv6_opts="-g" + fi + WGETOPTS="-O- -q --no-proxy --bind-address=$bind_address" +-CURLOPTS="-o - -Ss -L --interface lo $curl_ipv6_opts" ++CURLOPTS="-o - -Ss -L --noproxy '*' --interface $bind_address $curl_ipv6_opts" + + request_url_header() { + which curl >/dev/null 2>&1 +-- +2.33.1.windows.1 + diff --git a/backport-apache-http-mon_sh-doc-curl-as-preferred-client.patch b/backport-apache-http-mon_sh-doc-curl-as-preferred-client.patch new file mode 100644 index 0000000..be57190 --- /dev/null +++ b/backport-apache-http-mon_sh-doc-curl-as-preferred-client.patch @@ -0,0 +1,25 @@ +From d0f94298153658f384e2d2c45e4c6f6b158582ec Mon Sep 17 00:00:00 2001 +From: Athos Ribeiro +Date: Wed, 4 Sep 2024 18:06:38 -0300 +Subject: [PATCH 06/17] apache/http-mon.sh: doc curl as preferred client + +--- + heartbeat/http-mon.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/heartbeat/http-mon.sh b/heartbeat/http-mon.sh +index 163d70d1..b10930a0 100644 +--- a/heartbeat/http-mon.sh ++++ b/heartbeat/http-mon.sh +@@ -76,7 +76,7 @@ userdefined() { + # find a good http client + # + findhttpclient() { +- # prefer wget (for historical reasons) ++ # prefer curl (see b2ca07d) + if [ "x$CLIENT" != x ] && which "$CLIENT" >/dev/null 2>&1; then + echo "$CLIENT" + elif which curl >/dev/null 2>&1; then +-- +2.33.1.windows.1 + diff --git a/resource-agents.spec b/resource-agents.spec index f1334d3..3d0bc69 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.15.1 -Release: 7 +Release: 8 License: GPLv2+ and LGPLv2+ URL: https://github.com/ClusterLabs/resource-agents Source0: https://github.com/ClusterLabs/resource-agents/archive/v%{version}.tar.gz @@ -18,6 +18,8 @@ Patch8: backport-Filesystem-dont-sleep-during-stop-action-when-ther Patch9: backport-powervs-subnet-Enable-access-via-private-endpoint-fo.patch Patch10: backport-IPaddr2-add-proto-parameter-to-be-able-to-match-a-sp.patch Patch11: backport-podman-Improve-handling-of-stopping-container-remova.patch +Patch12: backport-apache-http-mon_sh-change-curl-opts-to-match-wget.patch +Patch13: backport-apache-http-mon_sh-doc-curl-as-preferred-client.patch Obsoletes: heartbeat-resources <= %{version} Provides: heartbeat-resources = %{version} @@ -116,6 +118,10 @@ export CFLAGS="$(echo '%{optflags}')" %{_mandir}/man8/{ocf-tester.8*,ldirectord.8*} %changelog +* Fri Oct 25 2024 liupei - 4.15.1-8 +- apache/http-mon.sh: change curl opts to match wget +- apache/http-mon.sh: doc curl as preferred client + * Fri Oct 25 2024 bixiaoyan - 4.15.1-7 - IPaddr2: add a check to make sure the label got applied - podman: Improve handling of "stopping" container removal in remove_container() -- Gitee