Skip to content
This repository was archived by the owner on Mar 9, 2022. It is now read-only.

Commit 40007b3

Browse files
authored
Merge pull request #826 from Random-Liu/cherrypick-#821
Fix snapshotter nil panic.
2 parents 164ac36 + b9657c9 commit 40007b3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pkg/server/service.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,10 @@ func NewCRIService(config criconfig.Config, client *containerd.Client) (CRIServi
128128
selinux.SetDisabled()
129129
}
130130

131+
if client.SnapshotService(c.config.ContainerdConfig.Snapshotter) == nil {
132+
return nil, errors.Errorf("failed to find snapshotter %q", c.config.ContainerdConfig.Snapshotter)
133+
}
134+
131135
c.imageFSPath = imageFSPath(config.ContainerdRootDir, config.ContainerdConfig.Snapshotter)
132136
logrus.Infof("Get image filesystem path %q", c.imageFSPath)
133137

0 commit comments

Comments
 (0)