Blame SOURCES/bz1819021-aws-vpc-move-ip-delete-remaining-route-entries.patch

ca2037
From 390d1cb8b057ef0e6869fb57dc1e6b6997af49f0 Mon Sep 17 00:00:00 2001
ca2037
From: Oyvind Albrigtsen <oalbrigt@redhat.com>
ca2037
Date: Fri, 3 Apr 2020 16:10:04 +0200
ca2037
Subject: [PATCH] aws-vpc-move-ip: delete remaining route entries
ca2037
ca2037
---
ca2037
 heartbeat/aws-vpc-move-ip | 4 ++++
ca2037
 1 file changed, 4 insertions(+)
ca2037
ca2037
diff --git a/heartbeat/aws-vpc-move-ip b/heartbeat/aws-vpc-move-ip
ca2037
index 97a467217..26ca6007d 100755
ca2037
--- a/heartbeat/aws-vpc-move-ip
ca2037
+++ b/heartbeat/aws-vpc-move-ip
ca2037
@@ -256,6 +256,10 @@ ec2ip_drop() {
ca2037
 		return $OCF_ERR_GENERIC
ca2037
 	fi
ca2037
 
ca2037
+	# delete remaining route-entries if any
ca2037
+	ip route show to exact ${OCF_RESKEY_ip}/32 dev $OCF_RESKEY_interface | xargs -r ip route delete
ca2037
+	ip route show table local to exact ${OCF_RESKEY_ip}/32 dev $OCF_RESKEY_interface | xargs -r ip route delete
ca2037
+
ca2037
 	return $OCF_SUCCESS
ca2037
 }
ca2037