From 57fa6cf756219baa1d8d562906ccf5bbb85380dc Mon Sep 17 00:00:00 2001 From: Peter Hunt Date: Mon, 12 Aug 2019 10:59:45 -0400 Subject: require conmon v2.0.0 Signed-off-by: Peter Hunt --- libpod/runtime.go | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/libpod/runtime.go b/libpod/runtime.go index 107e8e3d0..64e645299 100644 --- a/libpod/runtime.go +++ b/libpod/runtime.go @@ -84,6 +84,9 @@ var ( // DefaultDetachKeys is the default keys sequence for detaching a // container DefaultDetachKeys = "ctrl-p,ctrl-q" + + // minConmonMajor is the major version required for conmon + minConmonMajor = 2 ) // A RuntimeOption is a functional option which alters the Runtime created by @@ -783,6 +786,7 @@ func getLockManager(runtime *Runtime) (lock.Manager, error) { // probeConmon calls conmon --version and verifies it is a new enough version for // the runtime expectations podman currently has func probeConmon(conmonBinary string) error { + versionFormatErr := "conmon version changed format" cmd := exec.Command(conmonBinary, "--version") var out bytes.Buffer cmd.Stdout = &out @@ -794,17 +798,13 @@ func probeConmon(conmonBinary string) error { matches := r.FindStringSubmatch(out.String()) if len(matches) != 4 { - return errors.Wrapf(err, "conmon version changed format") + return errors.Wrapf(err, versionFormatErr) } major, err := strconv.Atoi(matches[1]) - if err != nil || major < 1 { - return define.ErrConmonOutdated + if err != nil { + return errors.Wrapf(err, versionFormatErr) } - // conmon used to be shipped with CRI-O, and was versioned along with it. - // even though the conmon that came with crio-1.9 to crio-1.15 has a higher - // version number than conmon 1.0.0, 1.0.0 is newer, so we need this check - minor, err := strconv.Atoi(matches[2]) - if err != nil || minor > 9 { + if major < minConmonMajor { return define.ErrConmonOutdated } @@ -866,7 +866,7 @@ func makeRuntime(ctx context.Context, runtime *Runtime) (err error) { if !foundConmon { if foundOutdatedConmon { - return errors.Wrapf(define.ErrConmonOutdated, "please update to v1.0.0 or later") + return errors.Wrapf(define.ErrConmonOutdated, "please update to v%d.0.0 or later", minConmonMajor) } return errors.Wrapf(define.ErrInvalidArg, "could not find a working conmon binary (configured options: %v)", -- cgit v1.2.3-54-g00ecf From 306f7cb9f56f7807dc125caa2292b653c7fae3ac Mon Sep 17 00:00:00 2001 From: Peter Hunt Date: Thu, 12 Sep 2019 14:32:45 -0400 Subject: require conmon v2.0.1 Signed-off-by: Peter Hunt --- libpod/runtime.go | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/libpod/runtime.go b/libpod/runtime.go index 64e645299..93d6fbead 100644 --- a/libpod/runtime.go +++ b/libpod/runtime.go @@ -87,6 +87,12 @@ var ( // minConmonMajor is the major version required for conmon minConmonMajor = 2 + + // minConmonMinor is the minor version required for conmon + minConmonMinor = 0 + + // minConmonPatch is the sub-minor version required for conmon + minConmonPatch = 1 ) // A RuntimeOption is a functional option which alters the Runtime created by @@ -807,6 +813,31 @@ func probeConmon(conmonBinary string) error { if major < minConmonMajor { return define.ErrConmonOutdated } + if major > minConmonMajor { + return nil + } + + minor, err := strconv.Atoi(matches[2]) + if err != nil { + return errors.Wrapf(err, versionFormatErr) + } + if minor < minConmonMinor { + return define.ErrConmonOutdated + } + if minor > minConmonMinor { + return nil + } + + patch, err := strconv.Atoi(matches[3]) + if err != nil { + return errors.Wrapf(err, versionFormatErr) + } + if patch < minConmonPatch { + return define.ErrConmonOutdated + } + if patch > minConmonPatch { + return nil + } return nil } @@ -866,7 +897,7 @@ func makeRuntime(ctx context.Context, runtime *Runtime) (err error) { if !foundConmon { if foundOutdatedConmon { - return errors.Wrapf(define.ErrConmonOutdated, "please update to v%d.0.0 or later", minConmonMajor) + return errors.Errorf("please update to v%d.%d.%d or later: %v", minConmonMajor, minConmonMinor, minConmonPatch, define.ErrConmonOutdated) } return errors.Wrapf(define.ErrInvalidArg, "could not find a working conmon binary (configured options: %v)", -- cgit v1.2.3-54-g00ecf From 9ff66824f31b55d6316778d7adad08210cdf8dc2 Mon Sep 17 00:00:00 2001 From: Peter Hunt Date: Fri, 11 Oct 2019 14:31:16 -0400 Subject: bump cirrus images Signed-off-by: Peter Hunt --- .cirrus.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.cirrus.yml b/.cirrus.yml index 71fa68d45..0713f6dda 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -30,7 +30,7 @@ env: #### #### Cache-image names to test with (double-quotes around names are critical) ### - _BUILT_IMAGE_SUFFIX: "libpod-6296905679634432" + _BUILT_IMAGE_SUFFIX: "libpod-5642998972416000" FEDORA_CACHE_IMAGE_NAME: "fedora-30-${_BUILT_IMAGE_SUFFIX}" PRIOR_FEDORA_CACHE_IMAGE_NAME: "fedora-29-${_BUILT_IMAGE_SUFFIX}" SPECIAL_FEDORA_CACHE_IMAGE_NAME: "xfedora-30-${_BUILT_IMAGE_SUFFIX}" -- cgit v1.2.3-54-g00ecf From 49e251fc57447f79632ca5ddf37847c86ade2271 Mon Sep 17 00:00:00 2001 From: Peter Hunt Date: Mon, 28 Oct 2019 16:15:33 -0400 Subject: update conmon to v2.0.2 in in_podman image Signed-off-by: Peter Hunt --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 3c65bf5a8..4b3130245 100644 --- a/Dockerfile +++ b/Dockerfile @@ -57,7 +57,7 @@ RUN set -x \ && rm -rf "$GOPATH" # Install conmon -ENV CONMON_COMMIT 6f3572558b97bc60dd8f8c7f0807748e6ce2c440 +ENV CONMON_COMMIT 65fe0226d85b69fc9e527e376795c9791199153d RUN set -x \ && export GOPATH="$(mktemp -d)" \ && git clone https://github.com/containers/conmon.git "$GOPATH/src/github.com/containers/conmon.git" \ -- cgit v1.2.3-54-g00ecf