Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Chu Peng 楚鹏
minikube
提交
be58227d
M
minikube
项目概览
Chu Peng 楚鹏
/
minikube
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
M
minikube
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
be58227d
编写于
6月 24, 2019
作者:
M
Medya Ghazizadeh
提交者:
GitHub
6月 24, 2019
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #4582 from medyagh/medyagh-type_check_lint
Improve typecheck for driver options
上级
550218e7
34fda98f
变更
19
隐藏空白更改
内联
并排
Showing
19 changed file
with
96 addition
and
57 deletion
+96
-57
cmd/minikube/cmd/config/config_test.go
cmd/minikube/cmd/config/config_test.go
+3
-1
cmd/minikube/cmd/config/util_test.go
cmd/minikube/cmd/config/util_test.go
+3
-2
cmd/minikube/cmd/start.go
cmd/minikube/cmd/start.go
+19
-13
pkg/drivers/hyperkit/driver.go
pkg/drivers/hyperkit/driver.go
+2
-2
pkg/drivers/kvm/kvm.go
pkg/drivers/kvm/kvm.go
+1
-1
pkg/minikube/cluster/cluster.go
pkg/minikube/cluster/cluster.go
+10
-10
pkg/minikube/config/config_test.go
pkg/minikube/config/config_test.go
+3
-1
pkg/minikube/constants/constants.go
pkg/minikube/constants/constants.go
+41
-14
pkg/minikube/drivers/hyperkit/driver.go
pkg/minikube/drivers/hyperkit/driver.go
+1
-1
pkg/minikube/drivers/hyperv/driver.go
pkg/minikube/drivers/hyperv/driver.go
+1
-1
pkg/minikube/drivers/kvm/driver.go
pkg/minikube/drivers/kvm/driver.go
+1
-1
pkg/minikube/drivers/kvm2/driver.go
pkg/minikube/drivers/kvm2/driver.go
+1
-1
pkg/minikube/drivers/parallels/driver.go
pkg/minikube/drivers/parallels/driver.go
+1
-1
pkg/minikube/drivers/virtualbox/driver.go
pkg/minikube/drivers/virtualbox/driver.go
+1
-1
pkg/minikube/drivers/vmware/driver.go
pkg/minikube/drivers/vmware/driver.go
+1
-1
pkg/minikube/drivers/vmwarefusion/driver.go
pkg/minikube/drivers/vmwarefusion/driver.go
+1
-1
pkg/minikube/drivers/xhyve/driver.go
pkg/minikube/drivers/xhyve/driver.go
+1
-1
pkg/minikube/machine/client_test.go
pkg/minikube/machine/client_test.go
+3
-3
pkg/minikube/tunnel/tunnel.go
pkg/minikube/tunnel/tunnel.go
+2
-1
未找到文件。
cmd/minikube/cmd/config/config_test.go
浏览文件 @
be58227d
...
...
@@ -20,6 +20,8 @@ import (
"bytes"
"fmt"
"testing"
"k8s.io/minikube/pkg/minikube/constants"
)
type
configTestCase
struct
{
...
...
@@ -47,7 +49,7 @@ var configTestCases = []configTestCase{
"vm-driver": "kvm"
}`
,
config
:
map
[
string
]
interface
{}{
"vm-driver"
:
"kvm"
,
"vm-driver"
:
constants
.
DriverKvmOld
,
"cpus"
:
4
,
"disk-size"
:
"20g"
,
"v"
:
5
,
...
...
cmd/minikube/cmd/config/util_test.go
浏览文件 @
be58227d
...
...
@@ -21,10 +21,11 @@ import (
"k8s.io/minikube/pkg/minikube/assets"
pkgConfig
"k8s.io/minikube/pkg/minikube/config"
"k8s.io/minikube/pkg/minikube/constants"
)
var
minikubeConfig
=
pkgConfig
.
MinikubeConfig
{
"vm-driver"
:
"kvm"
,
"vm-driver"
:
constants
.
DriverKvmOld
,
"cpus"
:
12
,
"show-libmachine-logs"
:
true
,
}
...
...
@@ -47,7 +48,7 @@ func TestFindSetting(t *testing.T) {
}
func
TestSetString
(
t
*
testing
.
T
)
{
err
:=
SetString
(
minikubeConfig
,
"vm-driver"
,
"virtualbox"
)
err
:=
SetString
(
minikubeConfig
,
"vm-driver"
,
constants
.
DriverVirtualbox
)
if
err
!=
nil
{
t
.
Fatalf
(
"Couldnt set string: %v"
,
err
)
}
...
...
cmd/minikube/cmd/start.go
浏览文件 @
be58227d
...
...
@@ -175,14 +175,7 @@ func runStart(cmd *cobra.Command, args []string) {
console
.
OutStyle
(
console
.
Happy
,
"minikube %s on %s (%s)"
,
version
.
GetVersion
(),
runtime
.
GOOS
,
runtime
.
GOARCH
)
validateConfig
()
currentUser
,
err
:=
user
.
Current
()
// Display warning if minikube is being started with root and vmDriver is not HyperV
if
err
!=
nil
{
glog
.
Errorf
(
"Error getting the current user: %v"
,
err
)
}
else
if
currentUser
.
Name
==
"root"
&&
!
(
viper
.
GetString
(
vmDriver
)
==
"hyperv"
||
viper
.
GetString
(
vmDriver
)
==
"none"
)
{
console
.
OutStyle
(
console
.
WarningType
,
"Please don't run minikube as root or with 'sudo' privileges. It isn't necessary."
)
}
validateUser
()
oldConfig
,
err
:=
cfg
.
Load
()
if
err
!=
nil
&&
!
os
.
IsNotExist
(
err
)
{
...
...
@@ -231,11 +224,12 @@ func runStart(cmd *cobra.Command, args []string) {
host
,
preexisting
:=
startHost
(
m
,
config
.
MachineConfig
)
ip
:=
validateNetwork
(
host
)
//
Makes minikube node ip to bypass http(s) proxy. since it is local traffic.
//
Bypass proxy for minikube's vm ip
err
=
proxy
.
ExcludeIP
(
ip
)
if
err
!=
nil
{
console
.
ErrStyle
(
console
.
FailureType
,
"Failed to set NO_PROXY Env. Please use `export NO_PROXY=$NO_PROXY,%s`."
,
ip
)
}
// Save IP to configuration file for subsequent use
config
.
KubernetesConfig
.
NodeIP
=
ip
if
err
:=
saveConfig
(
config
);
err
!=
nil
{
...
...
@@ -364,6 +358,18 @@ func selectImageRepository(mirrorCountry string, k8sVersion string) (bool, strin
return
false
,
fallback
,
nil
}
// validerUser validates minikube is run by the recommended user (privileged or regular)
func
validateUser
()
{
currentUser
,
err
:=
user
.
Current
()
// Display warning if minikube is being started with root and vmDriver is not HyperV
if
err
!=
nil
{
glog
.
Errorf
(
"Error getting the current user: %v"
,
err
)
}
else
if
currentUser
.
Name
==
"root"
&&
!
(
viper
.
GetString
(
vmDriver
)
==
constants
.
DriverHyperv
||
viper
.
GetString
(
vmDriver
)
==
constants
.
DriverNone
)
{
console
.
OutStyle
(
console
.
WarningType
,
"Please don't run minikube as root or with 'sudo' privileges. It isn't necessary."
)
}
}
// validateConfig validates the supplied configuration against known bad combinations
func
validateConfig
()
{
diskSizeMB
:=
pkgutil
.
CalculateDiskSizeInMB
(
viper
.
GetString
(
humanReadableDiskSize
))
...
...
@@ -371,11 +377,11 @@ func validateConfig() {
exit
.
WithCode
(
exit
.
Config
,
"Requested disk size (%dMB) is less than minimum of %dMB"
,
diskSizeMB
,
constants
.
MinimumDiskSizeMB
)
}
if
viper
.
GetBool
(
gpu
)
&&
viper
.
GetString
(
vmDriver
)
!=
"kvm2"
{
exit
.
Usage
(
"Sorry, the --gpu feature is currently only supported with --vm-driver=
kvm2"
)
if
viper
.
GetBool
(
gpu
)
&&
viper
.
GetString
(
vmDriver
)
!=
constants
.
DriverKvm2
{
exit
.
Usage
(
"Sorry, the --gpu feature is currently only supported with --vm-driver=
%s"
,
constants
.
DriverKvm2
)
}
if
viper
.
GetBool
(
hidden
)
&&
viper
.
GetString
(
vmDriver
)
!=
"kvm2"
{
exit
.
Usage
(
"Sorry, the --hidden feature is currently only supported with --vm-driver=
kvm2"
)
if
viper
.
GetBool
(
hidden
)
&&
viper
.
GetString
(
vmDriver
)
!=
constants
.
DriverKvm2
{
exit
.
Usage
(
"Sorry, the --hidden feature is currently only supported with --vm-driver=
%s"
,
constants
.
DriverKvm2
)
}
err
:=
autoSetOptions
(
viper
.
GetString
(
vmDriver
))
...
...
pkg/drivers/hyperkit/driver.go
浏览文件 @
be58227d
...
...
@@ -118,7 +118,7 @@ func (d *Driver) Create() error {
// DriverName returns the name of the driver
func
(
d
*
Driver
)
DriverName
()
string
{
return
"hyperkit"
return
constants
.
DriverHyperkit
}
// GetSSHHostname returns hostname for use with ssh
...
...
@@ -223,7 +223,7 @@ func (d *Driver) Start() error {
h
.
Memory
=
d
.
Memory
h
.
UUID
=
d
.
UUID
// This should stream logs from hyperkit, but doesn't seem to work.
logger
:=
golog
.
New
(
os
.
Stderr
,
"hyperkit"
,
golog
.
LstdFlags
)
logger
:=
golog
.
New
(
os
.
Stderr
,
constants
.
DriverHyperkit
,
golog
.
LstdFlags
)
h
.
SetLogger
(
logger
)
if
vsockPorts
,
err
:=
d
.
extractVSockPorts
();
err
!=
nil
{
...
...
pkg/drivers/kvm/kvm.go
浏览文件 @
be58227d
...
...
@@ -220,7 +220,7 @@ func (d *Driver) GetSSHHostname() (string, error) {
// DriverName returns the name of the driver
func
(
d
*
Driver
)
DriverName
()
string
{
return
"kvm2"
return
constants
.
DriverKvm2
}
// Kill stops a host forcefully, including any containers that we are managing.
...
...
pkg/minikube/cluster/cluster.go
浏览文件 @
be58227d
...
...
@@ -254,7 +254,7 @@ func DeleteHost(api libmachine.API) error {
return
errors
.
Wrap
(
err
,
"load"
)
}
// This is slow if SSH is not responding, but HyperV hangs otherwise, See issue #2914
if
host
.
Driver
.
DriverName
()
==
"hyperv"
{
if
host
.
Driver
.
DriverName
()
==
constants
.
DriverHyperv
{
trySSHPowerOff
(
host
)
}
...
...
@@ -320,21 +320,21 @@ func engineOptions(config cfg.MachineConfig) *engine.Options {
func
preCreateHost
(
config
*
cfg
.
MachineConfig
)
{
switch
config
.
VMDriver
{
case
"kvm"
:
case
constants
.
DriverKvmOld
:
if
viper
.
GetBool
(
cfg
.
ShowDriverDeprecationNotification
)
{
console
.
Warning
(
`The kvm driver is deprecated and support for it will be removed in a future release.
Please consider switching to the kvm2 driver, which is intended to replace the kvm driver.
See https://github.com/kubernetes/minikube/blob/master/docs/drivers.md#kvm2-driver for more information.
To disable this message, run [minikube config set ShowDriverDeprecationNotification false]`
)
}
case
"xhyve"
:
case
constants
.
DriverXhyve
:
if
viper
.
GetBool
(
cfg
.
ShowDriverDeprecationNotification
)
{
console
.
Warning
(
`The xhyve driver is deprecated and support for it will be removed in a future release.
Please consider switching to the hyperkit driver, which is intended to replace the xhyve driver.
See https://github.com/kubernetes/minikube/blob/master/docs/drivers.md#hyperkit-driver for more information.
To disable this message, run [minikube config set ShowDriverDeprecationNotification false]`
)
}
case
"vmwarefusion"
:
case
constants
.
DriverVmwareFusion
:
if
viper
.
GetBool
(
cfg
.
ShowDriverDeprecationNotification
)
{
console
.
Warning
(
`The vmwarefusion driver is deprecated and support for it will be removed in a future release.
Please consider switching to the new vmware unified driver, which is intended to replace the vmwarefusion driver.
...
...
@@ -407,11 +407,11 @@ func GetHostDockerEnv(api libmachine.API) (map[string]string, error) {
// GetVMHostIP gets the ip address to be used for mapping host -> VM and VM -> host
func
GetVMHostIP
(
host
*
host
.
Host
)
(
net
.
IP
,
error
)
{
switch
host
.
DriverName
{
case
"kvm"
:
case
constants
.
DriverKvmOld
:
return
net
.
ParseIP
(
"192.168.42.1"
),
nil
case
"kvm2"
:
case
constants
.
DriverKvm2
:
return
net
.
ParseIP
(
"192.168.39.1"
),
nil
case
"hyperv"
:
case
constants
.
DriverHyperv
:
re
:=
regexp
.
MustCompile
(
`"VSwitch": "(.*?)",`
)
// TODO(aprindle) Change this to deserialize the driver instead
hypervVirtualSwitch
:=
re
.
FindStringSubmatch
(
string
(
host
.
RawDriver
))[
1
]
...
...
@@ -420,7 +420,7 @@ func GetVMHostIP(host *host.Host) (net.IP, error) {
return
[]
byte
{},
errors
.
Wrap
(
err
,
fmt
.
Sprintf
(
"ip for interface (%s)"
,
hypervVirtualSwitch
))
}
return
ip
,
nil
case
"virtualbox"
:
case
constants
.
DriverVirtualbox
:
out
,
err
:=
exec
.
Command
(
detectVBoxManageCmd
(),
"showvminfo"
,
host
.
Name
,
"--machinereadable"
)
.
Output
()
if
err
!=
nil
{
return
[]
byte
{},
errors
.
Wrap
(
err
,
"vboxmanage"
)
...
...
@@ -432,9 +432,9 @@ func GetVMHostIP(host *host.Host) (net.IP, error) {
return
[]
byte
{},
errors
.
Wrap
(
err
,
"Error getting VM/Host IP address"
)
}
return
ip
,
nil
case
"xhyve"
,
"hyperkit"
:
case
constants
.
DriverXhyve
,
constants
.
DriverHyperkit
:
return
net
.
ParseIP
(
"192.168.64.1"
),
nil
case
"vmware"
:
case
constants
.
DriverVmware
:
vmIPString
,
err
:=
host
.
Driver
.
GetIP
()
if
err
!=
nil
{
return
[]
byte
{},
errors
.
Wrap
(
err
,
"Error getting VM IP address"
)
...
...
pkg/minikube/config/config_test.go
浏览文件 @
be58227d
...
...
@@ -20,6 +20,8 @@ import (
"bytes"
"reflect"
"testing"
"k8s.io/minikube/pkg/minikube/constants"
)
type
configTestCase
struct
{
...
...
@@ -47,7 +49,7 @@ var configTestCases = []configTestCase{
"vm-driver": "kvm"
}`
,
config
:
map
[
string
]
interface
{}{
"vm-driver"
:
"kvm"
,
"vm-driver"
:
constants
.
DriverKvmOld
,
"cpus"
:
4
,
"disk-size"
:
"20g"
,
"v"
:
5
,
...
...
pkg/minikube/constants/constants.go
浏览文件 @
be58227d
...
...
@@ -59,19 +59,49 @@ func ArchTag(hasTag bool) string {
return
"-"
+
runtime
.
GOARCH
+
":"
}
// DriverNone is the none driver.
const
DriverNone
=
"none"
// DriverKvmOld is the depricated kvm driver option name
const
DriverKvmOld
=
"kvm"
// DriverKvm2 is the kvm2 driver option name for in linux
const
DriverKvm2
=
"kvm2"
// DriverVirtualbox is the virtualbox driver option name
const
DriverVirtualbox
=
"virtualbox"
// DriverHyperkit is the hyperkit driver option name for mac os
const
DriverHyperkit
=
"hyperkit"
// DriverVmware is the vmware driver option name
const
DriverVmware
=
"vmware"
// DriverVmwareFusion is the vmware fusion driver option
const
DriverVmwareFusion
=
"vmwarefusion"
// DriverHyperv is the hyperv driver option for windows
const
DriverHyperv
=
"hyperv"
// DriverXhyve is the depricated xhyve driver option name
const
DriverXhyve
=
"xhyve"
// DriverParallels is the parallels driver option name
const
DriverParallels
=
"parallels"
// SupportedVMDrivers is a list of supported drivers on all platforms. Currently
// used in gendocs.
var
SupportedVMDrivers
=
[
...
]
string
{
"virtualbox"
,
"parallels"
,
"vmwarefusion"
,
"kvm"
,
"xhyve"
,
"hyperv"
,
"hyperkit"
,
"kvm2"
,
"vmware"
,
"none"
,
DriverVirtualbox
,
DriverParallels
,
DriverVmwareFusion
,
DriverKvmOld
,
DriverXhyve
,
DriverHyperv
,
DriverHyperkit
,
DriverKvm2
,
DriverVmware
,
DriverNone
,
}
// DefaultMinipath is the default Minikube path (under the home directory)
...
...
@@ -130,7 +160,7 @@ const (
// MinimumDiskSizeMB is the minimum disk image size, in megabytes
MinimumDiskSizeMB
=
2000
// DefaultVMDriver is the default virtual machine driver name
DefaultVMDriver
=
"virtualbox"
DefaultVMDriver
=
DriverVirtualbox
// DefaultStatusFormat is the default format of a host
DefaultStatusFormat
=
`host: {{.Host}}
kubelet: {{.Kubelet}}
...
...
@@ -235,9 +265,6 @@ func GetKubernetesReleaseURLSHA1(binaryName, version, osName, archName string) s
// IsMinikubeChildProcess is the name of "is minikube child process" variable
const
IsMinikubeChildProcess
=
"IS_MINIKUBE_CHILD_PROCESS"
// DriverNone is the none driver
const
DriverNone
=
"none"
// FileScheme is the file scheme
const
FileScheme
=
"file"
...
...
pkg/minikube/drivers/hyperkit/driver.go
浏览文件 @
be58227d
...
...
@@ -31,7 +31,7 @@ import (
func
init
()
{
if
err
:=
registry
.
Register
(
registry
.
DriverDef
{
Name
:
"hyperkit"
,
Name
:
constants
.
DriverHyperkit
,
Builtin
:
false
,
ConfigCreator
:
createHyperkitHost
,
});
err
!=
nil
{
...
...
pkg/minikube/drivers/hyperv/driver.go
浏览文件 @
be58227d
...
...
@@ -28,7 +28,7 @@ import (
func
init
()
{
registry
.
Register
(
registry
.
DriverDef
{
Name
:
"hyperv"
,
Name
:
constants
.
DriverHyperv
,
Builtin
:
true
,
ConfigCreator
:
createHypervHost
,
DriverCreator
:
func
()
drivers
.
Driver
{
...
...
pkg/minikube/drivers/kvm/driver.go
浏览文件 @
be58227d
...
...
@@ -30,7 +30,7 @@ import (
func
init
()
{
if
err
:=
registry
.
Register
(
registry
.
DriverDef
{
Name
:
"kvm"
,
Name
:
constants
.
DriverKvmOld
,
Builtin
:
false
,
ConfigCreator
:
createKVMHost
,
});
err
!=
nil
{
...
...
pkg/minikube/drivers/kvm2/driver.go
浏览文件 @
be58227d
...
...
@@ -30,7 +30,7 @@ import (
func
init
()
{
if
err
:=
registry
.
Register
(
registry
.
DriverDef
{
Name
:
"kvm2"
,
Name
:
constants
.
DriverKvm2
,
Builtin
:
false
,
ConfigCreator
:
createKVM2Host
,
});
err
!=
nil
{
...
...
pkg/minikube/drivers/parallels/driver.go
浏览文件 @
be58227d
...
...
@@ -30,7 +30,7 @@ import (
func
init
()
{
err
:=
registry
.
Register
(
registry
.
DriverDef
{
Name
:
"parallels"
,
Name
:
constants
.
DriverParallels
,
Builtin
:
true
,
ConfigCreator
:
createParallelsHost
,
DriverCreator
:
func
()
drivers
.
Driver
{
...
...
pkg/minikube/drivers/virtualbox/driver.go
浏览文件 @
be58227d
...
...
@@ -30,7 +30,7 @@ const defaultVirtualboxNicType = "virtio"
func
init
()
{
err
:=
registry
.
Register
(
registry
.
DriverDef
{
Name
:
"virtualbox"
,
Name
:
constants
.
DriverVirtualbox
,
Builtin
:
true
,
ConfigCreator
:
createVirtualboxHost
,
DriverCreator
:
func
()
drivers
.
Driver
{
...
...
pkg/minikube/drivers/vmware/driver.go
浏览文件 @
be58227d
...
...
@@ -27,7 +27,7 @@ import (
func
init
()
{
err
:=
registry
.
Register
(
registry
.
DriverDef
{
Name
:
"vmware"
,
Name
:
constants
.
DriverVmware
,
Builtin
:
false
,
ConfigCreator
:
createVMwareHost
,
})
...
...
pkg/minikube/drivers/vmwarefusion/driver.go
浏览文件 @
be58227d
...
...
@@ -30,7 +30,7 @@ import (
func
init
()
{
if
err
:=
registry
.
Register
(
registry
.
DriverDef
{
Name
:
"vmwarefusion"
,
Name
:
constants
.
DriverVmwareFusion
,
Builtin
:
true
,
ConfigCreator
:
createVMwareFusionHost
,
DriverCreator
:
func
()
drivers
.
Driver
{
...
...
pkg/minikube/drivers/xhyve/driver.go
浏览文件 @
be58227d
...
...
@@ -35,7 +35,7 @@ https://github.com/kubernetes/minikube/blob/master/docs/drivers.md#xhyve-driver
func
init
()
{
if
err
:=
registry
.
Register
(
registry
.
DriverDef
{
Name
:
"xhyve"
,
Name
:
constants
.
DriverXhyve
,
Builtin
:
false
,
ConfigCreator
:
createXhyveHost
,
DriverCreator
:
func
()
drivers
.
Driver
{
...
...
pkg/minikube/machine/client_test.go
浏览文件 @
be58227d
...
...
@@ -76,12 +76,12 @@ func TestLocalClientNewHost(t *testing.T) {
}{
{
description
:
"host vbox correct"
,
driver
:
"virtualbox"
,
driver
:
constants
.
DriverVirtualbox
,
rawDriver
:
[]
byte
(
vboxConfig
),
},
{
description
:
"host vbox incorrect"
,
driver
:
"virtualbox"
,
driver
:
constants
.
DriverVirtualbox
,
rawDriver
:
[]
byte
(
"?"
),
err
:
true
,
},
...
...
@@ -137,7 +137,7 @@ func TestRunDriver(t *testing.T) {
defer
os
.
RemoveAll
(
tempDir
)
os
.
Setenv
(
localbinary
.
PluginEnvKey
,
localbinary
.
PluginEnvVal
)
os
.
Setenv
(
localbinary
.
PluginEnvDriverName
,
"virtualbox"
)
os
.
Setenv
(
localbinary
.
PluginEnvDriverName
,
constants
.
DriverVirtualbox
)
// Capture stdout and reset it later.
old
:=
os
.
Stdout
...
...
pkg/minikube/tunnel/tunnel.go
浏览文件 @
be58227d
...
...
@@ -29,6 +29,7 @@ import (
"github.com/pkg/errors"
typed_core
"k8s.io/client-go/kubernetes/typed/core/v1"
"k8s.io/minikube/pkg/minikube/config"
"k8s.io/minikube/pkg/minikube/constants"
)
//tunnel represents the basic API for a tunnel: periodically the state of the tunnel
...
...
@@ -149,7 +150,7 @@ func setupRoute(t *tunnel, h *host.Host) {
return
}
if
h
.
DriverName
==
"hyperkit"
{
if
h
.
DriverName
==
constants
.
DriverHyperkit
{
//the virtio-net interface acts up with ip tunnels :(
setupBridge
(
t
)
if
t
.
status
.
RouteError
!=
nil
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录