fixed numa-header in Makefile
This commit is contained in:
parent
854f31397d
commit
e3f1a6d00a
@ -1,96 +0,0 @@
|
|||||||
commit bfabc531021ee9cfc4c8dd83803e9daf7e45d91e
|
|
||||||
Author: Mingming Cao <mmc@linux.vnet.ibm.com>
|
|
||||||
Date: Thu Jan 28 12:49:07 2021 -0800
|
|
||||||
|
|
||||||
Fix boot-time bonding interface cleanup and avoid use ifcfg
|
|
||||||
|
|
||||||
This patch fix three issues
|
|
||||||
1) Avoid cleanup bond interface at the boot time when there is no HNV exists
|
|
||||||
|
|
||||||
2) Using nmcli instead of ifconfig file to check bond configuration as it
|
|
||||||
has been officially deprecated. This makes HNV configure bonding
|
|
||||||
indpendant of where bonding cfg file located.
|
|
||||||
|
|
||||||
3) At the time of calling ofpathname to look up for devicename, wait
|
|
||||||
for sys fs device ready. Otherwise the OS may in the middle of device
|
|
||||||
renaming.
|
|
||||||
|
|
||||||
Signed-off-by: Mingming Cao <mmc@linux.vnet.ibm.com>
|
|
||||||
|
|
||||||
diff --git a/scripts/hcnmgr b/scripts/hcnmgr
|
|
||||||
index a76505e..e4b56d6 100644
|
|
||||||
--- a/scripts/hcnmgr
|
|
||||||
+++ b/scripts/hcnmgr
|
|
||||||
@@ -241,7 +241,10 @@ get_dev_hcn() {
|
|
||||||
# Let's retry a few times.
|
|
||||||
while [ $wait != 0 ]; do
|
|
||||||
if DEVNAME=$(ofpathname -l "$(echo "$1" | sed -e "s/\/proc\/device-tree//")" 2>/dev/null); then
|
|
||||||
- break
|
|
||||||
+ if [ -e /sys/class/net/"$DEVNAME" ]; then
|
|
||||||
+ hcnlog DEBUG "ofpathname waiting for /sys/class/net device $DEVNAME ready"
|
|
||||||
+ break
|
|
||||||
+ fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
hcnlog DEBUG "ofpathname return $?, devname is $DEVNAME rety counter $wait"
|
|
||||||
@@ -278,9 +281,7 @@ do_config_vdevice() {
|
|
||||||
BOND_PATH=$BOND_BASEPATH/$BONDNAME/bonding
|
|
||||||
|
|
||||||
hcnlog DEBUG "Check if there is bond $BONDNAME with hcn id $HCNID"
|
|
||||||
-
|
|
||||||
- hcnlog DEBUG "ifconfig file $IFCONFIG_PATH/ifconfig-$BONDNAME"
|
|
||||||
- if [ ! -e "$IFCONFIG_PATH/ifcfg-$BONDNAME" ]; then
|
|
||||||
+ if ! nmcli -f NAME con show --active | grep -q "$BONDNAME\s"; then
|
|
||||||
hcnlog INFO "nmcli con add type bond con-name $BONDNAME ifname $BONDNAME"
|
|
||||||
nmcli con add type bond con-name "$BONDNAME" ifname "$BONDNAME"
|
|
||||||
|
|
||||||
@@ -375,7 +376,10 @@ rmhcn() {
|
|
||||||
fi
|
|
||||||
|
|
||||||
hcnlog INFO "rmhcn: delete bond $BONDNAME and slaves "
|
|
||||||
- nmcli -f NAME con show | grep "$BONDNAME" | xargs sudo nmcli con delete
|
|
||||||
+ for connection in $(nmcli -f NAME con show | grep "$BONDNAME"); do
|
|
||||||
+ hcnlog INFO "Delete bonding connection $connection"
|
|
||||||
+ nmcli con delete "$connection"
|
|
||||||
+ done
|
|
||||||
hcnlog DEBUG "rmhcn: exit"
|
|
||||||
return $E_SUCCESS
|
|
||||||
}
|
|
||||||
@@ -576,19 +580,24 @@ scanhcn() {
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Next clean up dead connections left from orgitinal LPAR after inactive miration
|
|
||||||
-
|
|
||||||
- # list of all HCN ids
|
|
||||||
- ids="${HcnIds[*]}"
|
|
||||||
- # After inactive migration, LPAR may have old bonding connections
|
|
||||||
- # with network device on original LPAR
|
|
||||||
- # clean up dead bonding connections
|
|
||||||
- for connection in $(nmcli -f NAME con show | grep "${ids// /\\|}"); do
|
|
||||||
- dev=$(echo "$connection" | cut -d '-' -f 2)
|
|
||||||
- if [[ $dev != "NAME" && ! -e /sys/class/net/"$dev" ]]; then
|
|
||||||
- hcnlog INFO "Delete dead bonding connection $connection"
|
|
||||||
- nmcli con delete "$connection"
|
|
||||||
- fi
|
|
||||||
- done
|
|
||||||
+ # Only do this when the HNV ID array is not empty
|
|
||||||
+
|
|
||||||
+ if [[ ${HcnIds[[@]} ]]; then
|
|
||||||
+ hcnlog INFO "hcnscan finished. Found HNV devices on this LPAR"
|
|
||||||
+
|
|
||||||
+ # list of all HCN ids
|
|
||||||
+ ids="${HcnIds[*]}"
|
|
||||||
+ # After inactive migration, LPAR may have old bonding connections
|
|
||||||
+ # with network device on original LPAR
|
|
||||||
+ # clean up dead bonding connections
|
|
||||||
+ for connection in $(nmcli -f NAME con show | grep "${ids// /\\|}"); do
|
|
||||||
+ dev=$(echo "$connection" | cut -d '-' -f 2)
|
|
||||||
+ if [[ $dev != "NAME" && ! -e /sys/class/net/"$dev" ]]; then
|
|
||||||
+ hcnlog INFO "Delete dead bonding connection $connection"
|
|
||||||
+ nmcli con delete "$connection"
|
|
||||||
+ fi
|
|
||||||
+ done
|
|
||||||
+ fi
|
|
||||||
|
|
||||||
hcnlog DEBUG "scanhcn: scan for hybrid virtual network finished"
|
|
||||||
}
|
|
11
powerpc-utils-1.3.8-numa-header.patch
Normal file
11
powerpc-utils-1.3.8-numa-header.patch
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
diff -up powerpc-utils-1.3.8/Makefile.am.me powerpc-utils-1.3.8/Makefile.am
|
||||||
|
--- powerpc-utils-1.3.8/Makefile.am.me 2021-05-31 15:24:26.031343026 +0200
|
||||||
|
+++ powerpc-utils-1.3.8/Makefile.am 2021-05-31 15:25:50.818195810 +0200
|
||||||
|
@@ -182,7 +182,6 @@ noinst_HEADERS += \
|
||||||
|
src/drmgr/drcpu.h \
|
||||||
|
src/drmgr/dr.h \
|
||||||
|
src/drmgr/drmem.h \
|
||||||
|
- src/drmgr/numa.h \
|
||||||
|
src/drmgr/drpci.h \
|
||||||
|
src/drmgr/rtas_calls.h \
|
||||||
|
src/drmgr/ofdt.h \
|
@ -1,6 +1,6 @@
|
|||||||
Name: powerpc-utils
|
Name: powerpc-utils
|
||||||
Version: 1.3.8
|
Version: 1.3.8
|
||||||
Release: 8%{?dist}
|
Release: 9%{?dist}
|
||||||
Summary: PERL-based scripts for maintaining and servicing PowerPC systems
|
Summary: PERL-based scripts for maintaining and servicing PowerPC systems
|
||||||
|
|
||||||
License: GPLv2
|
License: GPLv2
|
||||||
@ -19,6 +19,7 @@ BuildRequires: librtas-devel >= 1.4.0
|
|||||||
BuildRequires: libservicelog-devel >= 1.0.1-2
|
BuildRequires: libservicelog-devel >= 1.0.1-2
|
||||||
BuildRequires: perl-generators
|
BuildRequires: perl-generators
|
||||||
BuildRequires: systemd
|
BuildRequires: systemd
|
||||||
|
BuildRequires: numactl-devel
|
||||||
|
|
||||||
# rtas_dump explicit dependency
|
# rtas_dump explicit dependency
|
||||||
Requires: perl(Data::Dumper)
|
Requires: perl(Data::Dumper)
|
||||||
@ -36,8 +37,18 @@ Patch9: 0002-sys_ident--skip-length-field-from-search.patch
|
|||||||
Patch10: powerpc-utils-1.3.8-f1ec5f04fdac3e87c3c85c2d85f79339d916e864.patch
|
Patch10: powerpc-utils-1.3.8-f1ec5f04fdac3e87c3c85c2d85f79339d916e864.patch
|
||||||
Patch11: powerpc-utils-1.3.8-4b2d10942e2d964ecc1fe58c9460c34993ff10be.patch
|
Patch11: powerpc-utils-1.3.8-4b2d10942e2d964ecc1fe58c9460c34993ff10be.patch
|
||||||
Patch12: powerpc-utils-1.3.8-e51995667279164a6c8ce4c3ba0217fffda22d6d.patch
|
Patch12: powerpc-utils-1.3.8-e51995667279164a6c8ce4c3ba0217fffda22d6d.patch
|
||||||
Patch13: powerpc-utils-1.3.8-fix_boot-time_bonding_interface_cleanup_and_avoid_use_ifcfg.patch
|
Patch14: powerpc-utils-lpartstat_x_option-97269d301797e23b75d0c7a5cb63ce280783f615.patch
|
||||||
Patch14: powerpc-utils-1.3.8-using-od.patch
|
Patch15: powerpc-utils-1.3.8-using-od.patch
|
||||||
|
Patch16: powerpc-utils-1.3.8-0b59d4a372aa266caa75f3b6a253b8f5aeaf3802.patch
|
||||||
|
Patch17: powerpc-utils-1.3.8-d9bcb21179ccfea122f326aca4690afe0f7de0c6.patch
|
||||||
|
Patch18: powerpc-utils-1.3.8-e25d71be411b610e5e889f8efaaf04b38c2d9ecb.patch
|
||||||
|
Patch19: powerpc-utils-1.3.8-1cb8bd89d6386c60e75c47d4a4452d3f130d5138.patch
|
||||||
|
Patch20: powerpc-utils-1.3.8-366e17553ed647613668678c2d301d369038f41b.patch
|
||||||
|
Patch21: 0001-drmgr-don-t-open-sysfs-file-for-each-command.patch
|
||||||
|
Patch22: 0002-drmgr-read-the-CPU-NUMA-topology.patch
|
||||||
|
Patch23: 0003-drmgr-introduce-NUMA-based-LMB-removal.patch
|
||||||
|
Patch24: 0001-drmgr-fix-remove-by-index-operation.patch
|
||||||
|
Patch25: powerpc-utils-1.3.8-numa-header.patch
|
||||||
|
|
||||||
%description
|
%description
|
||||||
PERL-based scripts for maintaining and servicing PowerPC systems.
|
PERL-based scripts for maintaining and servicing PowerPC systems.
|
||||||
@ -205,6 +216,12 @@ systemctl daemon-reload >/dev/null 2>&1 || :
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon May 31 2021 Than Ngo <than@redhat.com> - 1.3.8-9
|
||||||
|
- Resolves: #1935658, New lparstat -x option to report the security flavor
|
||||||
|
- Resolves: #1938420, rebase patch fix_boot-time_bonding_interface_cleanup_and_avoid_use_ifcfg
|
||||||
|
- Resolves: #1940358, ppc64_cpu --help does not list --version as an option
|
||||||
|
- Resolves: #1951068, take care of NUMA topology when removing memory (DLPAR)
|
||||||
|
|
||||||
* Mon May 03 2021 Than Ngo <than@redhat.com> - 1.3.8-8
|
* Mon May 03 2021 Than Ngo <than@redhat.com> - 1.3.8-8
|
||||||
- Use od instead xxd
|
- Use od instead xxd
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user