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

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