Machine name change after fedora upgrade

Hi,

I upgraded from fedora 34 to fedora 38.
The machine name visible on the admin console changed. I use magicdns, so all my scripts referencing this machine broke.
On the Admin console when clicking on the Machines tab → “…” → “Edit machine name” the switchable option’s label is “Auto-generate from OS hostname”

I’d assume (ha!) the best guess for a root cause is an unexpected fedora change, but I tried to pin down how tailscale gets the hostname to convince fedora, to report the same name as before the upgrade, but unfortunately after a cursory look in GitHub - tailscale/tailscale: The easiest, most secure way to use WireGuard and 2FA. I could not find how the machine name is generated.

Could somebody point me to the relevant lines on GitHub - tailscale/tailscale: The easiest, most secure way to use WireGuard and 2FA. ?

Thanks in advance!
fgergo

I am having a similar (or same?) issue: Linux mint point version upgrades makes the machine need to be reauthenticated, and once in the tailnet they have a new (“-1” appended) name. Quite annoying to have to reauth, delete old instance in tailscale, rename the new one to remove the “-1”.