forked from cilium/cilium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
init.sh: install ip rules and routes with proto kernel
In order to workaround systemd's bad recent changes where they decided to manage "foreign" rules and to flush them on certain events (e.g. device flap), we should add our rules as "proto kernel" so systemd will just skip them and leave them in place in such events. Every modern system with a new systemd running Cilium or other CNIs could experience a full network outage (not only k8s NICs) because systemd would flush the rule for local traffic lookup (from all lookup local) which causes full network outage for the node[1]. [1] Normal rules with Cilium deployed look like: $ ip ru 9: from all fwmark 0x200/0xf00 lookup 2004 10: from all fwmark 0xa00/0xf00 lookup 2005 100: from all lookup local 32766: from all lookup main 32767: from all lookup default After a network event we see systemd flushing all unspec rules (9, 10 and 100, the last one being critical): $ ip rule list 32766: from all lookup main 32767: from all lookup default This leads to complete network outage for the node. With this change the rules remain in place and everything continues working as expected. Signed-off-by: Nikolay Aleksandrov <[email protected]>
- Loading branch information
Showing
2 changed files
with
13 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters