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

Commit

Permalink
Merge pull request #826 from Random-Liu/cherrypick-#821
Browse files Browse the repository at this point in the history
Fix snapshotter nil panic.
  • Loading branch information
Random-Liu authored Jun 20, 2018
2 parents 164ac36 + b9657c9 commit 40007b3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/server/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,10 @@ func NewCRIService(config criconfig.Config, client *containerd.Client) (CRIServi
selinux.SetDisabled()
}

if client.SnapshotService(c.config.ContainerdConfig.Snapshotter) == nil {
return nil, errors.Errorf("failed to find snapshotter %q", c.config.ContainerdConfig.Snapshotter)
}

c.imageFSPath = imageFSPath(config.ContainerdRootDir, config.ContainerdConfig.Snapshotter)
logrus.Infof("Get image filesystem path %q", c.imageFSPath)

Expand Down

0 comments on commit 40007b3

Please sign in to comment.