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

Error log when trying to find the interface comes without the interface #8345

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

Comments

@manuelbuil
Copy link
Contributor

Environmental Info:
K3s Version:

Node(s) CPU architecture, OS, and Version:

Cluster Configuration:

Describe the bug:

If k3s has problems finding the interface, it fails without specifying what interface it is using:

INFO[0009] Waiting for control-plane node agent startup 
INFO[0010] Waiting to retrieve agent configuration; server is not ready: unable to find interface: route ip+net: no such network interface 

or

WARN[0000] unable to get global unicast ip from interface name: route ip+net: no such network interface 
FATA[0000] invalid node-ip: invalid ip format ''        
FATA[0000] child died: command [k3s server --rootless] exited: exit status 1 
FATA[0000] child exited: exit status 1

This makes debugging difficult

Steps To Reproduce:

  • Installed K3s:

Expected behavior:

Logs show the interface

Actual behavior:

Logs don't show the interface

Additional context / logs:

@fmoral2
Copy link
Contributor

fmoral2 commented Sep 27, 2023

Validated on Version:

-$  k3s version v1.28.2+k3s-2a9e8e68 (2a9e8e68)

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   sh[17555]: Failed to get unit file state for nm-cloud-setup.service: No such file or directory
Sep 27  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 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[18095]: time="2023-09-27T15:39:47Z" level=fatal msg="interface test does not have a correct global unicast ip: route ip+net: no such network interface"
Sep 27 15:39:47 ip-172-31-26-165 systemd[1]: k3s.service: Main process exited, code=exited, status=1/FAILURE




-$ 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=56abe7055fca997daf2bd88e67b1ddcb148c41b9  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
Status: Closed
Archived in project
Development

No branches or pull requests

2 participants