Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Commit

Permalink
config: Move check code to end of LoadConfiguration
Browse files Browse the repository at this point in the history
Move the VSOCK handling code higher up so that all the checking code is
gathered together at the end of `LoadConfiguration()`.

Signed-off-by: James O. D. Hunt <[email protected]>
  • Loading branch information
jodh-intel committed Nov 29, 2018
1 parent e06c8aa commit 70e4dc5
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pkg/katautils/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -651,18 +651,18 @@ func LoadConfiguration(configPath string, ignoreLogging, builtIn bool) (resolved
return "", config, err
}

config.DisableNewNetNs = tomlConf.Runtime.DisableNewNetNs
if err := checkNetNsConfig(config); err != nil {
return "", config, err
}

// use no proxy if HypervisorConfig.UseVSock is true
if config.HypervisorConfig.UseVSock {
kataUtilsLogger.Info("VSOCK supported, configure to not use proxy")
config.ProxyType = vc.NoProxyType
config.ProxyConfig = vc.ProxyConfig{}
}

config.DisableNewNetNs = tomlConf.Runtime.DisableNewNetNs
if err := checkNetNsConfig(config); err != nil {
return "", config, err
}

if err := checkHypervisorConfig(config.HypervisorConfig); err != nil {
return "", config, err
}
Expand Down

0 comments on commit 70e4dc5

Please sign in to comment.