On 03/03/2016 at 01:50 PM, Minfei Huang wrote:
On 03/03/16 at 01:07pm, Xunlei Pang wrote:
> On 03/03/2016 at 12:42 PM, Minfei Huang wrote:
>> On 03/03/16 at 12:21pm, Xunlei Pang wrote:
>>> On 03/03/2016 at 11:40 AM, Minfei Huang wrote:
>>>> On 03/03/16 at 10:49am, Xunlei Pang wrote:
>>>>> Currently kdump uses dracut's "nameserver=" command to
hande DNS,
>>>> handle
>>>>> it is acquired both from ifcfg files and
"/etc/resolv.conf".
>>>>>
>>>>> This is improper for dhcp cases, as "/etc/resolv.conf" is
generated
>>>>> by dhcp, the proper logic should be:
>>>>> 1) For static cases, DNS can be acquired from corresponding ifcfg
file.
>>>>> 2) For dhcp cases, DNS is normally generated by dhcp, but extra DNS
>>>>> can still be specified in the ifcfg files mannually.
>>>>> 3) For special user-assigned DNS not specified in any ifcfg file, we
can
>>>>> pass it to dracut via "nameserver=".
>>>> This patch may cause a regression, since kdump doesn't take care of
>>>> /etc/resolv.conf. Kdump kernel cann't get proper DNS, if it is
appended
>>>> manually in /etc/resolv.conf.
>>>>
>>>>
https://bugzilla.redhat.com/show_bug.cgi?id=1196085
>>> IIRC(I will double check that) I've tested the case that adding manually
a
>>> DNS entry into /etc/resolv.conf, after reboot the manually added entry will
>>> be cleaned up by the system using that in the ifcfg files.
>> Yes, /etc/resolv.conf will be re-generated after booting. For production
>> environment, it is more convenience to use script to append manual DNS.
> Yes, so in my view, we can ignore /etc/resolv.conf completely.
Hmm, I think kdump should handle it as well. For a large number of
machines, it is difficult to configure DNS manually in general.
For large number of machines, they should rely on dhcp to deploy,
specifying DNS directly through /etc/resolv.conf is not standard,
the info will be overridden by the info in ifcfg files and dhcp after
each reboot (I verified this both on RHEL and fedora), so it would
be better if kdump can follow the same way as RHEL and fedora.
If customers want to add extra DNS to kdump, the recommended way
is specifying them in the corresponding ifcfg file. But they also can do
it through cmdline using dracut's "nameserver=" command, or just
specify them in /etc/sysconfig/kdump via KDUMP_COMMANDLINE_APPEND.
Just regard /etc/resolv.conf as a temporary volatile memory.
Regards,
Xunlei
Thanks
Minfei