Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Release-1.26] - Error log when trying to find the interface comes without the interface #8425

Closed
manuelbuil opened this issue Sep 25, 2023 · 1 comment
Assignees
Milestone

Comments

@manuelbuil
Copy link
Contributor

Backport fix for Error log when trying to find the interface comes without the interface

@fmoral2
Copy link
Contributor

fmoral2 commented Sep 27, 2023

Validated on Version:

-$  k3s version v1.26.9+k3s-f8f888f4 (f8f888f4)

Environment Details

Infrastructure
Cloud EC2 instance

Node(s) CPU architecture, OS, and Version:
Ubuntu 22.04
Windows 2019

Cluster Configuration:
1 node servers

Steps to validate the fix

  1. Install k3s passing the flag for flannel interface with a mock one and another with a non-existing one
  2. Check logs of failure
  3. Need to find the interface name in the logs

Issue reprodution:

There is no interface named test on the node.

-$ curl https://get.k3s.io | INSTALL_K3S_COMMIT=xxxxxxx  sh -s - server --cluster-init --flannel-iface=test

Sep 27 15:37:58 ip-172-31-26-165 sh[17555]: Failed to get unit file state for nm-cloud-setup.service: No such file or directory
Sep 27 15:37:58 ip-172-31-26-165 k3s[17558]: time="2023-09-27T15:37:58Z" level=warning msg="unable to get global unicast ip from interface name: route ip+net: no such network interface"
Sep 27 15:37:58 ip-172-31-26-165 k3s[17558]: time="2023-09-27T15:37:58Z" level=fatal msg="invalid node-ip: invalid ip format ''"


Validation Results:


There is no interface named test on the node.

-$ curl https://get.k3s.io | INSTALL_K3S_COMMIT=xxxxxxxx  sh -s - server --cluster-init --flannel-iface=test

Sep 27 k3s[19315]: time="2023-09-27T15:42:39Z" level=fatal msg="interface test does not have a correct global unicast ip: route ip+net: no such network interface"




-$ create test interface mock
sudo ip link add name dummy0 type dummy
sudo ip link set dev dummy0 up

-$ curl https://get.k3s.io | INSTALL_K3S_COMMIT=xxxxxxxxxx  sh -s - server --cluster-init --flannel-iface=dummy0




Sep 27 k3s[10569]: time="2023-09-27T15:21:07Z" level=fatal msg="interface dummy0 does not have a correct global unicast ip: can't find ip for interface dummy0"


@fmoral2 fmoral2 closed this as completed Sep 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

2 participants