69a67cf354
Resolves: RHEL-40720
61 lines
1.9 KiB
Diff
61 lines
1.9 KiB
Diff
From 9dc93c146edc904151f7a67aa3e4136b5a5392b5 Mon Sep 17 00:00:00 2001
|
|
From: Oyvind Albrigtsen <oalbrigt@redhat.com>
|
|
Date: Tue, 18 Jun 2024 10:42:24 +0200
|
|
Subject: [PATCH 1/2] apache/http-mon.sh: dont use -L for wget2 as it's not
|
|
implemented yet
|
|
|
|
---
|
|
heartbeat/http-mon.sh | 4 +++-
|
|
1 file changed, 3 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/heartbeat/http-mon.sh b/heartbeat/http-mon.sh
|
|
index ce13ccd39a..ddd79c1f92 100644
|
|
--- a/heartbeat/http-mon.sh
|
|
+++ b/heartbeat/http-mon.sh
|
|
@@ -21,7 +21,7 @@ if ocf_is_true "$OCF_RESKEY_use_ipv6" || echo "$STATUSURL" | grep -qs "::"; then
|
|
bind_address="::1"
|
|
curl_ipv6_opts="-g"
|
|
fi
|
|
-WGETOPTS="-O- -q -L --no-proxy --bind-address=$bind_address"
|
|
+WGETOPTS="-O- -q --no-proxy --bind-address=$bind_address"
|
|
CURLOPTS="-o - -Ss -L --interface lo $curl_ipv6_opts"
|
|
|
|
request_url_header() {
|
|
@@ -58,6 +58,8 @@ curl_func() {
|
|
fi
|
|
}
|
|
wget_func() {
|
|
+ # -L not implemented in wget2
|
|
+ wget -V | grep -q "^GNU Wget2 " || WGETOPTS="$WGETOPTS -L"
|
|
auth=""
|
|
cl_opts="$WGETOPTS $test_httpclient_opts"
|
|
[ x != "x$test_user" ] &&
|
|
|
|
From b2ca07d84f023623eed6d81edb26eb3dd597e7e3 Mon Sep 17 00:00:00 2001
|
|
From: Oyvind Albrigtsen <oalbrigt@redhat.com>
|
|
Date: Wed, 26 Jun 2024 16:05:24 +0200
|
|
Subject: [PATCH 2/2] apache/http-mon.sh: prefer curl due to new wget2 issues,
|
|
including not being able to resolve hostnames from /etc/hosts
|
|
|
|
---
|
|
heartbeat/http-mon.sh | 4 ++--
|
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/heartbeat/http-mon.sh b/heartbeat/http-mon.sh
|
|
index ddd79c1f92..44ca8968e1 100644
|
|
--- a/heartbeat/http-mon.sh
|
|
+++ b/heartbeat/http-mon.sh
|
|
@@ -79,10 +79,10 @@ findhttpclient() {
|
|
# prefer wget (for historical reasons)
|
|
if [ "x$CLIENT" != x ] && which "$CLIENT" >/dev/null 2>&1; then
|
|
echo "$CLIENT"
|
|
- elif which wget >/dev/null 2>&1; then
|
|
- echo "wget"
|
|
elif which curl >/dev/null 2>&1; then
|
|
echo "curl"
|
|
+ elif which wget >/dev/null 2>&1; then
|
|
+ echo "wget"
|
|
else
|
|
return 1
|
|
fi
|