mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-07-03 02:26:37 +00:00
config: Move check code to end of LoadConfiguration
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 <james.o.hunt@intel.com>
This commit is contained in:
parent
e06c8aafdc
commit
70e4dc550a
@ -651,11 +651,6 @@ 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")
|
||||
@ -663,6 +658,11 @@ func LoadConfiguration(configPath string, ignoreLogging, builtIn bool) (resolved
|
||||
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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user