瀏覽代碼

daemon: set containerd default snapshotter if none is configured

This is a temporary workaround for the daemon not yet having automatic
selection of snapshotters.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Sebastiaan van Stijn 2 年之前
父節點
當前提交
de4af86e98
共有 1 個文件被更改,包括 5 次插入0 次删除
  1. 5 0
      daemon/daemon.go

+ 5 - 0
daemon/daemon.go

@@ -979,6 +979,11 @@ func NewDaemon(ctx context.Context, config *config.Config, pluginStore *plugin.S
 	}
 	}
 
 
 	if d.UsesSnapshotter() {
 	if d.UsesSnapshotter() {
+		// FIXME(thaJeztah): implement automatic snapshotter-selection similar to graph-driver selection; see https://github.com/moby/moby/issues/44076
+		if driverName == "" {
+			driverName = containerd.DefaultSnapshotter
+		}
+
 		// Configure and validate the kernels security support. Note this is a Linux/FreeBSD
 		// Configure and validate the kernels security support. Note this is a Linux/FreeBSD
 		// operation only, so it is safe to pass *just* the runtime OS graphdriver.
 		// operation only, so it is safe to pass *just* the runtime OS graphdriver.
 		if err := configureKernelSecuritySupport(config, driverName); err != nil {
 		if err := configureKernelSecuritySupport(config, driverName); err != nil {