Skip to content

rootfs absolute path is required when running density test using containerd-stress #3580

@sofat1989

Description

@sofat1989
bash-4.2# ./containerd-stress density
INFO[0000] pulling docker.io/library/alpine:latest
INFO[0001] generating spec from image
rootfs absolute path is required

The error is thrown by functions WithImageConfig (density.go) ---> WithAdditionalGIDs (spec_opts.go)

if c.Snapshotter == "" && c.SnapshotKey == "" {
     if !isRootfsAbs(s.Root.Path) {
	  	return errors.New("rootfs absolute path is required")
     }
}

By default, this function populateDefaultUnixSpec will set the

	*s = Spec{
		Version: specs.Version,
		Root: &specs.Root{
			Path: defaultRootfsPath,
		},

defaultRootfsPath = "rootfs" in spec.go

It is obviously not an absolute path

I am very confused about this:

  1. density test should never pass
  2. WithImageConfig function is called in many tests in same way, like TestBindLowPortNonRoot in container_linux_test.go. they should not pass too
    I think both of two don't meet expectation.

test env:

centos 7
4.15.0-43.generic.x86_64

Please let me know if i make some wrong during the test

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions