Skip to content

File /etc/hosts corrupted by set-fqdn #7911

@DavidePrincipi

Description

@DavidePrincipi

On some NethServer 8 machines, the set-fqdn script comments out the IPv4 localhost entry in /etc/hosts, leaving only the IPv6 mapping:

# commented by set-fqdn #127.0.0.1   nethvoice localhost localhost.localdomain ...
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6

This causes localhost to resolve only to ::1 (IPv6 loopback).

Steps to reproduce

  • Insert the hostname in /etc/hosts, as a field of the 127.0.0.1 record. This is wrong, but some machines has it.
  • Change node hostname from cluster-admin

Expected behavior

The hostname is removed from record 127.0.0.1

Actual behavior

The whole record is commented out

Components

  • Core 3.18

See also


Thanks to @edospadoni

Metadata

Metadata

Labels

No labels
No labels

Type

Projects

Status

In Progress

Relationships

None yet

Development

No branches or pull requests

Issue actions