The main goal of this patch set is to fix bz1854037 which happens because rd.route doesn't use the name from kdump_setup_ifname which in turn causes NetworkManger to get an IP for the slave NIC and then time out. Meanwhile, I think it's better to avoid repeatedly calling kdump_setup_ifname.
Coiby Xu (3): get kdump ifname once in kdump_install_net pass kdumpnic to kdump_setup_/bond/bridge/vlan directly rd.route should use the name from kdump_setup_ifname
dracut-module-setup.sh | 58 ++++++++++++++++++++---------------------- 1 file changed, 28 insertions(+), 30 deletions(-)
Signed-off-by: Coiby Xu coxu@redhat.com --- dracut-module-setup.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/dracut-module-setup.sh b/dracut-module-setup.sh index 066d0ce..c6c1a9b 100755 --- a/dracut-module-setup.sh +++ b/dracut-module-setup.sh @@ -480,7 +480,7 @@ kdump_get_remote_ip() # initramfs accessing giving destination # $1: destination host kdump_install_net() { - local _destaddr _srcaddr _route _netdev + local _destaddr _srcaddr _route _netdev kdumpnic local _static _proto _ip_conf _ip_opts _ifname_opts
_destaddr=$(kdump_get_remote_ip $1) @@ -488,6 +488,7 @@ kdump_install_net() { _srcaddr=$(kdump_get_ip_route_field "$_route" "src") _netdev=$(kdump_get_ip_route_field "$_route" "dev") _netmac=$(kdump_get_mac_addr $_netdev) + kdumpnic=$(kdump_setup_ifname $_netdev)
if [ "$(uname -m)" = "s390x" ]; then kdump_setup_znet $_netdev @@ -503,7 +504,7 @@ kdump_install_net() { fi
_ip_conf="${initdir}/etc/cmdline.d/40ip.conf" - _ip_opts=" ip=${_static}$(kdump_setup_ifname $_netdev):${_proto}" + _ip_opts=" ip=${_static}$kdumpnic:${_proto}"
# dracut doesn't allow duplicated configuration for same NIC, even they're exactly the same. # so we have to avoid adding duplicates @@ -523,7 +524,7 @@ kdump_install_net() { elif kdump_is_vlan "$_netdev"; then kdump_setup_vlan "$_netdev" else - _ifname_opts=" ifname=$(kdump_setup_ifname $_netdev):$_netmac" + _ifname_opts=" ifname=$kdumpnic:$_netmac" echo "$_ifname_opts" >> $_ip_conf fi
@@ -543,8 +544,8 @@ kdump_install_net() { # gateway. if [ ! -f ${initdir}/etc/cmdline.d/60kdumpnic.conf ] && [ ! -f ${initdir}/etc/cmdline.d/70bootdev.conf ]; then - echo "kdumpnic=$(kdump_setup_ifname $_netdev)" > ${initdir}/etc/cmdline.d/60kdumpnic.conf - echo "bootdev=$(kdump_setup_ifname $_netdev)" > ${initdir}/etc/cmdline.d/70bootdev.conf + echo "kdumpnic=$kdumpnic" > ${initdir}/etc/cmdline.d/60kdumpnic.conf + echo "bootdev=$kdumpnic" > ${initdir}/etc/cmdline.d/70bootdev.conf fi }
This avoids calling kdump_setup_ifname repeatedly.
Signed-off-by: Coiby Xu coxu@redhat.com --- dracut-module-setup.sh | 35 ++++++++++++++++------------------- 1 file changed, 16 insertions(+), 19 deletions(-)
diff --git a/dracut-module-setup.sh b/dracut-module-setup.sh index c6c1a9b..d1c2c8d 100755 --- a/dracut-module-setup.sh +++ b/dracut-module-setup.sh @@ -352,8 +352,8 @@ kdump_setup_ifname() { }
kdump_setup_bridge() { - local _netdev=$1 - local _brif _dev _mac _kdumpdev + local _netdev=$1 kdumpnic=$2 + local _brif _dev _mac for _dev in `ls /sys/class/net/$_netdev/brif/`; do _kdumpdev=$_dev if kdump_is_bond "$_dev"; then @@ -364,8 +364,7 @@ kdump_setup_bridge() { kdump_setup_vlan "$_dev" else _mac=$(kdump_get_mac_addr $_dev) - _kdumpdev=$(kdump_setup_ifname $_dev) - echo -n " ifname=$_kdumpdev:$_mac" >> ${initdir}/etc/cmdline.d/41bridge.conf + echo -n " ifname=$kdumpnic:$_mac" >> ${initdir}/etc/cmdline.d/41bridge.conf fi _brif+="$_kdumpdev," done @@ -373,12 +372,11 @@ kdump_setup_bridge() { }
kdump_setup_bond() { - local _netdev=$1 - local _dev _mac _slaves _kdumpdev + local _netdev=$1 kdumpnic=$2 + local _dev _mac _slaves for _dev in `cat /sys/class/net/$_netdev/bonding/slaves`; do _mac=$(kdump_get_perm_addr $_dev) - _kdumpdev=$(kdump_setup_ifname $_dev) - echo -n " ifname=$_kdumpdev:$_mac" >> ${initdir}/etc/cmdline.d/42bond.conf + echo -n " ifname=$kdumpnic:$_mac" >> ${initdir}/etc/cmdline.d/42bond.conf _slaves+="$_kdumpdev," done echo -n " bond=$_netdev:$(echo $_slaves | sed 's/,$//')" >> ${initdir}/etc/cmdline.d/42bond.conf @@ -391,12 +389,11 @@ kdump_setup_bond() { }
kdump_setup_team() { - local _netdev=$1 - local _dev _mac _slaves _kdumpdev + local _netdev=$1 kdumpnic=$2 + local _dev _mac _slaves for _dev in `teamnl $_netdev ports | awk -F':' '{print $2}'`; do _mac=$(kdump_get_perm_addr $_dev) - _kdumpdev=$(kdump_setup_ifname $_dev) - echo -n " ifname=$_kdumpdev:$_mac" >> ${initdir}/etc/cmdline.d/44team.conf + echo -n " ifname=$kdumpnic:$_mac" >> ${initdir}/etc/cmdline.d/44team.conf _slaves+="$_kdumpdev," done echo " team=$_netdev:$(echo $_slaves | sed -e 's/,$//')" >> ${initdir}/etc/cmdline.d/44team.conf @@ -414,7 +411,7 @@ kdump_setup_team() { }
kdump_setup_vlan() { - local _netdev=$1 + local _netdev=$1 kdumpnic=$2 local _phydev="$(awk '/^Device:/{print $2}' /proc/net/vlan/"$_netdev")" local _netmac="$(kdump_get_mac_addr $_phydev)" local _kdumpdev @@ -425,10 +422,10 @@ kdump_setup_vlan() { exit 1 elif kdump_is_bond "$_phydev"; then kdump_setup_bond "$_phydev" - echo " vlan=$(kdump_setup_ifname $_netdev):$_phydev" > ${initdir}/etc/cmdline.d/43vlan.conf + echo " vlan=$kdumpnic:$_phydev" > ${initdir}/etc/cmdline.d/43vlan.conf else _kdumpdev="$(kdump_setup_ifname $_phydev)" - echo " vlan=$(kdump_setup_ifname $_netdev):$_kdumpdev ifname=$_kdumpdev:$_netmac" > ${initdir}/etc/cmdline.d/43vlan.conf + echo " vlan=$kdumpnic:$_kdumpdev ifname=$_kdumpdev:$_netmac" > ${initdir}/etc/cmdline.d/43vlan.conf fi }
@@ -516,13 +513,13 @@ kdump_install_net() { fi
if kdump_is_bridge "$_netdev"; then - kdump_setup_bridge "$_netdev" + kdump_setup_bridge "$_netdev" "$kdumpnic" elif kdump_is_bond "$_netdev"; then - kdump_setup_bond "$_netdev" + kdump_setup_bond "$_netdev" "$kdumpnic" elif kdump_is_team "$_netdev"; then - kdump_setup_team "$_netdev" + kdump_setup_team "$_netdev" "$kdumpnic" elif kdump_is_vlan "$_netdev"; then - kdump_setup_vlan "$_netdev" + kdump_setup_vlan "$_netdev" "$kdumpnic" else _ifname_opts=" ifname=$kdumpnic:$_netmac" echo "$_ifname_opts" >> $_ip_conf
Oh, this patch is problematic.
On Sun, Apr 25, 2021 at 03:58:26PM +0800, Coiby Xu wrote:
This avoids calling kdump_setup_ifname repeatedly.
Signed-off-by: Coiby Xu coxu@redhat.com
dracut-module-setup.sh | 35 ++++++++++++++++------------------- 1 file changed, 16 insertions(+), 19 deletions(-)
diff --git a/dracut-module-setup.sh b/dracut-module-setup.sh index c6c1a9b..d1c2c8d 100755 --- a/dracut-module-setup.sh +++ b/dracut-module-setup.sh @@ -352,8 +352,8 @@ kdump_setup_ifname() { }
kdump_setup_bridge() {
- local _netdev=$1
- local _brif _dev _mac _kdumpdev
- local _netdev=$1 kdumpnic=$2
- local _brif _dev _mac for _dev in `ls /sys/class/net/$_netdev/brif/`; do _kdumpdev=$_dev if kdump_is_bond "$_dev"; then
@@ -364,8 +364,7 @@ kdump_setup_bridge() { kdump_setup_vlan "$_dev" else _mac=$(kdump_get_mac_addr $_dev)
_kdumpdev=$(kdump_setup_ifname $_dev)
echo -n " ifname=$_kdumpdev:$_mac" >> ${initdir}/etc/cmdline.d/41bridge.conf
echo -n " ifname=$kdumpnic:$_mac" >> ${initdir}/etc/cmdline.d/41bridge.conf fi _brif+="$_kdumpdev,"
This _kdumpdev is for each NIC that connects to a bridged network so it should call kdump_setup_ifname each loop.
done
@@ -373,12 +372,11 @@ kdump_setup_bridge() { }
kdump_setup_bond() {
- local _netdev=$1
- local _dev _mac _slaves _kdumpdev
- local _netdev=$1 kdumpnic=$2
- local _dev _mac _slaves for _dev in `cat /sys/class/net/$_netdev/bonding/slaves`; do _mac=$(kdump_get_perm_addr $_dev)
_kdumpdev=$(kdump_setup_ifname $_dev)
echo -n " ifname=$_kdumpdev:$_mac" >> ${initdir}/etc/cmdline.d/42bond.conf
done echo -n " bond=$_netdev:$(echo $_slaves | sed 's/,$//')" >> ${initdir}/etc/cmdline.d/42bond.confecho -n " ifname=$kdumpnic:$_mac" >> ${initdir}/etc/cmdline.d/42bond.conf _slaves+="$_kdumpdev,"
@@ -391,12 +389,11 @@ kdump_setup_bond() { }
kdump_setup_team() {
- local _netdev=$1
- local _dev _mac _slaves _kdumpdev
- local _netdev=$1 kdumpnic=$2
- local _dev _mac _slaves for _dev in `teamnl $_netdev ports | awk -F':' '{print $2}'`; do _mac=$(kdump_get_perm_addr $_dev)
_kdumpdev=$(kdump_setup_ifname $_dev)
echo -n " ifname=$_kdumpdev:$_mac" >> ${initdir}/etc/cmdline.d/44team.conf
done echo " team=$_netdev:$(echo $_slaves | sed -e 's/,$//')" >> ${initdir}/etc/cmdline.d/44team.confecho -n " ifname=$kdumpnic:$_mac" >> ${initdir}/etc/cmdline.d/44team.conf _slaves+="$_kdumpdev,"
@@ -414,7 +411,7 @@ kdump_setup_team() { }
kdump_setup_vlan() {
- local _netdev=$1
- local _netdev=$1 kdumpnic=$2 local _phydev="$(awk '/^Device:/{print $2}' /proc/net/vlan/"$_netdev")" local _netmac="$(kdump_get_mac_addr $_phydev)" local _kdumpdev
@@ -425,10 +422,10 @@ kdump_setup_vlan() { exit 1 elif kdump_is_bond "$_phydev"; then kdump_setup_bond "$_phydev"
kdump_setup_bond has changed its signature and kdumpnic needs to passed as the second parameter.
echo " vlan=$(kdump_setup_ifname $_netdev):$_phydev" > ${initdir}/etc/cmdline.d/43vlan.conf
else _kdumpdev="$(kdump_setup_ifname $_phydev)"echo " vlan=$kdumpnic:$_phydev" > ${initdir}/etc/cmdline.d/43vlan.conf
echo " vlan=$(kdump_setup_ifname $_netdev):$_kdumpdev ifname=$_kdumpdev:$_netmac" > ${initdir}/etc/cmdline.d/43vlan.conf
fiecho " vlan=$kdumpnic:$_kdumpdev ifname=$_kdumpdev:$_netmac" > ${initdir}/etc/cmdline.d/43vlan.conf
}
@@ -516,13 +513,13 @@ kdump_install_net() { fi
if kdump_is_bridge "$_netdev"; then
kdump_setup_bridge "$_netdev"
elif kdump_is_bond "$_netdev"; thenkdump_setup_bridge "$_netdev" "$kdumpnic"
kdump_setup_bond "$_netdev"
elif kdump_is_team "$_netdev"; thenkdump_setup_bond "$_netdev" "$kdumpnic"
kdump_setup_team "$_netdev"
elif kdump_is_vlan "$_netdev"; thenkdump_setup_team "$_netdev" "$kdumpnic"
kdump_setup_vlan "$_netdev"
else _ifname_opts=" ifname=$kdumpnic:$_netmac" echo "$_ifname_opts" >> $_ip_confkdump_setup_vlan "$_netdev" "$kdumpnic"
-- 2.31.1
So I will create a commit for kdump_setup_bond/team/vlan separately and fix the above errors.
Nacked-by: Coiby Xu coxu@redhat.com
This fix bz1854037 which happens because kexec-tools generates rd.route for eth0 instead of for kdump-eth0, 1. "rd.route=168.63.129.16:10.0.0.1:eth0 rd.route=169.254.169.254:10.0.0.1:eth0" is passed to the dracut cmdline by kexec-tools 2. In the 2rd kernel, - dracut/modules.d/40network/net-lib.sh will write /tmp/net.route.eth0 based on rd.route - dracut/modules.d/45ifcfg/write-ifcfg.sh will copy /tmp/net.route.eth0 to /tmp/icfg and then copytree /tmp/ifcfg to /run/initramfs/state/etc/sysconfig/network-scripts 3. NetworkManager will try to get an IP for eth0 regardless of the fact it's a slave NIC and time out ``` $ ip link show 2: kdump-eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000 link/ether 00:0d:3a:11:86:8b brd ff:ff:ff:ff:ff:ff 3: eth0: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc mq master kdump-eth0 state UP mode DEFAULT group default qlen 1000 ```
Reported-by: Huijing Hei hhei@redhat.com Signed-off-by: Coiby Xu coxu@redhat.com --- dracut-module-setup.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/dracut-module-setup.sh b/dracut-module-setup.sh index d1c2c8d..5b67f86 100755 --- a/dracut-module-setup.sh +++ b/dracut-module-setup.sh @@ -235,7 +235,7 @@ cal_netmask_by_prefix() { #$2: srcaddr #if it use static ip echo it, or echo null kdump_static_ip() { - local _netdev="$1" _srcaddr="$2" _ipv6_flag + local _netdev="$1" _srcaddr="$2" kdumpnic="$3" _ipv6_flag local _netmask _gateway _ipaddr _target _nexthop _prefix
_ipaddr=$(ip addr show dev $_netdev permanent | awk "/ $_srcaddr/.* /{print $2}") @@ -273,10 +273,10 @@ kdump_static_ip() { _target="[$_target]" _nexthop="[$_nexthop]" fi - echo "rd.route=$_target:$_nexthop:$_netdev" + echo "rd.route=$_target:$_nexthop:$kdumpnic" done >> ${initdir}/etc/cmdline.d/45route-static.conf
- kdump_handle_mulitpath_route $_netdev $_srcaddr + kdump_handle_mulitpath_route $_netdev $_srcaddr $kdumpnic }
kdump_handle_mulitpath_route() { @@ -299,9 +299,9 @@ kdump_handle_mulitpath_route() { _nexthop=`echo "$_route" | cut -d ' ' -f3` _max_weight=$_weight if [ "x" != "x"$_ipv6_flag ]; then - _rule="rd.route=[$_target]:[$_nexthop]:$_netdev" + _rule="rd.route=[$_target]:[$_nexthop]:$kdumpnic" else - _rule="rd.route=$_target:$_nexthop:$_netdev" + _rule="rd.route=$_target:$_nexthop:$kdumpnic" fi fi else @@ -491,7 +491,7 @@ kdump_install_net() { kdump_setup_znet $_netdev fi
- _static=$(kdump_static_ip $_netdev $_srcaddr) + _static=$(kdump_static_ip $_netdev $_srcaddr $kdumpnic) if [ -n "$_static" ]; then _proto=none elif is_ipv6_address $_srcaddr; then
On Sun, Apr 25, 2021 at 4:04 PM Coiby Xu coxu@redhat.com wrote:
This fix bz1854037 which happens because kexec-tools generates rd.route for eth0 instead of for kdump-eth0,
- "rd.route=168.63.129.16:10.0.0.1:eth0 rd.route=169.254.169.254:10.0.0.1:eth0" is passed to the dracut cmdline by kexec-tools
- In the 2rd kernel,
- dracut/modules.d/40network/net-lib.sh will write /tmp/net.route.eth0 based on rd.route
- dracut/modules.d/45ifcfg/write-ifcfg.sh will copy /tmp/net.route.eth0 to /tmp/icfg and then copytree /tmp/ifcfg to /run/initramfs/state/etc/sysconfig/network-scripts
- NetworkManager will try to get an IP for eth0 regardless of the fact it's a slave NIC and time out
$ ip link show 2: kdump-eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000 link/ether 00:0d:3a:11:86:8b brd ff:ff:ff:ff:ff:ff 3: eth0: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc mq master kdump-eth0 state UP mode DEFAULT group default qlen 1000
Reported-by: Huijing Hei hhei@redhat.com Signed-off-by: Coiby Xu coxu@redhat.com
dracut-module-setup.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/dracut-module-setup.sh b/dracut-module-setup.sh index d1c2c8d..5b67f86 100755 --- a/dracut-module-setup.sh +++ b/dracut-module-setup.sh @@ -235,7 +235,7 @@ cal_netmask_by_prefix() { #$2: srcaddr #if it use static ip echo it, or echo null kdump_static_ip() {
- local _netdev="$1" _srcaddr="$2" _ipv6_flag
local _netdev="$1" _srcaddr="$2" kdumpnic="$3" _ipv6_flag local _netmask _gateway _ipaddr _target _nexthop _prefix
_ipaddr=$(ip addr show dev $_netdev permanent | awk "/ $_srcaddr/.* /{print $2}")
@@ -273,10 +273,10 @@ kdump_static_ip() { _target="[$_target]" _nexthop="[$_nexthop]" fi
echo "rd.route=$_target:$_nexthop:$_netdev"
done >> ${initdir}/etc/cmdline.d/45route-static.confecho "rd.route=$_target:$_nexthop:$kdumpnic"
- kdump_handle_mulitpath_route $_netdev $_srcaddr
- kdump_handle_mulitpath_route $_netdev $_srcaddr $kdumpnic
}
kdump_handle_mulitpath_route() {
Hi, just found a small issue here, kdump_handle_mulitpath_route didn't accept the kdumpnic as argument, if it worked, it's because kdumpnic was kept in the environment, which is not a good practise.
I can fix it with following diff when merge it, so you don't have to send the patch again:
kdump_handle_mulitpath_route() { - local _netdev="$1" _srcaddr="$2" _ipv6_flag + local _netdev="$1" _srcaddr="$2" kdumpnic="$3" _ipv6_flag local _target _nexthop _route _weight _max_weight _rule
Is this ok to you?
@@ -299,9 +299,9 @@ kdump_handle_mulitpath_route() { _nexthop=`echo "$_route" | cut -d ' ' -f3` _max_weight=$_weight if [ "x" != "x"$_ipv6_flag ]; then
_rule="rd.route=[$_target]:[$_nexthop]:$_netdev"
_rule="rd.route=[$_target]:[$_nexthop]:$kdumpnic" else
_rule="rd.route=$_target:$_nexthop:$_netdev"
_rule="rd.route=$_target:$_nexthop:$kdumpnic" fi fi else
@@ -491,7 +491,7 @@ kdump_install_net() { kdump_setup_znet $_netdev fi
- _static=$(kdump_static_ip $_netdev $_srcaddr)
- _static=$(kdump_static_ip $_netdev $_srcaddr $kdumpnic) if [ -n "$_static" ]; then _proto=none elif is_ipv6_address $_srcaddr; then
-- 2.31.1 _______________________________________________ kexec mailing list -- kexec@lists.fedoraproject.org To unsubscribe send an email to kexec-leave@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kexec@lists.fedoraproject.org Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure
On Sun, Apr 25, 2021 at 04:57:48PM +0800, Kairui Song wrote:
On Sun, Apr 25, 2021 at 4:04 PM Coiby Xu coxu@redhat.com wrote:
This fix bz1854037 which happens because kexec-tools generates rd.route for eth0 instead of for kdump-eth0,
- "rd.route=168.63.129.16:10.0.0.1:eth0 rd.route=169.254.169.254:10.0.0.1:eth0" is passed to the dracut cmdline by kexec-tools
- In the 2rd kernel,
- dracut/modules.d/40network/net-lib.sh will write /tmp/net.route.eth0 based on rd.route
- dracut/modules.d/45ifcfg/write-ifcfg.sh will copy /tmp/net.route.eth0 to /tmp/icfg and then copytree /tmp/ifcfg to /run/initramfs/state/etc/sysconfig/network-scripts
- NetworkManager will try to get an IP for eth0 regardless of the fact it's a slave NIC and time out
$ ip link show 2: kdump-eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000 link/ether 00:0d:3a:11:86:8b brd ff:ff:ff:ff:ff:ff 3: eth0: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc mq master kdump-eth0 state UP mode DEFAULT group default qlen 1000
Reported-by: Huijing Hei hhei@redhat.com Signed-off-by: Coiby Xu coxu@redhat.com
dracut-module-setup.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/dracut-module-setup.sh b/dracut-module-setup.sh index d1c2c8d..5b67f86 100755 --- a/dracut-module-setup.sh +++ b/dracut-module-setup.sh @@ -235,7 +235,7 @@ cal_netmask_by_prefix() { #$2: srcaddr #if it use static ip echo it, or echo null kdump_static_ip() {
- local _netdev="$1" _srcaddr="$2" _ipv6_flag
local _netdev="$1" _srcaddr="$2" kdumpnic="$3" _ipv6_flag local _netmask _gateway _ipaddr _target _nexthop _prefix
_ipaddr=$(ip addr show dev $_netdev permanent | awk "/ $_srcaddr/.* /{print $2}")
@@ -273,10 +273,10 @@ kdump_static_ip() { _target="[$_target]" _nexthop="[$_nexthop]" fi
echo "rd.route=$_target:$_nexthop:$_netdev"
done >> ${initdir}/etc/cmdline.d/45route-static.confecho "rd.route=$_target:$_nexthop:$kdumpnic"
- kdump_handle_mulitpath_route $_netdev $_srcaddr
- kdump_handle_mulitpath_route $_netdev $_srcaddr $kdumpnic
}
kdump_handle_mulitpath_route() {
Hi, just found a small issue here, kdump_handle_mulitpath_route didn't accept the kdumpnic as argument, if it worked, it's because kdumpnic was kept in the environment, which is not a good practise.
I can fix it with following diff when merge it, so you don't have to send the patch again:
kdump_handle_mulitpath_route() {
- local _netdev="$1" _srcaddr="$2" _ipv6_flag
- local _netdev="$1" _srcaddr="$2" kdumpnic="$3" _ipv6_flag local _target _nexthop _route _weight _max_weight _rule
Is this ok to you?
Yes, it looks good to me. Thanks for spotting this issue and providing the fix!
@@ -299,9 +299,9 @@ kdump_handle_mulitpath_route() { _nexthop=`echo "$_route" | cut -d ' ' -f3` _max_weight=$_weight if [ "x" != "x"$_ipv6_flag ]; then
_rule="rd.route=[$_target]:[$_nexthop]:$_netdev"
_rule="rd.route=[$_target]:[$_nexthop]:$kdumpnic" else
_rule="rd.route=$_target:$_nexthop:$_netdev"
_rule="rd.route=$_target:$_nexthop:$kdumpnic" fi fi else
@@ -491,7 +491,7 @@ kdump_install_net() { kdump_setup_znet $_netdev fi
- _static=$(kdump_static_ip $_netdev $_srcaddr)
- _static=$(kdump_static_ip $_netdev $_srcaddr $kdumpnic) if [ -n "$_static" ]; then _proto=none elif is_ipv6_address $_srcaddr; then
-- 2.31.1 _______________________________________________ kexec mailing list -- kexec@lists.fedoraproject.org To unsubscribe send an email to kexec-leave@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kexec@lists.fedoraproject.org Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure
-- Best Regards, Kairui Song
Thanks for the fix, this patch series looks good to me.
On Sun, Apr 25, 2021 at 4:03 PM Coiby Xu coxu@redhat.com wrote:
The main goal of this patch set is to fix bz1854037 which happens because rd.route doesn't use the name from kdump_setup_ifname which in turn causes NetworkManger to get an IP for the slave NIC and then time out. Meanwhile, I think it's better to avoid repeatedly calling kdump_setup_ifname.
Coiby Xu (3): get kdump ifname once in kdump_install_net pass kdumpnic to kdump_setup_/bond/bridge/vlan directly rd.route should use the name from kdump_setup_ifname
dracut-module-setup.sh | 58 ++++++++++++++++++++---------------------- 1 file changed, 28 insertions(+), 30 deletions(-)
-- 2.31.1 _______________________________________________ kexec mailing list -- kexec@lists.fedoraproject.org To unsubscribe send an email to kexec-leave@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kexec@lists.fedoraproject.org Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure
Acked-by: Kairui Song <kasong@redhat.com