mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Do not panic if failed to get ipvs family
Instead log a descriptive error message. Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
This commit is contained in:
parent
01b8eb7a84
commit
1dbff60121
1 changed files with 2 additions and 2 deletions
|
@ -59,12 +59,12 @@ func setup() {
|
||||||
ipvsOnce.Do(func() {
|
ipvsOnce.Do(func() {
|
||||||
var err error
|
var err error
|
||||||
if out, err := exec.Command("modprobe", "-va", "ip_vs").CombinedOutput(); err != nil {
|
if out, err := exec.Command("modprobe", "-va", "ip_vs").CombinedOutput(); err != nil {
|
||||||
logrus.Warnf("Running modprobe nf_nat failed with message: `%s`, error: %v", strings.TrimSpace(string(out)), err)
|
logrus.Warnf("Running modprobe ip_vs failed with message: `%s`, error: %v", strings.TrimSpace(string(out)), err)
|
||||||
}
|
}
|
||||||
|
|
||||||
ipvsFamily, err = getIPVSFamily()
|
ipvsFamily, err = getIPVSFamily()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic("could not get ipvs family")
|
logrus.Errorf("Could not get ipvs family information from the kernel. It is possible that ipvs is not enabled in your kernel. Native loadbalancing will not work until this is fixed.")
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue