Probe whether the kernel has ODP vxlan support
It's possible to build that kernel with openvswitch, and vxlan, but without the vport_vxlan module that glues them together. And at least one distro has actually done this.
This commit is contained in:
1 parent
a6336149f8
commit
38f78286c7
2 files changed
+44
-8
No files matched your search
+6
-3
@@ -13,7 +13,6 @@ import (
|
||||
"github.com/davecheney/profile"
|
||||
"github.com/docker/docker/pkg/mflag"
|
||||
"github.com/gorilla/mux"
|
||||
"github.com/weaveworks/go-odp/odp"
|
||||
|
||||
. "github.com/weaveworks/weave/common"
|
||||
"github.com/weaveworks/weave/common/docker"
|
||||
@@ -119,8 +118,12 @@ func main() {
|
||||
os.Exit(0)
|
||||
|
||||
case createDatapath:
|
||||
err := weave.CreateDatapath(datapathName)
|
||||
if odp.IsKernelLacksODPError(err) {
|
||||
err, odp_supported := weave.CreateDatapath(datapathName)
|
||||
if !odp_supported {
|
||||
if err != nil {
|
||||
Log.Error(err)
|
||||
}
|
||||
|
||||
// When the kernel lacks ODP support, exit
|
||||
// with a special status to distinguish it for
|
||||
// the weave script.
|
||||
|
||||
Reference in new issue
Block a user