From dee6fa9d2dd67384e6bbf1f46fe2f1707ca2eae7 Mon Sep 17 00:00:00 2001 From: Yousong Zhou Date: Fri, 11 Oct 2019 15:32:31 +0000 Subject: [PATCH] hostman: ensure openvswitch won't automatically start at boot --- pkg/hostman/hostinfo/hostbridge/ovs.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkg/hostman/hostinfo/hostbridge/ovs.go b/pkg/hostman/hostinfo/hostbridge/ovs.go index 6edd94510d..8eb0aceb01 100644 --- a/pkg/hostman/hostinfo/hostbridge/ovs.go +++ b/pkg/hostman/hostinfo/hostbridge/ovs.go @@ -326,6 +326,12 @@ func OVSPrepare() error { if !ovs.IsInstalled() { return fmt.Errorf("Service openvswitch not installed!") } + if ovs.IsEnabled() { + err := ovs.Disable() + if err != nil { + log.Errorf("Disabling openvswitch service failed: %v", err) + } + } if !ovs.IsActive() { return ovs.Start(false) }