rancher / k3os

Purpose-built OS for Kubernetes, fully managed by Kubernetes.
https://k3os.io
Apache License 2.0
3.5k stars 401 forks source link

Network is not ready when executing run_cmd commands #850

Open brandhout opened 2 years ago

brandhout commented 2 years ago

Version (k3OS / kernel) k3os version v0.22.2-k3s2r0 5.4.0-88-generic

Architecture x86

Describe the bug Network is not ready when executing run_cmd commands, I can only run route commands or iptables commands in combination with a sleep.

To Reproduce Install a fresh k3os machine on kvm or bare metal

run_cmd:

Or some other route command or iptables

Expected behavior The route command is added to the system routing table

Actual behavior route: ioctl 0x890b failed: network unreachable sleep 5 && route add default gw 192.168.1.254 eth1 works

Additional context I've got two network interfaces, one connected to the internet (eth1) and one internal network without access to the internet.