FS#46694 - [filesystem] Add mymachines to /etc/nsswitch.conf hosts

Attached to Project: Arch Linux
Opened by Oskar Hahn (ostcar) - Tuesday, 13 October 2015, 14:39 GMT
Last edited by Sébastien Luttringer (seblu) - Thursday, 12 January 2017, 23:45 GMT
Task Type Feature Request
Category Packages: Core
Status Closed
Assigned To Sébastien Luttringer (seblu)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description:
At the moment archlinux does support systemd-nspawn containers with the default network configuration in /usr/lib/systemd/network/80-container-ve.network. This gives the container an ip address via dhcp. The problem is, that this IP address can change and therefore it is hard to configure services to connect to the containers. NSS supports hostname resolution for containers registered with systemd-machined. To activate this feature mymachines has to be added to the line *hosts* in /etc/nsswitch.conf provided by the filesystem package. See man nss-mymachines

Additional info:
* package version of filesystem: 2015.09-1
This task depends upon

Closed by  Sébastien Luttringer (seblu)
Thursday, 12 January 2017, 23:45 GMT
Reason for closing:  Fixed
Comment by Sébastien Luttringer (seblu) - Friday, 18 December 2015, 18:59 GMT
Make sense. Will ship a systemd based nsswitch by default.

Index: nsswitch.conf
===================================================================
--- nsswitch.conf (revision 256723)
+++ nsswitch.conf (working copy)
@@ -6,7 +6,7 @@

publickey: files

-hosts: files dns myhostname
+hosts: files resolve mymachines myhostname
networks: files

protocols: files
Comment by Damjan Georgievski (damjan) - Friday, 18 December 2015, 22:52 GMT
I'd advice against defaulting to nss-resolve at this time, since it still (as of 228) has some strange issues, and also the fallback is not ideal

breaks some apps:
https://github.com/systemd/systemd/issues/1965

and doesn't fallback when dbus is not available
https://github.com/systemd/systemd/issues/1692
Comment by Damjan Georgievski (damjan) - Thursday, 05 May 2016, 02:47 GMT
ps.
the issues in nss-resolve are fixed
also the issue with c-ares (looking for 'dns' in /etc/nsswitch.conf)

also relevant
https://bugs.archlinux.org/task/41655
Comment by Sébastien Luttringer (seblu) - Saturday, 05 November 2016, 18:42 GMT
should be ok in 2016.11-1

Loading...