Skip to content

Commit

Permalink
Merge pull request #521 from crosbymichael/version-validation
Browse files Browse the repository at this point in the history
Remove version check in runc
  • Loading branch information
Mrunal Patel committed Feb 4, 2016
2 parents 86454a0 + 1a4a49b commit 98f72fe
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions spec.go
Original file line number Diff line number Diff line change
Expand Up @@ -328,21 +328,9 @@ func loadSpec(cPath, rPath string) (spec *specs.LinuxSpec, rspec *specs.LinuxRun
if err = json.NewDecoder(rf).Decode(&rspec); err != nil {
return spec, rspec, err
}
if err := checkSpecVersion(spec); err != nil {
return spec, rspec, err
}
return spec, rspec, validateSpec(spec, rspec)
}

// checkSpecVersion makes sure that the spec version matches runc's while we are in the initial
// development period. It is better to hard fail than have missing fields or options in the spec.
func checkSpecVersion(s *specs.LinuxSpec) error {
if s.Version != specs.Version {
return fmt.Errorf("spec version is not compatible with implemented version %q: spec %q", specs.Version, s.Version)
}
return nil
}

func createLibcontainerConfig(cgroupName string, spec *specs.LinuxSpec, rspec *specs.LinuxRuntimeSpec) (*configs.Config, error) {
cwd, err := os.Getwd()
if err != nil {
Expand Down

0 comments on commit 98f72fe

Please sign in to comment.