gravitl / netclient

Apache License 2.0
66 stars 31 forks source link

netclient SILENTLY LOSES additional information in /etc/hosts, eg: additional host names, comments and spacing #167

Closed ootada closed 1 year ago

ootada commented 1 year ago

Problem:

netclient SILENTLY LOSES additional information in /etc/hosts, eg: additional host names, comments and spacing

Expected:

do not touch existing lines / no reconstruction. keep changes to your own section.

Impact:

potentially breaks other applications that rely on hosts file

Version

v0.17.1

Example:

127.0.1.1    host host.domain.com other.domain
127.0.1.1 node # comment

becomes:

127.0.1.1 host
127.0.1.1 node
ootada commented 1 year ago

https://github.com/gravitl/netmaker/issues/1874

taladar commented 1 year ago

This also breaks fully qualified hostnames via hostname -f since this is usually determined by looking up the hostname, then looking up the IP returned from the first lookup.

That means e.g. netmaker keeps breaking our puppet node names because puppet uses the FQDN as the default node name. I am sure other software also breaks when the FQDN breaks (e.g. mail).

ootada commented 1 year ago

^this.is.quite a show stopper (breaks a few more site specific things for me).

mattkasun commented 1 year ago

211 updates how /etc/hosts entries are created, modified and deleted. netclient will only now only delete entries it has created.