Fix PRIMARY_IFACE variable
This commit is contained in:
parent
a47da25029
commit
ea917251ec
26
Fix-PRIMARY_IFACE-variable.patch
Normal file
26
Fix-PRIMARY_IFACE-variable.patch
Normal file
@ -0,0 +1,26 @@
|
||||
From 51d252f46df079460eb21d282e2390f0ad9c5ff8 Mon Sep 17 00:00:00 2001
|
||||
From: Lorenzo Garuti <garuti.lorenzo@gmail.com>
|
||||
Date: Wed, 25 Oct 2023 09:51:14 +0000
|
||||
Subject: [PATCH] Fix PRIMARY_IFACE variable. In some cases ip returns two
|
||||
lines
|
||||
|
||||
---
|
||||
heartbeat/ocivip | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/heartbeat/ocivip b/heartbeat/ocivip
|
||||
index 053646dc..f146807d 100755
|
||||
--- a/heartbeat/ocivip
|
||||
+++ b/heartbeat/ocivip
|
||||
@@ -221,7 +221,7 @@ SECONDARY_PRIVATE_IP="${OCF_RESKEY_secondary_private_ip}"
|
||||
CIDR_NETMASK="${OCF_RESKEY_cidr_netmask}"
|
||||
INTERFACE_ALIAS="${OCF_RESKEY_interface_alias}"
|
||||
VNIC_ID="$(curl -s -H "Authorization: Bearer Oracle" -L http://169.254.169.254/opc/v2/vnics/ | jq -r '.[0].vnicId')"
|
||||
-PRIMARY_IFACE=$(ip -4 route ls | grep default | grep -Po '(?<=dev )(\S+)')
|
||||
+PRIMARY_IFACE=$(ip -4 route ls | grep default | grep -Po '(?<=dev )(\S+)' | head -n1)
|
||||
|
||||
case $__OCF_ACTION in
|
||||
start)
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@ -1,11 +1,12 @@
|
||||
Name: resource-agents
|
||||
Summary: Open Source HA Reusable Cluster Resource Scripts
|
||||
Version: 4.13.0
|
||||
Release: 1
|
||||
Release: 2
|
||||
License: GPLv2+ and LGPLv2+
|
||||
URL: https://github.com/ClusterLabs/resource-agents
|
||||
Source0: https://github.com/ClusterLabs/resource-agents/archive/v%{version}.tar.gz
|
||||
Patch0000: fix-failed-to-parse-pid-from-pid-file.patch
|
||||
Patch0001: Fix-PRIMARY_IFACE-variable.patch
|
||||
Obsoletes: heartbeat-resources <= %{version}
|
||||
Provides: heartbeat-resources = %{version}
|
||||
BuildRequires: automake autoconf pkgconfig gcc perl-interpreter perl-generators python3-devel
|
||||
@ -103,6 +104,9 @@ export CFLAGS="$(echo '%{optflags}')"
|
||||
%{_mandir}/man8/{ocf-tester.8*,ldirectord.8*}
|
||||
|
||||
%changelog
|
||||
* Fri Oct 27 2023 zouzhimin <zouzhimin@kylinos.cn> - 4.13.0-2
|
||||
- Fix PRIMARY_IFACE variable
|
||||
|
||||
* Wed Oct 18 2023 yaoxin <yao_xin001@hoperun.com> - 4.13.0-1
|
||||
- Upgrade to 4.13.0
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user