From c1a6e67183e13ad870d12b0a052ef2dcb00bfa1d Mon Sep 17 00:00:00 2001 From: Matthew Heon Date: Tue, 25 Aug 2020 13:02:22 -0400 Subject: Revert "HACK: Manually include c/storage #698" This reverts commit ae2ee65eff71c5780e4484f1316dbbdd87bf1760. This was a horrible hack that we did for time reasons, to get 2.0.5 out on schedule; now that it has been merged into c/storage properly we no longer need or want it. Signed-off-by: Matthew Heon --- .cirrus.yml | 50 +++++++++++++--------- .../containers/storage/drivers/counter.go | 4 -- 2 files changed, 29 insertions(+), 25 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 06ebb0c96..87c135b78 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -204,34 +204,34 @@ rpmbuild_task: # whether the git tree is clean. The reasoning for that is to make sure # that the vendor.conf, the code and the vendored packages in ./vendor are # in sync at all times. -# vendor_task: +vendor_task: -# only_if: >- -# $CIRRUS_CHANGE_MESSAGE !=~ '.*CI:IMG.*' && -# $CIRRUS_CHANGE_MESSAGE !=~ '.*CI:DOCS.*' + only_if: >- + $CIRRUS_CHANGE_MESSAGE !=~ '.*CI:IMG.*' && + $CIRRUS_CHANGE_MESSAGE !=~ '.*CI:DOCS.*' -# depends_on: -# - "gating" + depends_on: + - "gating" -# env: -# CIRRUS_WORKING_DIR: "/var/tmp/go/src/github.com/containers/libpod" -# GOPATH: "/var/tmp/go" -# GOSRC: "$CIRRUS_WORKING_DIR" + env: + CIRRUS_WORKING_DIR: "/var/tmp/go/src/github.com/containers/libpod" + GOPATH: "/var/tmp/go" + GOSRC: "$CIRRUS_WORKING_DIR" -# # Runs within Cirrus's "community cluster" -# container: -# image: docker.io/library/golang:1.13 -# cpu: 4 -# memory: 12 + # Runs within Cirrus's "community cluster" + container: + image: docker.io/library/golang:1.13 + cpu: 4 + memory: 12 -# timeout_in: 30m + timeout_in: 30m -# vendor_script: -# - 'cd ${CIRRUS_WORKING_DIR} && make vendor' -# - 'cd ${CIRRUS_WORKING_DIR} && ./hack/tree_status.sh' + vendor_script: + - 'cd ${CIRRUS_WORKING_DIR} && make vendor' + - 'cd ${CIRRUS_WORKING_DIR} && ./hack/tree_status.sh' -# on_failure: -# failed_branch_script: '$CIRRUS_WORKING_DIR/$SCRIPT_BASE/notice_branch_failure.sh |& ${TIMESTAMP}' + on_failure: + failed_branch_script: '$CIRRUS_WORKING_DIR/$SCRIPT_BASE/notice_branch_failure.sh |& ${TIMESTAMP}' # This task runs `make varlink_api_generate` followed by ./hack/tree_status.sh to check @@ -305,6 +305,7 @@ build_without_cgo_task: depends_on: - "gating" + - "vendor" - "varlink_api" only_if: >- @@ -365,6 +366,7 @@ testing_task: alias: "testing" depends_on: - "gating" + - "vendor" - "varlink_api" - "build_without_cgo" - "container_image_build" @@ -429,6 +431,7 @@ special_testing_rootless_task: depends_on: - "gating" - "varlink_api" + - "vendor" - "build_without_cgo" only_if: >- @@ -463,6 +466,7 @@ special_testing_in_podman_task: depends_on: - "gating" - "varlink_api" + - "vendor" - "build_without_cgo" only_if: >- @@ -501,6 +505,7 @@ special_testing_cross_task: depends_on: - "gating" - "varlink_api" + - "vendor" only_if: >- $CIRRUS_CHANGE_MESSAGE !=~ '.*CI:IMG.*' && @@ -538,6 +543,7 @@ special_testing_bindings_task: depends_on: - "gating" - "varlink_api" + - "vendor" only_if: >- $CIRRUS_CHANGE_MESSAGE !=~ '.*CI:IMG.*' && @@ -564,6 +570,7 @@ special_testing_endpoint_task: depends_on: - "gating" - "varlink_api" + - "vendor" only_if: >- $CIRRUS_CHANGE_MESSAGE !=~ '.*CI:IMG.*' && @@ -688,6 +695,7 @@ success_task: # ignores any dependent task conditions depends_on: - "gating" + - "vendor" - "varlink_api" - "build_without_cgo" - "container_image_build" diff --git a/vendor/github.com/containers/storage/drivers/counter.go b/vendor/github.com/containers/storage/drivers/counter.go index 3fc45495b..72551a38d 100644 --- a/vendor/github.com/containers/storage/drivers/counter.go +++ b/vendor/github.com/containers/storage/drivers/counter.go @@ -51,10 +51,6 @@ func (c *RefCounter) incdec(path string, infoOp func(minfo *minfo)) int { if c.checker.IsMounted(path) { m.count++ } - } else if !c.checker.IsMounted(path) { - // if the unmount was performed outside of this process (e.g. conmon cleanup) - //the ref counter would lose track of it. Check if it is still mounted. - m.count = 0 } infoOp(m) count := m.count -- cgit v1.2.3-54-g00ecf From ab4283c5a66deb2b8f45c9d55077a9efabe22613 Mon Sep 17 00:00:00 2001 From: Matthew Heon Date: Tue, 25 Aug 2020 13:03:49 -0400 Subject: Revert "HACK: Disable build-each-commit" This reverts commit 44e5d0c1e8272f92d0fa6d41075a0127b241f003. We temporarily disabled this for the last few backports for 2.0.5, given how painful the libpod->podman move made things. We do not want to keep this around long-term, each commit should be required to build. Signed-off-by: Matthew Heon --- .cirrus.yml | 50 +++++++++++++++++++++++++++----------------------- 1 file changed, 27 insertions(+), 23 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 87c135b78..af28b823b 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -269,36 +269,36 @@ varlink_api_task: failed_branch_script: '$CIRRUS_WORKING_DIR/$SCRIPT_BASE/notice_branch_failure.sh' -# build_each_commit_task: +build_each_commit_task: -# depends_on: -# - "gating" -# - "vendor" -# - "varlink_api" + depends_on: + - "gating" + - "vendor" + - "varlink_api" -# only_if: >- -# $CIRRUS_BRANCH != $DEST_BRANCH && -# $CIRRUS_CHANGE_MESSAGE !=~ '.*CI:IMG.*' && -# $CIRRUS_CHANGE_MESSAGE !=~ '.*CI:DOCS.*' + only_if: >- + $CIRRUS_BRANCH != $DEST_BRANCH && + $CIRRUS_CHANGE_MESSAGE !=~ '.*CI:IMG.*' && + $CIRRUS_CHANGE_MESSAGE !=~ '.*CI:DOCS.*' -# gce_instance: -# cpu: 8 -# memory: "8Gb" + gce_instance: + cpu: 8 + memory: "8Gb" -# env: -# MOD_CONTAINERS_CONF: 'false' + env: + MOD_CONTAINERS_CONF: 'false' -# timeout_in: 30m + timeout_in: 30m -# setup_environment_script: '$SCRIPT_BASE/setup_environment.sh |& ${TIMESTAMP}' -# build_each_commit_script: -# # set -x by default, no need to spew contents of lib.sh -# - 'source $SCRIPT_BASE/lib.sh &> /dev/null' -# - 'git fetch --depth 50 origin $DEST_BRANCH |& ${TIMESTAMP}' -# - 'make build-all-new-commits GIT_BASE_BRANCH=origin/$DEST_BRANCH |& ${TIMESTAMP}' + setup_environment_script: '$SCRIPT_BASE/setup_environment.sh |& ${TIMESTAMP}' + build_each_commit_script: + # set -x by default, no need to spew contents of lib.sh + - 'source $SCRIPT_BASE/lib.sh &> /dev/null' + - 'git fetch --depth 50 origin $DEST_BRANCH |& ${TIMESTAMP}' + - 'make build-all-new-commits GIT_BASE_BRANCH=origin/$DEST_BRANCH |& ${TIMESTAMP}' -# on_failure: -# failed_branch_script: '$CIRRUS_WORKING_DIR/$SCRIPT_BASE/notice_branch_failure.sh' + on_failure: + failed_branch_script: '$CIRRUS_WORKING_DIR/$SCRIPT_BASE/notice_branch_failure.sh' build_without_cgo_task: @@ -368,6 +368,7 @@ testing_task: - "gating" - "vendor" - "varlink_api" + - "build_each_commit" - "build_without_cgo" - "container_image_build" @@ -432,6 +433,7 @@ special_testing_rootless_task: - "gating" - "varlink_api" - "vendor" + - "build_each_commit" - "build_without_cgo" only_if: >- @@ -467,6 +469,7 @@ special_testing_in_podman_task: - "gating" - "varlink_api" - "vendor" + - "build_each_commit" - "build_without_cgo" only_if: >- @@ -697,6 +700,7 @@ success_task: - "gating" - "vendor" - "varlink_api" + - "build_each_commit" - "build_without_cgo" - "container_image_build" - "meta" -- cgit v1.2.3-54-g00ecf From b7828b7ce4d29e22708ff6886015ef6e832d91ba Mon Sep 17 00:00:00 2001 From: Matthew Heon Date: Tue, 25 Aug 2020 13:06:00 -0400 Subject: Update c/storage to v1.20.3 This includes an important patch to fix a CI issue where the cleanup process's unmount of a container was not being registered by `podman system service`. Signed-off-by: Matthew Heon --- go.mod | 2 +- go.sum | 2 ++ vendor/github.com/containers/storage/VERSION | 2 +- vendor/github.com/containers/storage/drivers/counter.go | 4 ++++ vendor/github.com/containers/storage/go.mod | 4 ++-- vendor/github.com/containers/storage/go.sum | 8 ++++---- vendor/modules.txt | 2 +- 7 files changed, 15 insertions(+), 9 deletions(-) diff --git a/go.mod b/go.mod index be383b5fc..5f427057c 100644 --- a/go.mod +++ b/go.mod @@ -15,7 +15,7 @@ require ( github.com/containers/conmon v2.0.18+incompatible github.com/containers/image/v5 v5.5.2 github.com/containers/psgo v1.5.1 - github.com/containers/storage v1.20.2 + github.com/containers/storage v1.20.3 github.com/coreos/go-systemd/v22 v22.1.0 github.com/cri-o/ocicni v0.2.0 github.com/cyphar/filepath-securejoin v0.2.2 diff --git a/go.sum b/go.sum index 06109e2ad..054b7e091 100644 --- a/go.sum +++ b/go.sum @@ -88,6 +88,8 @@ github.com/containers/psgo v1.5.1/go.mod h1:2ubh0SsreMZjSXW1Hif58JrEcFudQyIy9EzP github.com/containers/storage v1.19.1/go.mod h1:KbXjSwKnx17ejOsjFcCXSf78mCgZkQSLPBNTMRc3XrQ= github.com/containers/storage v1.20.2 h1:tw/uKRPDnmVrluIzer3dawTFG/bTJLP8IEUyHFhltYk= github.com/containers/storage v1.20.2/go.mod h1:oOB9Ie8OVPojvoaKWEGSEtHbXUAs+tSyr7RO7ZGteMc= +github.com/containers/storage v1.20.3 h1:OB2Vo4SidUGgfSCPyBMskkXEtE5Wqxy5k5cdyezQUpw= +github.com/containers/storage v1.20.3/go.mod h1:L21V7HElfNsMeMdif5JdxtCvzS8LKKhv4movqpFbiOk= github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-iptables v0.4.5 h1:DpHb9vJrZQEFMcVLFKAAGMUVX0XoRC0ptCthinRYm38= diff --git a/vendor/github.com/containers/storage/VERSION b/vendor/github.com/containers/storage/VERSION index 769e37e15..f5b00dc26 100644 --- a/vendor/github.com/containers/storage/VERSION +++ b/vendor/github.com/containers/storage/VERSION @@ -1 +1 @@ -1.20.2 +1.20.3 diff --git a/vendor/github.com/containers/storage/drivers/counter.go b/vendor/github.com/containers/storage/drivers/counter.go index 72551a38d..3fc45495b 100644 --- a/vendor/github.com/containers/storage/drivers/counter.go +++ b/vendor/github.com/containers/storage/drivers/counter.go @@ -51,6 +51,10 @@ func (c *RefCounter) incdec(path string, infoOp func(minfo *minfo)) int { if c.checker.IsMounted(path) { m.count++ } + } else if !c.checker.IsMounted(path) { + // if the unmount was performed outside of this process (e.g. conmon cleanup) + //the ref counter would lose track of it. Check if it is still mounted. + m.count = 0 } infoOp(m) count := m.count diff --git a/vendor/github.com/containers/storage/go.mod b/vendor/github.com/containers/storage/go.mod index 01ac1827b..2480cae44 100644 --- a/vendor/github.com/containers/storage/go.mod +++ b/vendor/github.com/containers/storage/go.mod @@ -6,7 +6,7 @@ require ( github.com/Microsoft/hcsshim v0.8.9 github.com/docker/go-units v0.4.0 github.com/hashicorp/go-multierror v1.0.0 - github.com/klauspost/compress v1.10.7 + github.com/klauspost/compress v1.10.8 github.com/klauspost/pgzip v1.2.4 github.com/mattn/go-shellwords v1.0.10 github.com/mistifyio/go-zfs v2.1.1+incompatible @@ -17,7 +17,7 @@ require ( github.com/pkg/errors v0.9.1 github.com/pquerna/ffjson v0.0.0-20181028064349-e517b90714f7 github.com/sirupsen/logrus v1.6.0 - github.com/stretchr/testify v1.6.0 + github.com/stretchr/testify v1.6.1 github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2 github.com/tchap/go-patricia v2.3.0+incompatible github.com/vbatts/tar-split v0.11.1 diff --git a/vendor/github.com/containers/storage/go.sum b/vendor/github.com/containers/storage/go.sum index 2b5a279c6..123c835c8 100644 --- a/vendor/github.com/containers/storage/go.sum +++ b/vendor/github.com/containers/storage/go.sum @@ -46,8 +46,8 @@ github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/klauspost/compress v1.10.7 h1:7rix8v8GpI3ZBb0nSozFRgbtXKv+hOe+qfEpZqybrAg= -github.com/klauspost/compress v1.10.7/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= +github.com/klauspost/compress v1.10.8 h1:eLeJ3dr/Y9+XRfJT4l+8ZjmtB5RPJhucH2HeCV5+IZY= +github.com/klauspost/compress v1.10.8/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/pgzip v1.2.4 h1:TQ7CNpYKovDOmqzRHKxJh0BeaBI7UdQZYc6p7pMQh1A= github.com/klauspost/pgzip v1.2.4/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= @@ -89,8 +89,8 @@ github.com/stretchr/objx v0.1.1 h1:2vfRuCMp5sSVIDSqO8oNnWJq7mPa6KVP3iPIwFBuy8A= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.6.0 h1:jlIyCplCJFULU/01vCkhKuTyc3OorI3bJFuw6obfgho= -github.com/stretchr/testify v1.6.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2 h1:b6uOv7YOFK0TYG7HtkIgExQo+2RdLuwRft63jn2HWj8= github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= github.com/tchap/go-patricia v2.3.0+incompatible h1:GkY4dP3cEfEASBPPkWd+AmjYxhmDkqO9/zg7R0lSQRs= diff --git a/vendor/modules.txt b/vendor/modules.txt index 656311dff..94b7810df 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -155,7 +155,7 @@ github.com/containers/psgo/internal/dev github.com/containers/psgo/internal/host github.com/containers/psgo/internal/proc github.com/containers/psgo/internal/process -# github.com/containers/storage v1.20.2 +# github.com/containers/storage v1.20.3 github.com/containers/storage github.com/containers/storage/drivers github.com/containers/storage/drivers/aufs -- cgit v1.2.3-54-g00ecf