On 03/02/2018 10:03 AM, Dave Young wrote:
On 03/01/18 at 03:40pm, piliu wrote:
>
>
> On 03/01/2018 10:36 AM, Dave Young wrote:
>> On 01/18/18 at 12:32pm, Pingfan Liu wrote:
>>> If ssh-dump with ipv6-target-addr, kdump should wait until the ipv6 addr
>>> is ready. Since dracut has implemented this function, we can pass dhcp6
>>> or auto6 in cmdline to activate it.
>>> But in 1st kernel, we can not know whether the ipv6 addr is got by dhcp6 or
by
>>> auto6 without causing side-effect (dhclient -6 will realloc addr). To
>>> address it, we take the assumption that if
>>> /proc/sys/net/ipv6/conf/$netdev/autoconf is enabled, then the host uses
>>> auto6.
>>>
>>> Signed-off-by: Pingfan Liu <piliu(a)redhat.com>
>>> ---
>>> dracut-module-setup.sh | 6 ++++++
>>> kdump-lib.sh | 12 ++++++++++++
>>> 2 files changed, 18 insertions(+)
>>>
>>> diff --git a/dracut-module-setup.sh b/dracut-module-setup.sh
>>> index c0f1a88..d1dd673 100755
>>> --- a/dracut-module-setup.sh
>>> +++ b/dracut-module-setup.sh
>>> @@ -293,6 +293,12 @@ kdump_setup_netdev() {
>>> _static=$(kdump_static_ip $_netdev $_srcaddr)
>>> if [ -n "$_static" ]; then
>>> _proto=none
>>> + elif is_ipv6_address $_srcaddr; then
>>> + if is_ipv6_auto $_netdev; then
>>> + _proto=auto6
>>> + else
>>> + _proto=dhcp6
>>> + fi
>>> else
>>> _proto=dhcp
>>> fi
>>> diff --git a/kdump-lib.sh b/kdump-lib.sh
>>> index d981c4f..ac4dc67 100755
>>> --- a/kdump-lib.sh
>>> +++ b/kdump-lib.sh
>>> @@ -310,6 +310,18 @@ is_atomic()
>>> grep -q "ostree" /proc/cmdline
>>> }
>>>
>>> +# fixme, try the best to decide whether the ipv6 addr is allocated by slaac
or dhcp6
>>> +is_ipv6_auto()
>>> +{
>>> + local _netdev=$1
>>> + local _auto=$(cat /proc/sys/net/ipv6/conf/$_netdev/autoconf)
>>> + if [ $_auto -eq 1 ]; then
>>> + return 0
>>> + else
>>> + return 1
>>> + fi
>>> +}
>>> +
>>> is_ipv6_address()
>>> {
>>> echo $1 | grep -q ":"
>>> --
>>> 2.7.4
>>> _______________________________________________
>>> kexec mailing list -- kexec(a)lists.fedoraproject.org
>>> To unsubscribe send an email to kexec-leave(a)lists.fedoraproject.org
>>
>> Pingfan, why we did not see this problem before during test? I remember
>> we talked about this, but I can not recall the reason now.
>>
> since auto6, a kernel thread decides ipv6 addr. Usually, this kernel
> thread runs and decides before the kdump service.
It seems not clear about what is the "kdump service" here.
I guess you means in 2nd kernel bootup phase, kernel gave ipv6 addr
and it happened to be before the dhcp request with dracut "dhcp" proto
Furthermore if kernel thread runs later then dhcp request will go first
and it will fail. Is this the case?
Yes.
BTW those background should be added to patchlog.
Ok, I will update it in v2
>>
>>> BTW, does this address the 3 cases we talked about dhcp? Just be
>>> curious but with auto first may be fine enough for now.
>>>
>> 3 cases: dhcpv6/ auto6=SLAAC + dns-by-dhcp/ totally configured by Router
>> Advertisement. Since the last method has defect of not fully supporting
>> all of the dhcp functions, it is rarely used. I can not find it in
>> dracut param. So auto6 is enough for present. Later I can test dhcpv6 if
>> we have the test env.
>
> Ok.
>
>>
>> Regards,
>> Pingfan
>
> Thanks
> Dave
>