Commit 88c818f
authored
shim: skip SandboxPlatform validation when platform is not explicitly set (microsoft#2620)
When runtime options are non-empty (e.g., SandboxIsolation is set) but
SandboxPlatform is empty, skip the platform validation rather than
failing. The validation only needs to check that the spec and shim
options match when SandboxPlatform is explicitly configured.
containerd's default config (config_windows.go) sets SandboxIsolation=1
for the runhcs-wcow-hypervisor runtime handler but omits SandboxPlatform,
making options non-empty with an empty platform string. This causes
platforms.Parse("") to fail with 'invalid runtime sandbox platform'.
Signed-off-by: Dawei Wei <wei.dawei.cn@gmail.com>1 parent 84e7d69 commit 88c818f
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
132 | | - | |
| 132 | + | |
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
| |||
0 commit comments