Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libimage: add LayersDiskUsage #1191

Merged
merged 1 commit into from
Oct 17, 2022

Conversation

vrothberg
Copy link
Member

Add an API to query the sum of the layer sizes. This data is needed to fix containers/podman/issues/16135.

Signed-off-by: Valentin Rothberg vrothberg@redhat.com

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 17, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: vrothberg

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

@vrothberg vrothberg marked this pull request as ready for review October 17, 2022 12:27
@vrothberg
Copy link
Member Author

@rhatdan @giuseppe @flouthoc @Luap99 PTAL

Add an API to query the sum of the layer sizes.  This data is needed to
fix containers/podman/issues/16135.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
@rhatdan
Copy link
Member

rhatdan commented Oct 17, 2022

A little bit of concern about this with AdditionalStores, but this is better then what we have now.

/lgtm
/hold

@vrothberg
Copy link
Member Author

Can you elaborate on your concerns, @rhatdan?

@rhatdan
Copy link
Member

rhatdan commented Oct 17, 2022

Do users expect to get all of the usage back if they remove all layers, since the removal will not remove AdditionalStore layers.

@vrothberg
Copy link
Member Author

Do users expect to get all of the usage back if they remove all layers, since the removal will not remove AdditionalStore layers.

I would be surprised if users would expect read-only images to be cleaned up.

@rhatdan
Copy link
Member

rhatdan commented Oct 17, 2022

I agree, I just see them being confused. If I list out how much space layers are taking, then they might expect that resetting will free up X storage, but when they clean, they will end up only removing X-y storage, where y is in additional images.

@rhatdan
Copy link
Member

rhatdan commented Oct 17, 2022

Most people don't use additional stores, so it should not be a problem, but Edge seems to be adopting AdditionalStores as core principal, for OS Image based containers.

@rhatdan
Copy link
Member

rhatdan commented Oct 17, 2022

/hold cancel

@openshift-merge-robot openshift-merge-robot merged commit d8aaa54 into containers:main Oct 17, 2022
@vrothberg vrothberg deleted the fix-podman-16135 branch October 17, 2022 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

podman system df does not seem to report actual disk usage
3 participants