storage icon indicating copy to clipboard operation
storage copied to clipboard

overlay: lock staging directories

Open giuseppe opened this issue 1 year ago • 12 comments

lock any staging directory while it is being used so that another process cannot delete it.

Now the Cleanup() function deletes only the staging directories that are not locked by any other user.

Closes: https://github.com/containers/storage/issues/1915

Signed-off-by: Giuseppe Scrivano [email protected]

giuseppe avatar Apr 30 '24 13:04 giuseppe

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: giuseppe

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment Approvers can cancel approval by writing /approve cancel in a comment

openshift-ci[bot] avatar Apr 30 '24 13:04 openshift-ci[bot]

I vendored in your PR and ran podman tests. tons of failures, all in seccomp, all timeouts. Too many failures to be coincidence, I think.

edsantiago avatar May 01 '24 12:05 edsantiago

I vendored in your PR and ran podman tests. tons of failures, all in seccomp, all timeouts. Too many failures to be coincidence, I think.

sorry for wasting your time on this.

I've updated the PR and ran the Podman tests: https://github.com/containers/podman/pull/22573 which are green now

giuseppe avatar May 02 '24 10:05 giuseppe

Thanks! podman + composefs test now in progress, https://github.com/containers/podman/pull/22425

edsantiago avatar May 02 '24 10:05 edsantiago

Same thing: timeouts in seccomp-policy. Common factor seems to be podman-local (not remote) + sqlite (not boltdb) + fedora (not debian).

I also vendored c-common, so maybe the bug is there?

edsantiago avatar May 02 '24 12:05 edsantiago

Confirmed.

# cat /etc/containers/storage.conf 
[storage]
driver = "overlay"
runroot = "/run/containers/storage"
graphroot = "/var/lib/containers/storage"

[storage.options]
pull_options = {enable_partial_images = "true", use_hard_links = "false", ostree_repos="", convert_images = "true"}

[storage.options.overlay]
use_composefs = "true"

# go mod edit --replace github.com/containers/storage=github.com/giuseppe/storage@a5c63583a5f1ae8d9495716f2fd8f84755c64feb
...
# make
...

# bin/podman run --rm --seccomp-policy '' quay.io/libpod/alpine-with-seccomp:label ls
bin
dev
...
HANG!

edsantiago avatar May 02 '24 12:05 edsantiago

ah no, this is another issue in the PR. I've fixed it now. It happens only when the registry rejects the range request, and I am going to debug now why quay does that with the quay.io/libpod/alpine-with-seccomp:labels image

giuseppe avatar May 02 '24 13:05 giuseppe

ah no, this is another issue in the PR. I've fixed it now. It happens only when the registry rejects the range request, and I am going to debug now why quay does that with the quay.io/libpod/alpine-with-seccomp:labels image

opened a PR in c/image to address it: https://github.com/containers/image/pull/2391

giuseppe avatar May 02 '24 14:05 giuseppe

Well, FWIW, with this and the c-i PR podman tests now pass

edsantiago avatar May 02 '24 17:05 edsantiago

pushed a new version that addresses all the comments.

giuseppe avatar May 03 '24 10:05 giuseppe

@mtrmac waiting on you.

rhatdan avatar May 04 '24 12:05 rhatdan

@mohanboddu should the jira label create automatically the issue?

giuseppe avatar May 06 '24 14:05 giuseppe

I'd like to get this into the next release, can we move it forward?

giuseppe avatar May 08 '24 15:05 giuseppe

Just to unblock progress, not a careful review I’m afraid.

Thanks. Fixed the comments and pushed a new version

giuseppe avatar May 11 '24 15:05 giuseppe

Successful CI run with composefs in #22425, with latest (this morning's) main. Also a successful run this weekend but that was before the giant vendor merge. Either way, tentative LGTM from the passing-tests front.

edsantiago avatar May 13 '24 13:05 edsantiago

/lgtm

rhatdan avatar May 13 '24 15:05 rhatdan

@mtrmac thanks for the review, I've opened a PR: https://github.com/containers/storage/pull/1926

giuseppe avatar May 21 '24 19:05 giuseppe