Renaming a node mangles /etc/hosts #21

Closed
opened 2026-10-14 08:58:51 +00:00 by christianmanivong · 0 comments
Owner

system_mixin.py ~651-666 replaces \b<old_short>\b in /etc/hosts. \b matches before . and -: with an FQDN, 10.0.0.1 pve.old.lan pve becomes new.dom.old.lan new.dom, and pve-backup becomes new-backup. Fix: replace whole whitespace-separated tokens. Also to check: ~690-703 moves /etc/pve/nodes/<old> while the node still runs as <old>, which Proxmox's rename guidance does not support in a cluster (not tested).

Prio P3.

`system_mixin.py` ~651-666 replaces `\b<old_short>\b` in `/etc/hosts`. `\b` matches before `.` and `-`: with an FQDN, `10.0.0.1 pve.old.lan pve` becomes `new.dom.old.lan new.dom`, and `pve-backup` becomes `new-backup`. Fix: replace whole whitespace-separated tokens. Also to check: ~690-703 moves `/etc/pve/nodes/<old>` while the node still runs as `<old>`, which Proxmox's rename guidance does not support in a cluster (not tested). Prio P3.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: NAPALM/napalm-proxmox#21