mirror of
https://github.com/aljazceru/kata-containers.git
synced 2025-12-19 07:14:22 +01:00
runtime: delete netmon
Netmon is not used anymore. Fixes: #3112 Signed-off-by: bin <bin@hyper.sh>
This commit is contained in:
@@ -56,7 +56,6 @@ type tomlConfig struct {
|
||||
Agent map[string]agent
|
||||
Runtime runtime
|
||||
Image image
|
||||
Netmon netmon
|
||||
Factory factory
|
||||
}
|
||||
|
||||
@@ -162,12 +161,6 @@ type agent struct {
|
||||
DialTimeout uint32 `toml:"dial_timeout"`
|
||||
}
|
||||
|
||||
type netmon struct {
|
||||
Path string `toml:"path"`
|
||||
Debug bool `toml:"enable_debug"`
|
||||
Enable bool `toml:"enable_netmon"`
|
||||
}
|
||||
|
||||
func (h hypervisor) path() (string, error) {
|
||||
p := h.Path
|
||||
|
||||
@@ -506,22 +499,6 @@ func (a agent) kernelModules() []string {
|
||||
return a.KernelModules
|
||||
}
|
||||
|
||||
func (n netmon) enable() bool {
|
||||
return n.Enable
|
||||
}
|
||||
|
||||
func (n netmon) path() string {
|
||||
if n.Path == "" {
|
||||
return defaultNetmonPath
|
||||
}
|
||||
|
||||
return n.Path
|
||||
}
|
||||
|
||||
func (n netmon) debug() bool {
|
||||
return n.Debug
|
||||
}
|
||||
|
||||
func newFirecrackerHypervisorConfig(h hypervisor) (vc.HypervisorConfig, error) {
|
||||
hypervisor, err := h.path()
|
||||
if err != nil {
|
||||
@@ -1014,12 +991,6 @@ func updateRuntimeConfig(configPath string, tomlConf tomlConfig, config *oci.Run
|
||||
}
|
||||
config.FactoryConfig = fConfig
|
||||
|
||||
config.NetmonConfig = vc.NetmonConfig{
|
||||
Path: tomlConf.Netmon.path(),
|
||||
Debug: tomlConf.Netmon.debug(),
|
||||
Enable: tomlConf.Netmon.enable(),
|
||||
}
|
||||
|
||||
err = SetKernelParams(config)
|
||||
if err != nil {
|
||||
return err
|
||||
@@ -1262,9 +1233,6 @@ func checkConfig(config oci.RuntimeConfig) error {
|
||||
// Because it is an expert option and conflicts with some other common configs.
|
||||
func checkNetNsConfig(config oci.RuntimeConfig) error {
|
||||
if config.DisableNewNetNs {
|
||||
if config.NetmonConfig.Enable {
|
||||
return fmt.Errorf("config disable_new_netns conflicts with enable_netmon")
|
||||
}
|
||||
if config.InterNetworkModel != vc.NetXConnectNoneModel {
|
||||
return fmt.Errorf("config disable_new_netns only works with 'none' internetworking_model")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user