[arch-dev-public] Adding nss-myhostname to the base group
Hi guys, I'd like to suggest that we add nss-myhostname to the base group, enable it by default in /etc/nsswitch.conf and make 'filesystem' depend on it. This means that the admin no longer has to make sure that /etc/hostname and /etc/hosts are kept in sync, as nss-myhostname will make sure that the local hostname can always be resolved. In particular this means that most people can leave /etc/hosts unchanged so it should simplify the configuration of a basic Arch system. For more information see: <http://0pointer.de/lennart/projects/nss-myhostname/>. Cheers, Tom
Am 22.10.2012 15:38, schrieb Tom Gundersen:
Hi guys,
I'd like to suggest that we add nss-myhostname to the base group, enable it by default in /etc/nsswitch.conf and make 'filesystem' depend on it.
This means that the admin no longer has to make sure that /etc/hostname and /etc/hosts are kept in sync, as nss-myhostname will make sure that the local hostname can always be resolved. In particular this means that most people can leave /etc/hosts unchanged so it should simplify the configuration of a basic Arch system.
For more information see: <http://0pointer.de/lennart/projects/nss-myhostname/>.
I just installed it for the first time, and I can confirm Lennart's assessment on the homepage - quote: "Current Status It works!" I also found it marginally useful. Comparing its marginal usefulness to the 28KB "installed size", you'll see a typical example of the bloat that Poettering adds to our hard drives. However, this works around a bug in minecraft, so +1!
On Monday 22 October 2012 15:48:32 Thomas Bächler wrote:
I just installed it for the first time, and I can confirm Lennart's assessment on the homepage - quote:
"Current Status
It works!"
I also found it marginally useful. Comparing its marginal usefulness to the 28KB "installed size", you'll see a typical example of the bloat that Poettering adds to our hard drives.
Same as Thomas, another +1. -- Andrea Arch Linux Developer
On Mon, Oct 22, 2012 at 4:13 PM, Andrea Scarpino <andrea@archlinux.org> wrote:
On Monday 22 October 2012 15:48:32 Thomas Bächler wrote:
I just installed it for the first time, and I can confirm Lennart's assessment on the homepage - quote:
"Current Status
It works!"
I also found it marginally useful. Comparing its marginal usefulness to the 28KB "installed size", you'll see a typical example of the bloat that Poettering adds to our hard drives.
Same as Thomas, another +1.
Implementing and moving to testing. Will keep it there for a few days. -t
On Tue, Oct 23, 2012 at 4:12 PM, Tom Gundersen <teg@jklm.no> wrote:
Implementing and moving to testing. Will keep it there for a few days.
Thomas just pointed out that nss-myhostname appears with target repository [extra] rather than [core] in archweb, so people might not know to signoff on it. So, if you have tested it out, please sign off nss-myhostname, both architectures. Cheers, Tom
On 10/22/2012 10:38 AM, Tom Gundersen wrote:
Hi guys,
I'd like to suggest that we add nss-myhostname to the base group, enable it by default in /etc/nsswitch.conf and make 'filesystem' depend on it.
This means that the admin no longer has to make sure that /etc/hostname and /etc/hosts are kept in sync, as nss-myhostname will make sure that the local hostname can always be resolved. In particular this means that most people can leave /etc/hosts unchanged so it should simplify the configuration of a basic Arch system.
For more information see: <http://0pointer.de/lennart/projects/nss-myhostname/>.
Cheers,
Tom
This is nice while your configured internet connection works :) At least under my scenario (behind a router), DNS setup to my ISP, If internet connection goes down, all programs that tries to resolve local hostname will "sleep" in connect(2) [called by getaddrinfo(3)], until reaches timeout. I detected this while, while my internet conection fails, and I try to launch mc, it takes longer time, so adding back my hostname line to "hosts" workaround the issue. -- Gerardo Exequiel Pozzi \cos^2\alpha + \sin^2\alpha = 1
On Sat, Oct 27, 2012 at 6:46 AM, Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar> wrote:
This is nice while your configured internet connection works :)
At least under my scenario (behind a router), DNS setup to my ISP, If internet connection goes down, all programs that tries to resolve local hostname will "sleep" in connect(2) [called by getaddrinfo(3)], until reaches timeout. I detected this while, while my internet conection fails, and I try to launch mc, it takes longer time, so adding back my hostname line to "hosts" workaround the issue.
I think this might be because the order in nsswitch.conf is wrong. Please retest with this line: hosts: files myhostname dns
On 10/27/2012 02:50 AM, Jan Steffens wrote:
On Sat, Oct 27, 2012 at 6:46 AM, Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar> wrote:
This is nice while your configured internet connection works :)
At least under my scenario (behind a router), DNS setup to my ISP, If internet connection goes down, all programs that tries to resolve local hostname will "sleep" in connect(2) [called by getaddrinfo(3)], until reaches timeout. I detected this while, while my internet conection fails, and I try to launch mc, it takes longer time, so adding back my hostname line to "hosts" workaround the issue. 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?... -- Gerardo Exequiel Pozzi \cos^2\alpha + \sin^2\alpha = 1
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."
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
participants (5)
-
Andrea Scarpino
-
Gerardo Exequiel Pozzi
-
Jan Steffens
-
Thomas Bächler
-
Tom Gundersen