From f127ddd619db2432862caee7be3aa865e60f22fc Mon Sep 17 00:00:00 2001 From: Mike Brown Date: Tue, 17 Nov 2015 16:17:06 -0600 Subject: [PATCH] change spec test from exact match to greater than Signed-off-by: Mike Brown --- spec.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/spec.go b/spec.go index 7144cf8eebe..05a49a19f28 100644 --- a/spec.go +++ b/spec.go @@ -320,11 +320,12 @@ func loadSpec(cPath, rPath string) (spec *specs.LinuxSpec, rspec *specs.LinuxRun return spec, rspec, checkSpecVersion(spec) } -// 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. +// checkSpecVersion makes sure that the spec version specified in config.json is +// not ahead of runc's version. 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) + if s.Version > specs.Version { + return fmt.Errorf("spec requires a container implementation of %q or higher, current version is %q", s.Version, specs.Version) } return nil }