mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-21 10:51:29 +00:00
If you can't set hashsize on nf_conntrack don't fail
This commit is contained in:
parent
1ce39a6a5c
commit
deeccfbafb
@ -89,7 +89,10 @@ func (rct realConntracker) SetMax(ctx context.Context, max int) error {
|
|||||||
}
|
}
|
||||||
// TODO: generify this and sysctl to a new sysfs.WriteInt()
|
// TODO: generify this and sysctl to a new sysfs.WriteInt()
|
||||||
logger.Info("Setting conntrack hashsize", "conntrackHashsize", max/4)
|
logger.Info("Setting conntrack hashsize", "conntrackHashsize", max/4)
|
||||||
return writeIntStringFile("/sys/module/nf_conntrack/parameters/hashsize", max/4)
|
if err := writeIntStringFile("/sys/module/nf_conntrack/parameters/hashsize", max/4); err != nil {
|
||||||
|
logger.Error(err, "failed to set conntrack hashsize", "conntrackHashsize", max/4)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (rct realConntracker) SetTCPEstablishedTimeout(ctx context.Context, seconds int) error {
|
func (rct realConntracker) SetTCPEstablishedTimeout(ctx context.Context, seconds int) error {
|
||||||
|
Loading…
Reference in New Issue
Block a user