Skip to content

Commit 1f0784d

Browse files
committed
*: correct rootfs default and verification
First of all, it doesn't make sense for us to not include a rootfs in our default configuration -- as it means that we're providing an invalid configuration. Second of all, the test to check whether the path is "rootfs" is completely meaningless. containerd and Docker would fail that test, simply because it's pointlessly restrictive. No aspect of the runtime-spec states that it is a spec violation to *not* use "rootfs", so why would we punish people for it? Fix both of these bugs. Signed-off-by: Aleksa Sarai <[email protected]>
1 parent 7f63063 commit 1f0784d

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

generate/generate.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ func New() Generator {
4141
spec := rspec.Spec{
4242
Version: rspec.Version,
4343
Root: &rspec.Root{
44-
Path: "",
44+
Path: "rootfs",
4545
Readonly: false,
4646
},
4747
Process: &rspec.Process{

validate/validate.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -206,11 +206,6 @@ func (v *Validator) CheckRoot() (errs error) {
206206
return
207207
}
208208

209-
if filepath.Base(v.spec.Root.Path) != "rootfs" {
210-
errs = multierror.Append(errs,
211-
specerror.NewError(specerror.PathName, fmt.Errorf("path name should be the conventional 'rootfs'"), rspec.Version))
212-
}
213-
214209
var rootfsPath string
215210
var absRootPath string
216211
if filepath.IsAbs(v.spec.Root.Path) {

0 commit comments

Comments
 (0)