Closed
Description
If windows layerFolders
in null
loading of the runtime spec fails. This happens when containerd serializes Windows{}
portion of the spec due to go's serialization of lists
Example:
{
"ociVersion": "1.0.2-dev",
"process": {
"user": {
"username": "ContainerUser"
},
"args": [
"/wasi-demo-app.wasm"
],
"cwd": ""
},
"root": {
"path": ""
},
"windows": {
"layerFolders": null,
"ignoreFlushesDuringBoot": true,
"network": {
"allowUnqualifiedDNSQuery": true
}
}
}
let spec = Spec::load(path)?;
thread 'sandbox::oci::ocitests::test_oci_parse' panicked at 'called `Result::unwrap()` on an `Err` value: Oci(SerDe(Error("invalid type: null, expected a sequence", line: 16, column: 32)))', crates\containerd-shim-wasm\src\sandbox\oci.rs:221:49
I was able to work around this by modifying containerd's ctr initialization to make a blank slice:
Windows: &specs.Windows{
LayerFolders: []string{},
},
which results in
"windows": {
"layerFolders": [],
"ignoreFlushesDuringBoot": true,
"network": {
"allowUnqualifiedDNSQuery": true
}
}
Metadata
Metadata
Assignees
Labels
No labels