File 0001-hcnmgr-Avoid-cleanup-of-bond-interface-at-boot-time-.patch of Package powerpc-utils.20340
From 0b59d4a372aa266caa75f3b6a253b8f5aeaf3802 Mon Sep 17 00:00:00 2001
From: Mingming Cao <mmc@linux.vnet.ibm.com>
Date: Mon, 1 Mar 2021 19:34:29 -0800
Subject: [PATCH 1/4] hcnmgr: Avoid cleanup of bond interface at boot time when
no HNV exists
References: bsc#1181956 ltc#190722
Upstream: accpeted, expected v1.3.9
Git-commit: 0b59d4a372aa266caa75f3b6a253b8f5aeaf3802
At boot time, hcn scans the device tree and discovers if there was a new
HNV being added while lpar was inactive. It also cleans up the old hnv
interfaces. This patch avoids cleaning up bonding interface when no HNV
network devices exists.
Signed-off-by: Mingming Cao <mmc@linux.vnet.ibm.com>
[tyreld: fixup commit log]
Signed-off-by: Tyrel Datwyler <tyreld@linux.ibm.com>
---
scripts/hcnmgr | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/scripts/hcnmgr b/scripts/hcnmgr
index a76505e5dd6a..c95edba1216c 100644
--- a/scripts/hcnmgr
+++ b/scripts/hcnmgr
@@ -575,7 +575,13 @@ scanhcn() {
done
fi
+ if [ ${HcnIds[@]} -eq 0 ]; then
+ hcnlog DEBUG "scanhcn: scan for hybrid virtual network finished"
+ return $E_SUCCESS
+ fi
+
# Next clean up dead connections left from orgitinal LPAR after inactive miration
+ # Only do this when the HNV ID array is not empty
# list of all HCN ids
ids="${HcnIds[*]}"
--
2.26.2