drivers/macvlan: skip kernel version check
All distros that are supported by Docker now have at least kernel version 3.10, so this check should no longer be needed. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
02d313ca15
commit
6dde6cb0b0
2 changed files with 2 additions and 13 deletions
|
@ -3,7 +3,6 @@ package macvlan
|
|||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/docker/docker/pkg/parsers/kernel"
|
||||
"github.com/docker/docker/pkg/stringid"
|
||||
"github.com/docker/libnetwork/driverapi"
|
||||
"github.com/docker/libnetwork/netlabel"
|
||||
|
@ -17,15 +16,7 @@ import (
|
|||
// CreateNetwork the network for the specified driver type
|
||||
func (d *driver) CreateNetwork(nid string, option map[string]interface{}, nInfo driverapi.NetworkInfo, ipV4Data, ipV6Data []driverapi.IPAMData) error {
|
||||
defer osl.InitOSContext()()
|
||||
kv, err := kernel.GetKernelVersion()
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to check kernel version for %s driver support: %v", macvlanType, err)
|
||||
}
|
||||
// ensure Kernel version is >= v3.9 for macvlan support
|
||||
if kv.Kernel < macvlanKernelVer || (kv.Kernel == macvlanKernelVer && kv.Major < macvlanMajorVer) {
|
||||
return fmt.Errorf("kernel version failed to meet the minimum macvlan kernel requirement of %d.%d, found %d.%d.%d",
|
||||
macvlanKernelVer, macvlanMajorVer, kv.Kernel, kv.Major, kv.Minor)
|
||||
}
|
||||
|
||||
// reject a null v4 network
|
||||
if len(ipV4Data) == 0 || ipV4Data[0].Pool.String() == "0.0.0.0/0" {
|
||||
return fmt.Errorf("ipv4 pool is empty")
|
||||
|
|
|
@ -11,9 +11,7 @@ import (
|
|||
)
|
||||
|
||||
const (
|
||||
dummyPrefix = "dm-" // macvlan prefix for dummy parent interface
|
||||
macvlanKernelVer = 3 // minimum macvlan kernel support
|
||||
macvlanMajorVer = 9 // minimum macvlan major kernel support
|
||||
dummyPrefix = "dm-" // macvlan prefix for dummy parent interface
|
||||
)
|
||||
|
||||
// Create the macvlan slave specifying the source name
|
||||
|
|
Loading…
Add table
Reference in a new issue