From 1a4a49bf42c4468fc89521d47940a36cddf2e859 Mon Sep 17 00:00:00 2001 From: Michael Crosby Date: Thu, 28 Jan 2016 10:51:25 -0800 Subject: [PATCH] Remove version check in runc Signed-off-by: Michael Crosby --- spec.go | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/spec.go b/spec.go index 7ac63a4c97a..623972b0e38 100644 --- a/spec.go +++ b/spec.go @@ -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 {