On Monday 12 September 2016 10:18 PM, Hari Bathini wrote:
On Monday 12 September 2016 10:08 PM, Hari Bathini wrote:
> Hi Dave,
>
>
> On Monday 12 September 2016 07:35 AM, Dave Young wrote:
>> Hi, Hari
>>
>> Thanks for sending the patches.
>>
>> The issue will not happen if we restore default initrd in patch 2/2,
>> right? So patch 1/2 is not necessary?
>
> Actually, the first reboot after switching over from fadump to kdump
> still holds the interface name with "kdump-" prefix as we haven't
> restored
> the default initrd yet. This patch intents to cover that and also, to
> restore
> the original interface name for subsequent reboots..
>
Hi Dave,
Another possible case is rebuild may not happen on switching from fadump
to kdump,
if config files are not changed. I could restore as part of start_dump()
but that doesn't
sound right to me. Posted v2 with this patch intact. Please review..
Thanks
Hari
Ignore the 2nd use-case as patch 2/2 covers this anyway..
Alternatively, to cover the 1st use-case, we can relay on the
GUI script by restoring initrd as and when fadump is disabled in GUI.
I feel the below hunk is harmless though..
Thanks
Hari
> Thanks
> Hari
>
>> On 09/07/16 at 06:10pm, Hari Bathini wrote:
>>> When a remote dump target is specified, kdump dracut module prefixes
>>> 'kdump-' to network interface name (ifname) as kernel assigned names
>>> are not persistent. In fadump mode, kdump dracut module is added to
>>> the default initrd, which adds the 'kdump-' prefix to the ifname of
>>> the prodcution kernel itself. If fadump mode is disabled after this,
>>> kdump dracut module picks the ifname that is already prefixed with
>>> 'kdump-' in the production kernel and adds another 'kdump-'
to it,
>>> making the ifname something like kdump-kdump-eth0 for kdump kernel.
>>> Eventually, kdump kernel fails with below traces:
>>>
>>> dracut-initqueue[246]: RTNETLINK answers: Network is unreachable
>>> dracut-initqueue[246]: arping: Device kdump-kdump-eth0 not
>>> available.
>>>
>>>
>>> The ip command shows the below:
>>>
>>> kdump:/# ip addr show kdump-kdump-eth0
>>> 2: kdump-kdump-eth: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 \
>>> qdisc pfifo_fast state UNKNOWN qlen 1000
>>> link/ether 22:82:87:7b:98:02 brd ff:ff:ff:ff:ff:ff
>>> inet6 2002:903:15f:550:2082:87ff:fe7b:9802/64 scope global \
>>> mngtmpaddr dynamic
>>> valid_lft 2591890sec preferred_lft 604690sec
>>> inet6 fe80::2082:87ff:fe7b:9802/64 scope link
>>> valid_lft forever preferred_lft forever
>>> kdump:/#
>>>
>>> The trailing 0 from kdump-kdump-eth0 is missing in the ifname,
>>> probably
>>> truncated while setting.
>>>
>>> This patch fixes this by avoiding addition of the prefix 'kdump-'
when
>>> such prefix is already present in the ifname.
>>>
>>> Signed-off-by: Hari Bathini <hbathini(a)linux.vnet.ibm.com>
>>> ---
>>> dracut-module-setup.sh | 3 ++-
>>> 1 file changed, 2 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/dracut-module-setup.sh b/dracut-module-setup.sh
>>> index 68e0ff8..490501a 100755
>>> --- a/dracut-module-setup.sh
>>> +++ b/dracut-module-setup.sh
>>> @@ -161,7 +161,8 @@ kdump_get_perm_addr() {
>>> kdump_setup_ifname() {
>>> local _ifname
>>> - if [[ $1 =~ eth* ]]; then
>>> + # If ifname has 'kdump-' prefix, don't add it again
>>> + if [[ $1 =~ eth* ]] && [[ ! $1 =~ ^kdump-* ]]; then
>>> _ifname="kdump-$1"
>>> else
>>> _ifname="$1"
>>> _______________________________________________
>>> kexec mailing list
>>> kexec(a)lists.fedoraproject.org
>>>
https://lists.fedoraproject.org/admin/lists/kexec@lists.fedoraproject.org
>>>
>> Thanks
>> Dave
>>
> _______________________________________________
> kexec mailing list
> kexec(a)lists.fedoraproject.org
>
https://lists.fedoraproject.org/admin/lists/kexec@lists.fedoraproject.org
>
_______________________________________________
kexec mailing list
kexec(a)lists.fedoraproject.org
https://lists.fedoraproject.org/admin/lists/kexec@lists.fedoraproject.org