Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: pick first interface valid hostname (vs. last one)
Looks like the code before change in siderolabs#1578 returned the first hostname found while interating over interfaces and addressing methods, but siderolabs#1578 supposedly inadvertently flipped that to iterate over all interfaces (so last interface wins). Problem is that both `DHCP` and `Static` addressing methods provide hostnames, while DHCP hostname comes from DHCP server, while `Static` defines hostname as `talos-10-5-0-2` (by IP). If we were to fix it for real, we should build a list of hostname with priorities coming from different sources and pick a hostname with the highest priority, so this fix is more of a bandaid rather than a real fix. Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
- Loading branch information