tech-net archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS import: src/external/bsd/dhcpcd/dist



This update changes existing behavior, which may have unexpected
consequences when people upgrade. I observed pkg_chk failing to read a
pkgchk_… file because the hostname was changed after a reboot :-(

Anyway I see two issues here:

 1. If hostname is set in /etc/rc.conf, I strongly think that this
should be set as the machine's hostname (FQDN or short or anything
else). In this case dhcpcd should not try to (re)set it. That keeps
the system manager in control.
 2. If hostname is not set in /etc/rc.conf I see no problem in dhcpcd
trying to define and set a hostname, e.g. by using a value provided by
the dhcp server. For multi-homed machines, this may be ambiguous if
several names may be supplied for several interfaces and/or IPv6 and
v4, but I still prefer using the selected value unchanged in order to
keep the network manager in control.

Whether hostnames ideally should be short names or FQDN's seems to be
an almost religious issue. I happen to be of the kind of person who
has always used FQDN's as hostname except on OS'es that did not allow
it. However, if the value from /etc/rc.conf is used, I'm less
concerned about what dhcpcd does in other cases.

- Erik


2013/7/23 Roy Marples <roy%marples.name@localhost>
>
> As dyoung said, lets move this bikeshed to tech-net@
>
>
> On 23/07/2013 8:09, David Laight wrote:
>>
>> On Sun, Jul 21, 2013 at 06:35:47PM +0200, Marc Balmer wrote:
>>>
>>> Am 20.07.13 18:44, schrieb Roy Marples:
>>> > David Holland <dholland-sourcechanges%netbsd.org@localhost> writes:
>>> >> On Fri, Jul 19, 2013 at 07:15:52PM -0700, Erik Fair wrote:
>>> >>  > > * dhcpcd will now assign a short hostname by default
>>> >>  > >  To use a FQDN hostname, set this in dhcpcd.conf(5)
>>> >>  > >  env hostname_fqdn=YES
>>> >>  >
>>> >>  > This is the wrong default, too - hostname should always be FQDN.
>>> >>
>>> >> This is far from universally agreed upon.
>>> >>
>>> >> However, ISTM that if dhcpcd is going to set the hostname at all
>>> >> (which is usually wrong) it should set the hostname the dhcp server
>>> >> provides and not try to munge it.
>>> >
>>> > Which hostname should dhcpcd set?
>
>
> You can read the rest of my snipped comment directly above here
> http://mail-index.netbsd.org/source-changes-d/2013/07/20/msg005999.html
>
> TLDR: I justify the use of a short hostname with what I think are sound 
> technical reasons.
>
>
>>>
>>> imo, dhcpcd should not set a hostname at all, at least not by default.
>>
>>
>> Maybe it should only set it if no other hostname has been set?
>
>
> Maybe you should at least read the first paragraph of dhcpcd(8) before 
> commenting?
>
> Roy

2013/7/23 Erik Bertelsen <bertelsen.erik%gmail.com@localhost>:
> This update changes existing behavior, which may have unexpected
> consequences when people upgrade. I observed pkg_chk failing to read a
> pkgchk_… file because the hostname was changed after a reboot :-(
>
> Anyway I see two issues here:
>
>  1. If hostname is set in /etc/rc.conf, I strongly think that this should be
> set as the machine's hostname (FQDN or short or anything else). In this case
> dhcpcd should not try to (re)set it. That keeps the system manager in
> control.
>  2. If hostname is not set in /etc/rc.conf I see no problem in dhcpcd trying
> to define and set a hostname, e.g. by using a value provided by the dhcp
> server. For multi-homed machines, this may be ambiguous if several names may
> be supplied for several interfaces and/or IPv6 and v4, but I still prefer
> using the selected value unchanged in order to keep the network manager in
> control.
>
> Whether hostnames ideally should be short names or FQDN's seems to be an
> almost religious issue. I happen to be of the kind of person who has always
> used FQDN's as hostname except on OS'es that did not allow it. However, if
> the value from /etc/rc.conf is used, I'm less concerned about what dhcpcd
> does in other cases.
>
> - Erik
>
>
>
> 2013/7/23 Roy Marples <roy%marples.name@localhost>
>>
>> As dyoung said, lets move this bikeshed to tech-net@
>>
>>
>> On 23/07/2013 8:09, David Laight wrote:
>>>
>>> On Sun, Jul 21, 2013 at 06:35:47PM +0200, Marc Balmer wrote:
>>>>
>>>> Am 20.07.13 18:44, schrieb Roy Marples:
>>>> > David Holland <dholland-sourcechanges%netbsd.org@localhost> writes:
>>>> >> On Fri, Jul 19, 2013 at 07:15:52PM -0700, Erik Fair wrote:
>>>> >>  > > * dhcpcd will now assign a short hostname by default
>>>> >>  > >  To use a FQDN hostname, set this in dhcpcd.conf(5)
>>>> >>  > >  env hostname_fqdn=YES
>>>> >>  >
>>>> >>  > This is the wrong default, too - hostname should always be FQDN.
>>>> >>
>>>> >> This is far from universally agreed upon.
>>>> >>
>>>> >> However, ISTM that if dhcpcd is going to set the hostname at all
>>>> >> (which is usually wrong) it should set the hostname the dhcp server
>>>> >> provides and not try to munge it.
>>>> >
>>>> > Which hostname should dhcpcd set?
>>
>>
>> You can read the rest of my snipped comment directly above here
>> http://mail-index.netbsd.org/source-changes-d/2013/07/20/msg005999.html
>>
>> TLDR: I justify the use of a short hostname with what I think are sound
>> technical reasons.
>>
>>
>>>>
>>>> imo, dhcpcd should not set a hostname at all, at least not by default.
>>>
>>>
>>> Maybe it should only set it if no other hostname has been set?
>>
>>
>> Maybe you should at least read the first paragraph of dhcpcd(8) before
>> commenting?
>>
>> Roy
>
>


Home | Main Index | Thread Index | Old Index