tracker icon indicating copy to clipboard operation
tracker copied to clipboard

Confconsole: hostname plugin improvements; zeroconf plugin

Open JedMeister opened this issue 3 years ago • 5 comments

There have been some great Confconsole Hostname plugin (Advanced >> System Settings >> Hostname) improvement suggestions from Aaron on the forums. Plus some other related ideas. Namely:

  • pre-configure hostname in interfaces file (so it's updated when the Confconsole plugin is run, currently it will update it, but must first be manually set in the interfaces file)
  • display hostname before/when changing the hostname
  • ensure that the interfaces file includes the hostname by default (it already updates it if set)
  • zeroconf install/config plugin

JedMeister avatar Mar 06 '22 10:03 JedMeister

The hostname stuff should be in v18.0. The other suggestions are still outstanding.

JedMeister avatar Jul 21 '23 03:07 JedMeister

There seems to be a bug still in the "hostname stuff". I installed the latest turnkey-core on Proxmox. There is only one ethernet interface, eth0. It looks like turnkey added hostname core to eth1, even though that doesn't exist on my container and it's probably rare to have another ethernet interface in a container.

Also, the hostname has been changed to test2, but the one in the interfaces file has not been changed. I suspect that is because I didn't change the hostname in confconsole, yet. This might be a bug in the interaction between Proxmox's container setup and what Turnkey is expecting. I will have to learn more about that.

root@test2 ~# cat /etc/network/interfaces
# UNCONFIGURED INTERFACES
# remove the above line if you edit this file

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp

allow-hotplug eth1
iface eth1 inet dhcp
 hostname core
root@test2 ~# ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host noprefixroute
       valid_lft forever preferred_lft forever
2: eth0@if44: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether bc:24:11:82:26:e3 brd ff:ff:ff:ff:ff:ff link-netnsid 0
    inet 10.1.1.170/24 brd 10.1.1.255 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::be24:11ff:fe82:26e3/64 scope link
       valid_lft forever preferred_lft forever
root@test2 ~# host core
Host core not found: 3(NXDOMAIN)
root@test2 ~# host test2
Host test2 not found: 3(NXDOMAIN)

(Let me know if I should create a new issue for this.)

ebertland avatar Nov 02 '24 19:11 ebertland

Please point me to the code that is responsible for adding hostname to /etc/network/interfaces. I just started with Turnkey, and I'd like to be able to contribute suggested fixes when possible.

I'm also starting to wonder if Proxmox is to blame. Something is modifying the interfaces file when I reboot.

ebertland avatar Nov 02 '24 19:11 ebertland

G'day, sorry for the slow response. That does indeed look like a bug, I've reposted your initial response on a new issue https://github.com/turnkeylinux/tracker/issues/1997

OnGle avatar Nov 05 '24 09:11 OnGle

@ebertland

Something is modifying the interfaces file when I reboot.

I've replied more extensively over on https://github.com/turnkeylinux/tracker/issues/1997#issuecomment-2489889314 but to specifically respond to this; by default the Proxmox host updates the interfaces file on boot/reboot. To manage the network config within the container instead, in the guest run:

touch /etc/network/.pve-ignore.interfaces

JedMeister avatar Nov 21 '24 01:11 JedMeister