message: snapshotter: disable stargz support if DaemonMode is none
  As stargz requires nydusd running to be functional.
diff: @@ -78,6 +78,7 @@ func NewSnapshotter(ctx context.Context, cfg *config.Config) (snapshots.Snapshot
  if err != nil {
  return nil, errors.Wrap(err, "failed to new process manager")
  }
  + hasDaemon := cfg.DaemonMode != "none" && cfg.DaemonMode != "no"
  nydusFs, err := nydus.NewFileSystem(
  ctx,
  @@ -95,6 +96,7 @@ func NewSnapshotter(ctx context.Context, cfg *config.Config) (snapshots.Snapshot
  var stargzFs fspkg.FileSystem = nil
  if cfg.EnableStargz {
  + if hasDaemon {
  stargzFs, err = stargz.NewFileSystem(
  ctx,
  stargz.WithProcessManager(pm),
  @@ -106,6 +108,10 @@ func NewSnapshotter(ctx context.Context, cfg *config.Config) (snapshots.Snapshot
  if err != nil {
  return nil, errors.Wrap(err, "failed to initialize stargz filesystem")
  }
  + } else {
  + // stargz support requires nydusd to run
  + log.G(ctx).Info("DaemonMode is none, disable stargz support")
  + }
  }
  if cfg.EnableMetrics {
  @@ -154,7 +160,7 @@ func NewSnapshotter(ctx context.Context, cfg *config.Config) (snapshots.Snapshot
  asyncRemove: cfg.AsyncRemove,
  fs: nydusFs,
  stargzFs: stargzFs,
  - hasDaemon: cfg.DaemonMode != "none" && cfg.DaemonMode != "no",
  + hasDaemon: hasDaemon,
  }, nil
  }
  