mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-08-08 03:24:15 +00:00
Merge pull request #5113 from liubin/fix/5112-call-TomlConfig-validate-func
runtime-rs: call TomlConfig's validate function after load
This commit is contained in:
commit
e05e42fd3c
@ -84,7 +84,7 @@ DEFMEMSZ := 2048
|
|||||||
# - hugepage memory
|
# - hugepage memory
|
||||||
DEFMEMSLOTS := 10
|
DEFMEMSLOTS := 10
|
||||||
#Default number of bridges
|
#Default number of bridges
|
||||||
DEFBRIDGES := 1
|
DEFBRIDGES := 0
|
||||||
DEFENABLEANNOTATIONS := []
|
DEFENABLEANNOTATIONS := []
|
||||||
DEFDISABLEGUESTSECCOMP := true
|
DEFDISABLEGUESTSECCOMP := true
|
||||||
DEFDISABLEGUESTEMPTYDIR := false
|
DEFDISABLEGUESTEMPTYDIR := false
|
||||||
|
@ -324,6 +324,9 @@ fn load_config(spec: &oci::Spec) -> Result<TomlConfig> {
|
|||||||
TomlConfig::load_from_file(&config_path).context("load toml config")?;
|
TomlConfig::load_from_file(&config_path).context("load toml config")?;
|
||||||
annotation.update_config_by_annotation(&mut toml_config)?;
|
annotation.update_config_by_annotation(&mut toml_config)?;
|
||||||
|
|
||||||
|
// validate configuration and return the error
|
||||||
|
toml_config.validate()?;
|
||||||
|
|
||||||
// Sandbox sizing information *may* be provided in two scenarios:
|
// Sandbox sizing information *may* be provided in two scenarios:
|
||||||
// 1. The upper layer runtime (ie, containerd or crio) provide sandbox sizing information as an annotation
|
// 1. The upper layer runtime (ie, containerd or crio) provide sandbox sizing information as an annotation
|
||||||
// in the 'sandbox container's' spec. This would typically be a scenario where as part of a create sandbox
|
// in the 'sandbox container's' spec. This would typically be a scenario where as part of a create sandbox
|
||||||
|
Loading…
Reference in New Issue
Block a user