Hi,
On Tue, Aug 8, 2017 at 10:03 AM, Dave Young <dyoung(a)redhat.com> wrote:
Hi,
On 08/02/17 at 05:56pm, Ziyue Yang wrote:
> This commit makes dump_ssh to add 'kdump-' prefix to ipv6
> hosts with 'eth*' like interfaces before dumping to the host.
Pingfan said the known_hosts file also has issues, it is not a problem
in your test?
Yes, there's no problem during my test. Seems that once the ipv6 address is
known, the interface name doesn't matter.
>
> Signed-off-by: Ziyue Yang <ziyang(a)redhat.com>
> ---
> dracut-kdump.sh | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/dracut-kdump.sh b/dracut-kdump.sh
> index b75c2a5..a50eb60 100755
> --- a/dracut-kdump.sh
> +++ b/dracut-kdump.sh
> @@ -75,6 +75,16 @@ dump_ssh()
> local _dir="$KDUMP_PATH/$HOST_IP-$DATEDIR"
> local _host=$2
>
> + # figure out "kdump- prefixed network interface name for
> + # link-local ipv6 address
> + if [[ $_host == *":"* ]]; then
is_ipv6_address?
Yes, but the is_ipv6_address function is in kdump-lib.sh, which is not
available
while dumping.
> + local _host_prefix=${_host%\%*}
> + local _ifname=${_host##*\%}
> + if [[ $_ifname == "eth"* ]]; then
It could be other kernel names? how about just add kdump prefix without
the checking.
No, kdump would only add "kdump-" prefix for "eth*" like
interfaces.
In my QEMU machine the interface name is "ens3" and it's leaved untouched.
> + _host="$_host_prefix%kdump-$_ifname"
> + fi
> + fi
> +
> echo "kdump: saving to $_host:$_dir"
>
> cat /var/lib/random-seed > /dev/urandom
> --
> 2.9.3
> _______________________________________________
> kexec mailing list -- kexec(a)lists.fedoraproject.org
> To unsubscribe send an email to kexec-leave(a)lists.fedoraproject.org
Thanks
Dave
Thanks