You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
During our daily work, we found that some cases may cause Secondary IP leakage:
cni was killed when it handled an IP which has not yet been persisted.
Failed to release IP.
Bugs.
These IPs are not bound to any Pod and can never be used again. We need a garbage collector to collect and release them.
STW
During the execution of gc, any IP allocation and release should be blocked, otherwise the IP in the intermediate state may be released by mistake. That is so called, Stop The World.
For node without ipamd, we can use filelock to ensure that gc and cni are mutually exclusive.
For node who has ipamd, the gc can be added to ipamd's main loop to implement stw.
Trigger
We have two ways to trigger gc:
Triggered by cnictl clean ip command manually.
Triggered by ipamd schedully (default per day).
cnictl
The commands list for cnictl:
cnictl status ip: Show the number of IPs used by Pods, pre-allocated by ipamd, and idle to be recycled. The IPs will be printed too with -a.
cnictl logs: Show cni logs (/var/log/cnivpc.log).
cnictl clean ip: Clean unused IPs. If the current node has ipamd, it will call ipamd (grpc) to clean.
The text was updated successfully, but these errors were encountered:
Quo
During our daily work, we found that some cases may cause Secondary IP leakage:
These IPs are not bound to any Pod and can never be used again. We need a garbage collector to collect and release them.
STW
During the execution of gc, any IP allocation and release should be blocked, otherwise the IP in the intermediate state may be released by mistake. That is so called,
Stop The World
.filelock
to ensure that gc and cni are mutually exclusive.Trigger
We have two ways to trigger gc:
cnictl clean ip
command manually.cnictl
The commands list for
cnictl
:cnictl status ip
: Show the number of IPs used by Pods, pre-allocated by ipamd, and idle to be recycled. The IPs will be printed too with-a
.cnictl logs
: Show cni logs (/var/log/cnivpc.log).cnictl clean ip
: Clean unused IPs. If the current node has ipamd, it will call ipamd (grpc) to clean.The text was updated successfully, but these errors were encountered: