diff --git a/SOURCES/dracut-module-setup.sh b/SOURCES/dracut-module-setup.sh index 3d63dab..52e5127 100755 --- a/SOURCES/dracut-module-setup.sh +++ b/SOURCES/dracut-module-setup.sh @@ -252,10 +252,10 @@ kdump_setup_vlan() { exit 1 elif kdump_is_bond "$_phydev"; then kdump_setup_bond "$_phydev" - echo " vlan=$_netdev:$_phydev" > ${initdir}/etc/cmdline.d/43vlan.conf + echo " vlan=$(kdump_setup_ifname $_netdev):$_phydev" > ${initdir}/etc/cmdline.d/43vlan.conf else _kdumpdev="$(kdump_setup_ifname $_phydev)" - echo " vlan=$_netdev:$_kdumpdev ifname=$_kdumpdev:$_netmac" > ${initdir}/etc/cmdline.d/43vlan.conf + echo " vlan=$(kdump_setup_ifname $_netdev):$_kdumpdev ifname=$_kdumpdev:$_netmac" > ${initdir}/etc/cmdline.d/43vlan.conf fi } @@ -263,13 +263,14 @@ kdump_setup_vlan() { # $1: netdev name kdump_setup_znet() { local _options="" + local _netdev=$1 - source_ifcfg_file $1 + source_ifcfg_file $_netdev for i in $OPTIONS; do _options=${_options},$i done - echo rd.znet=${NETTYPE},${SUBCHANNELS}${_options} > ${initdir}/etc/cmdline.d/30znet.conf + echo rd.znet=${NETTYPE},${SUBCHANNELS}${_options} rd.znet_ifname=$_netdev:${SUBCHANNELS} > ${initdir}/etc/cmdline.d/30znet.conf } # Setup dracut to bringup a given network interface @@ -633,7 +634,8 @@ get_alias() { ips=$(hostname -I) for ip in $ips do - entries=$(grep $ip /etc/hosts | awk '{ $1=$2=""; print $0 }') + # in /etc/hosts, alias can come at the 2nd column + entries=$(grep $ip /etc/hosts | awk '{ $1=""; print $0 }') if [ $? -eq 0 ]; then alias_set="$alias_set $entries" fi @@ -662,6 +664,7 @@ is_localhost() { get_pcs_fence_kdump_nodes() { local nodes + pcs cluster sync > /dev/null 2>&1 && pcs cluster cib-upgrade > /dev/null 2>&1 # get cluster nodes from cluster cib, get interface and ip address nodelist=`pcs cluster cib | xmllint --xpath "/cib/status/node_state/@uname" -` diff --git a/SOURCES/kdump.sysconfig.aarch64 b/SOURCES/kdump.sysconfig.aarch64 index 63bb46e..5f58fc8 100644 --- a/SOURCES/kdump.sysconfig.aarch64 +++ b/SOURCES/kdump.sysconfig.aarch64 @@ -21,7 +21,7 @@ KDUMP_COMMANDLINE_REMOVE="hugepages hugepagesz slub_debug" # This variable lets us append arguments to the current kdump commandline # after processed by KDUMP_COMMANDLINE_REMOVE -KDUMP_COMMANDLINE_APPEND="irqpoll nr_cpus=1 swiotlb=noforce cma=0 reset_devices cgroup_disable=memory udev.children-max=2 panic=10 rootflags=nofail novmcoredd" +KDUMP_COMMANDLINE_APPEND="irqpoll nr_cpus=1 swiotlb=noforce cma=0 reset_devices cgroup_disable=memory udev.children-max=2 panic=10 novmcoredd" # Any additional kexec arguments required. In most situations, this should # be left empty diff --git a/SOURCES/kdump.sysconfig.ppc64 b/SOURCES/kdump.sysconfig.ppc64 index 6727f94..c0fec58 100644 --- a/SOURCES/kdump.sysconfig.ppc64 +++ b/SOURCES/kdump.sysconfig.ppc64 @@ -21,7 +21,7 @@ KDUMP_COMMANDLINE_REMOVE="hugepages hugepagesz slub_debug" # This variable lets us append arguments to the current kdump commandline # after processed by KDUMP_COMMANDLINE_REMOVE -KDUMP_COMMANDLINE_APPEND="irqpoll maxcpus=1 noirqdistrib reset_devices cgroup_disable=memory numa=off udev.children-max=2 ehea.use_mcs=0 panic=10 rootflags=nofail kvm_cma_resv_ratio=0 transparent_hugepage=never novmcoredd" +KDUMP_COMMANDLINE_APPEND="irqpoll maxcpus=1 noirqdistrib reset_devices cgroup_disable=memory numa=off udev.children-max=2 ehea.use_mcs=0 panic=10 kvm_cma_resv_ratio=0 transparent_hugepage=never novmcoredd" # Any additional kexec arguments required. In most situations, this should # be left empty diff --git a/SOURCES/kdump.sysconfig.ppc64le b/SOURCES/kdump.sysconfig.ppc64le index 6727f94..c0fec58 100644 --- a/SOURCES/kdump.sysconfig.ppc64le +++ b/SOURCES/kdump.sysconfig.ppc64le @@ -21,7 +21,7 @@ KDUMP_COMMANDLINE_REMOVE="hugepages hugepagesz slub_debug" # This variable lets us append arguments to the current kdump commandline # after processed by KDUMP_COMMANDLINE_REMOVE -KDUMP_COMMANDLINE_APPEND="irqpoll maxcpus=1 noirqdistrib reset_devices cgroup_disable=memory numa=off udev.children-max=2 ehea.use_mcs=0 panic=10 rootflags=nofail kvm_cma_resv_ratio=0 transparent_hugepage=never novmcoredd" +KDUMP_COMMANDLINE_APPEND="irqpoll maxcpus=1 noirqdistrib reset_devices cgroup_disable=memory numa=off udev.children-max=2 ehea.use_mcs=0 panic=10 kvm_cma_resv_ratio=0 transparent_hugepage=never novmcoredd" # Any additional kexec arguments required. In most situations, this should # be left empty diff --git a/SOURCES/kdump.sysconfig.s390x b/SOURCES/kdump.sysconfig.s390x index 6299651..705c082 100644 --- a/SOURCES/kdump.sysconfig.s390x +++ b/SOURCES/kdump.sysconfig.s390x @@ -21,7 +21,7 @@ KDUMP_COMMANDLINE_REMOVE="hugepages hugepagesz slub_debug" # This variable lets us append arguments to the current kdump commandline # after processed by KDUMP_COMMANDLINE_REMOVE -KDUMP_COMMANDLINE_APPEND="nr_cpus=1 cgroup_disable=memory numa=off udev.children-max=2 panic=10 rootflags=nofail transparent_hugepage=never novmcoredd" +KDUMP_COMMANDLINE_APPEND="nr_cpus=1 cgroup_disable=memory numa=off udev.children-max=2 panic=10 transparent_hugepage=never novmcoredd" # Any additional /sbin/mkdumprd arguments required. MKDUMPRD_ARGS="" diff --git a/SOURCES/kdump.sysconfig.x86_64 b/SOURCES/kdump.sysconfig.x86_64 index a9d6287..2c5a3cc 100644 --- a/SOURCES/kdump.sysconfig.x86_64 +++ b/SOURCES/kdump.sysconfig.x86_64 @@ -21,7 +21,7 @@ KDUMP_COMMANDLINE_REMOVE="hugepages hugepagesz slub_debug kaslr" # This variable lets us append arguments to the current kdump commandline # after processed by KDUMP_COMMANDLINE_REMOVE -KDUMP_COMMANDLINE_APPEND="irqpoll nr_cpus=1 reset_devices cgroup_disable=memory mce=off numa=off udev.children-max=2 panic=10 rootflags=nofail acpi_no_memhotplug transparent_hugepage=never nokaslr novmcoredd hest_disable" +KDUMP_COMMANDLINE_APPEND="irqpoll nr_cpus=1 reset_devices cgroup_disable=memory mce=off numa=off udev.children-max=2 panic=10 acpi_no_memhotplug transparent_hugepage=never nokaslr novmcoredd hest_disable" # Any additional kexec arguments required. In most situations, this should # be left empty diff --git a/SOURCES/kexec-kdump-howto.txt b/SOURCES/kexec-kdump-howto.txt index f4d943a..a2a9001 100644 --- a/SOURCES/kexec-kdump-howto.txt +++ b/SOURCES/kexec-kdump-howto.txt @@ -743,8 +743,8 @@ hardware issue (*). The disable_cpu_apicid kernel option is automatically appended by kdumpctl script and is ignored if the kernel doesn't support it. You need to specify how many cpus to be used in a capture kernel by specifying -the number of cpus in nr_cpus kernel option in /etc/sysconfig/kdump. nr_cpus -is 1 at default. +the number of cpus in nr_cpus kernel option in /etc/sysconfig/kdump (**). +nr_cpus is 1 at default. You should use necessary and sufficient number of cpus on a capture kernel. Warning: Don't use too many cpus on a capture kernel, or the capture kernel @@ -754,6 +754,9 @@ may lead to panic due to Out Of Memory. hang, system reset or power-off at boot, depending on your system and runtime situation at the time of crash. +(**) On HyperV systems, only nr_cpus=1 is supported, if nr_cpus value is +larger than 1, capture kernel may hang at boot. + Debugging Tips -------------- - One can drop into a shell before/after saving vmcore with the help of diff --git a/SOURCES/mkdumprd b/SOURCES/mkdumprd index 6e347ac..7835e6c 100644 --- a/SOURCES/mkdumprd +++ b/SOURCES/mkdumprd @@ -103,11 +103,14 @@ to_mount() { _fstype=$(findmnt -k -f -n -r -o FSTYPE $_dev) [[ -e /etc/fstab ]] && _options=$(findmnt --fstab -f -n -r -o OPTIONS $_dev) [ -z "$_options" ] && _options=$(findmnt -k -f -n -r -o OPTIONS $_dev) - #mount fs target as rw in 2nd kernel + # mount fs target as rw in 2nd kernel _options=$(echo $_options | sed 's/\(^\|,\)ro\($\|,\)/\1rw\2/g') # with 'noauto' in fstab nfs and non-root disk mount will fail in 2nd # kernel, filter it out here. _options=$(echo $_options | sed 's/\(^\|,\)noauto\($\|,\)/\1/g') + # drop nofail or nobootwait + _options=$(echo $_options | sed 's/\(^\|,\)nofail\($\|,\)/\1/g') + _options=$(echo $_options | sed 's/\(^\|,\)nobootwait\($\|,\)/\1/g') _mntopts="$_target $_fstype $_options" #for non-nfs _dev converting to use udev persistent name @@ -151,7 +154,7 @@ get_ssh_size() { #mkdir if save path does not exist on ssh dump target #$1=ssh dump target -#caller should ensure write permission on $DUMP_TARGET:$SAVE_PATH +#caller should ensure write permission on $1:$SAVE_PATH #called from while loop and shouldn't read from stdin, so we're using "ssh -n" mkdir_save_path_ssh() { @@ -160,14 +163,14 @@ mkdir_save_path_ssh() ssh -qn $_opt $1 mkdir -p $SAVE_PATH 2>&1 > /dev/null _ret=$? if [ $_ret -ne 0 ]; then - perror_exit "mkdir failed on $DUMP_TARGET:$SAVE_PATH" + perror_exit "mkdir failed on $1:$SAVE_PATH" fi - #check whether user has write permission on $SAVE_PATH/$DUMP_TARGET + #check whether user has write permission on $1:$SAVE_PATH _dir=$(ssh -qn $_opt $1 mktemp -dqp $SAVE_PATH 2>/dev/null) _ret=$? if [ $_ret -ne 0 ]; then - perror_exit "Could not create temporary directory on $DUMP_TARGET:$SAVE_PATH. Make sure user has write permission on destination" + perror_exit "Could not create temporary directory on $1:$SAVE_PATH. Make sure user has write permission on destination" fi ssh -qn $_opt $1 rmdir $_dir diff --git a/SPECS/kexec-tools.spec b/SPECS/kexec-tools.spec index c949e0d..52fd5aa 100644 --- a/SPECS/kexec-tools.spec +++ b/SPECS/kexec-tools.spec @@ -1,6 +1,6 @@ Name: kexec-tools Version: 2.0.15 -Release: 43%{?dist} +Release: 51%{?dist} License: GPLv2 Group: Applications/System Summary: The kexec/kdump userspace component. @@ -444,6 +444,33 @@ done %changelog +* Fri Jun 19 2020 Bhupesh Sharma 2.0.15-51 +- Add a new option 'rd.znet_ifname' in order to use it in udev rules + +* Wed May 27 2020 Bhupesh Sharma 2.0.15-50 +- Revert: Always set vm.zone_reclaim_mode = 3 in kdump kernel + +* Mon Apr 20 2020 Bhupesh Sharma 2.0.15-49 +- dracut-module-setup.sh: fix breakage in get_pcs_fence_kdump_nodes(). + +* Fri Apr 10 2020 Bhupesh Sharma 2.0.15-48 +- dracut-module-setup.sh: ensure cluster info is ready before query. +- dracut-module-setup.sh: improve get_alias() + +* Thu Mar 26 2020 Bhupesh Sharma 2.0.15-47 +- mkdumprd: don't append noauto to mount option. +- Add NOTE about nr_cpus value on HyperV systems. + +* Mon Mar 23 2020 Bhupesh Sharma 2.0.15-46 +- Always drop nofail or nobootwait options +- Always set vm.zone_reclaim_mode = 3 in kdump kernel + +* Wed Mar 18 2020 Bhupesh Sharma 2.0.15-45 +- mkdumprd: Use DUMP_TARGET which printing error message during ssh + +* Mon Mar 09 2020 Bhupesh Sharma 2.0.15-44 +- module-setup: Ensure eth devices get IP address for VLAN + * Wed Oct 23 2019 Bhupesh Sharma 2.0.15-43 - module-setup: re-fix 99kdumpbase network dependency - kdumpctl: bail out immediately if host key verification failed