Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid erroring out when localhost cannot be resolved
During certificate generation, k0s makes an effort to compile a comprehensive list of SANs for the TLS certificates. Consequently, it tries to ensure that connections from localhost will function properly: It attempts to perform a lookup for localhost to include its IP address in the list of SANs. Although this lookup is typically expected to succeed, as it's assumed to be local to the machine anyways, it may fail in specific setups, leading to cluster formation issues. Instead of treating a failed IP lookup for localhost as a critical error, record the error in the logs and proceed with the execution. This approach is likely to be effective if localhost resolves to its standard address, 127.0.0.1. Additionally, introduce some log statements to capture errors that would otherwise go unnoticed, such as those arising from attempts to resolve the machine's hostname. Signed-off-by: Tom Wieczorek <[email protected]>
- Loading branch information