Merge pull request #6278 from mxpv/resolve

Fix executable file not found when restoring shims
This commit is contained in:
Akihiro Suda 2021-11-29 13:33:12 +09:00 committed by GitHub
commit 2877865a94
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -114,6 +114,13 @@ func (m *ShimManager) loadShims(ctx context.Context) error {
runtime = container.Runtime.Name runtime = container.Runtime.Name
} }
runtime, err = m.resolveRuntimePath(runtime)
if err != nil {
bundle.Delete()
log.G(ctx).WithError(err).Error("failed to resolve runtime path")
continue
}
binaryCall := shimBinary(bundle, binaryCall := shimBinary(bundle,
shimBinaryConfig{ shimBinaryConfig{
runtime: runtime, runtime: runtime,