Ensure that br_netfilter module is loaded

pull/14/head
Darren Shepherd 6 years ago
parent ce93f17e28
commit 3f2a951564

@ -199,6 +199,7 @@ Documentation=https://k3s.io
After=network.target
[Service]
ExecStartPre=-/sbin/modprobe br_netfilter
ExecStartPre=-/sbin/modprobe overlay
ExecStart=/usr/local/bin/k3s server
KillMode=process

@ -4,6 +4,7 @@ Documentation=https://k3s.io
After=network.target
[Service]
ExecStartPre=-/sbin/modprobe br_netfilter
ExecStartPre=-/sbin/modprobe overlay
ExecStart=/usr/local/bin/k3s server
KillMode=process

@ -2,6 +2,7 @@ package syssetup
import (
"io/ioutil"
"os/exec"
"github.com/sirupsen/logrus"
)
@ -11,6 +12,7 @@ var (
)
func Configure() error {
exec.Command("modprobe", "br_netfilter").Run()
if err := ioutil.WriteFile(callIPTablesFile, []byte("1"), 0640); err != nil {
logrus.Warnf("failed to write value 1 at %s: %v", callIPTablesFile, err)
}

Loading…
Cancel
Save