[arch-dev-public] Adding nss-myhostname to the base group

Gerardo Exequiel Pozzi vmlinuz386 at yahoo.com.ar
Sat Oct 27 06:08:48 EDT 2012


On 10/27/2012 06:19 AM, Thomas Bächler wrote:
> Am 27.10.2012 11:11, schrieb Gerardo Exequiel Pozzi:
>>> I think this might be because the order in nsswitch.conf is wrong.
>>> Please retest with this line:
>>> hosts: files myhostname dns
>>>
>> Yup in that case works, I suspected that something goes from this place.
>>
>> The good question is: should be changed to this order by default?...
> What _should_ happen is this: When your network goes down, you get a "no
> route to host" from DNS rather quickly and thus DNS fails quickly.
>
> Our default is a sane one: "It is recommended to put myhostname last in
> the nsswitch.conf line to make sure that this mapping is only used as
> fallback, and any DNS or /etc/hosts based mapping takes precedence."
>
>

Yes sure, default is the sane only if your ISP works fine :)

Basically this happens, depending on the program from one time to more 
times, so every attemp represents a 20 seconds of delay, in the most 
common scenario of two nameservers. For example "mc" does this lookup 
two times => 40 seconds to start.

06:54:59 socket(PF_INET, SOCK_DGRAM|SOCK_NONBLOCK, IPPROTO_IP) = 3
06:54:59 connect(3, {sa_family=AF_INET, sin_port=htons(53), 
sin_addr=inet_addr("200.45.191.35")}, 16) = 0
06:54:59 gettimeofday({1351331699, 639042}, NULL) = 0
06:54:59 poll([...], 1, 0)              = 1 ([...])
06:54:59 send(3, ""..., 25, MSG_NOSIGNAL) = 25
06:54:59 poll([...], 1, 5000)           = 0 (Timeout)
06:55:04 socket(PF_INET, SOCK_DGRAM|SOCK_NONBLOCK, IPPROTO_IP) = 4
06:55:04 connect(4, {sa_family=AF_INET, sin_port=htons(53), 
sin_addr=inet_addr("200.45.48.233")}, 16) = 0
06:55:04 gettimeofday({1351331704, 644756}, NULL) = 0
06:55:04 poll([...], 1, 0)              = 1 ([...])
06:55:04 send(4, ""..., 25, MSG_NOSIGNAL) = 25
06:55:04 poll([...], 1, 5000)           = 0 (Timeout)
06:55:09 gettimeofday({1351331709, 649670}, NULL) = 0
06:55:09 poll([...], 1, 0)              = 1 ([...])
06:55:09 send(3, ""..., 25, MSG_NOSIGNAL) = 25
06:55:09 poll([...], 1, 5000)           = 0 (Timeout)
06:55:14 gettimeofday({1351331714, 654667}, NULL) = 0
06:55:14 poll([...], 1, 0)              = 1 ([...])
06:55:14 send(4, ""..., 25, MSG_NOSIGNAL) = 25
06:55:14 poll([...], 1, 5000)           = 0 (Timeout)
06:55:19 close(3)                       = 0


-- 
Gerardo Exequiel Pozzi
\cos^2\alpha + \sin^2\alpha = 1



More information about the arch-dev-public mailing list