From bb66af29e4d486a66f4c1958fb755ee82098ab6f Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Nov 12 2020 10:10:26 +0000 Subject: import resource-agents-4.1.1-74.el8 --- diff --git a/SOURCES/bz1895811-aws-vpc-move-ip-dont-warn-for-expected-scenarios.patch b/SOURCES/bz1895811-aws-vpc-move-ip-dont-warn-for-expected-scenarios.patch new file mode 100644 index 0000000..385e034 --- /dev/null +++ b/SOURCES/bz1895811-aws-vpc-move-ip-dont-warn-for-expected-scenarios.patch @@ -0,0 +1,84 @@ +From 8d459216c9718269303b9caf227a971d73ec4df9 Mon Sep 17 00:00:00 2001 +From: Reid Wahl +Date: Thu, 27 Aug 2020 01:34:01 -0700 +Subject: [PATCH] aws-vpc-move-ip: Don't warn for expected scenarios + +Make log levels more appropriate to the situation. Before this patch, a +normal start looked like this: + +Operation start for aws-vip (ocf:heartbeat:aws-vpc-move-ip) returned: 'ok' (0) + > stderr: Nov 09 02:38:20 INFO: EC2: Moving IP address 10.0.1.65 to this host by adjusting routing table rtb-01b4ea1ae0ec0a4d9 + > stderr: Nov 09 02:38:20 INFO: monitor: check routing table (API call) - rtb-01b4ea1ae0ec0a4d9 + > stderr: Nov 09 02:38:22 WARNING: IP 10.0.1.65 not assigned to running interface + > stderr: Nov 09 02:38:22 INFO: EC2: Adjusting routing table and locally configuring IP address + > stderr: RTNETLINK answers: Cannot assign requested address + > stderr: Nov 09 02:38:24 WARNING: command failed, rc 2 + > stderr: Nov 09 02:38:24 INFO: monitor: check routing table (API call) - rtb-01b4ea1ae0ec0a4d9 + +Now it looks like this: + +Operation start for aws-vip (ocf:heartbeat:aws-vpc-move-ip) returned: 'ok' (0) + > stderr: Nov 09 02:40:43 INFO: EC2: Moving IP address 10.0.1.65 to this host by adjusting routing table rtb-01b4ea1ae0ec0a4d9 + > stderr: Nov 09 02:40:43 INFO: monitor: check routing table (API call) - rtb-01b4ea1ae0ec0a4d9 + > stderr: Nov 09 02:40:44 INFO: IP 10.0.1.65 not assigned to running interface + > stderr: Nov 09 02:40:44 INFO: EC2: Adjusting routing table and locally configuring IP address + > stderr: Nov 09 02:40:46 INFO: monitor: check routing table (API call) - rtb-01b4ea1ae0ec0a4d9 + +Under normal circumstances, the call to `ec2ip_drop()` within +`ec2ip_get_and_configure` should not be required at all. The drop +function deletes the address before the get_and_configure function +immediately re-adds the address. This call could probably be removed +altogether. Instead, I left the call and silenced its output just in +case of unexpected edge cases. + +Resolves: RHBZ#1895811 + +Signed-off-by: Reid Wahl +--- + heartbeat/aws-vpc-move-ip | 23 ++++++++++++++++++++--- + 1 file changed, 20 insertions(+), 3 deletions(-) + +diff --git a/heartbeat/aws-vpc-move-ip b/heartbeat/aws-vpc-move-ip +index a5b28ad92..72a89ecb1 100755 +--- a/heartbeat/aws-vpc-move-ip ++++ b/heartbeat/aws-vpc-move-ip +@@ -270,7 +270,13 @@ ec2ip_monitor() { + ocf_log debug "executing command: $cmd" + RESULT=$($cmd | grep "$OCF_RESKEY_ip") + if [ -z "$RESULT" ]; then +- ocf_log warn "IP $OCF_RESKEY_ip not assigned to running interface" ++ if [ "$__OCF_ACTION" = "monitor" ] && ! ocf_is_probe; then ++ level="error" ++ else ++ level="info" ++ fi ++ ++ ocf_log "$level" "IP $OCF_RESKEY_ip not assigned to running interface" + return $OCF_NOT_RUNNING + fi + +@@ -282,11 +288,22 @@ ec2ip_monitor() { + ec2ip_drop() { + cmd="ip addr delete ${OCF_RESKEY_ip}/32 dev $OCF_RESKEY_interface" + ocf_log debug "executing command: $cmd" +- $cmd ++ output=$($cmd 2>&1) + rc=$? ++ + if [ "$rc" -gt 0 ]; then +- ocf_log warn "command failed, rc $rc" ++ if [ "$__OCF_ACTION" = "start" ]; then ++ # expected to fail during start ++ level="debug" ++ else ++ level="warn" ++ fi ++ ++ ocf_log "$level" "command failed, rc $rc" ++ ocf_log "$level" "output/error: $output" + return $OCF_ERR_GENERIC ++ else ++ ocf_log debug "output/error: $output" + fi + + # delete remaining route-entries if any diff --git a/SPECS/resource-agents.spec b/SPECS/resource-agents.spec index 329e751..0e656e8 100644 --- a/SPECS/resource-agents.spec +++ b/SPECS/resource-agents.spec @@ -70,7 +70,7 @@ Name: resource-agents Summary: Open Source HA Reusable Cluster Resource Scripts Version: 4.1.1 -Release: 73%{?rcver:%{rcver}}%{?numcomm:.%{numcomm}}%{?alphatag:.%{alphatag}}%{?dirty:.%{dirty}}%{?dist} +Release: 74%{?rcver:%{rcver}}%{?numcomm:.%{numcomm}}%{?alphatag:.%{alphatag}}%{?dirty:.%{dirty}}%{?dist} License: GPLv2+ and LGPLv2+ URL: https://github.com/ClusterLabs/resource-agents %if 0%{?fedora} || 0%{?centos_version} || 0%{?rhel} @@ -252,6 +252,7 @@ Patch160: bz1891855-galera-recover-2-node-cluster.patch Patch161: bz1471182-crypt-1-new-ra.patch Patch162: bz1471182-crypt-2-fix-bashism.patch Patch163: bz1471182-crypt-3-fix-missing-and.patch +Patch164: bz1895811-aws-vpc-move-ip-dont-warn-for-expected-scenarios.patch # bundle patches Patch1000: 7-gcp-bundled.patch @@ -571,6 +572,7 @@ exit 1 %patch161 -p1 %patch162 -p1 %patch163 -p1 +%patch164 -p1 chmod 755 heartbeat/nova-compute-wait chmod 755 heartbeat/NovaEvacuate @@ -1134,6 +1136,11 @@ ccs_update_schema > /dev/null 2>&1 ||: %endif %changelog +* Wed Nov 11 2020 Oyvind Albrigtsen - 4.1.1-74 +- aws-vpc-move-ip: don't warn for expected scenarios + + Resolves: rhbz#1895811 + * Mon Nov 2 2020 Oyvind Albrigtsen - 4.1.1-73 - crypt: new resource agent