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

Fix image prune --filter cmd behavior #10390

Merged

Conversation

jmguzik
Copy link
Contributor

@jmguzik jmguzik commented May 18, 2021

Glue code added to push filters to the prune image engine method.

@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 18, 2021
@jmguzik jmguzik changed the title [WIP] Fix image prune --filter cmd behavior Fix image prune --filter cmd behavior May 18, 2021
@jmguzik jmguzik marked this pull request as ready for review May 18, 2021 23:50
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 18, 2021
@rhatdan
Copy link
Member

rhatdan commented May 19, 2021

/approve

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 19, 2021
@rhatdan
Copy link
Member

rhatdan commented May 26, 2021

@jmguzik Still working ont his?

@jmguzik
Copy link
Contributor Author

jmguzik commented May 26, 2021

@jmguzik Still working ont his?

Yes, but not enough time this week.

Copy link
Member

@vrothberg vrothberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Drop-by-comment: please update the commit message to describe which issue it's fixing.

@jmguzik
Copy link
Contributor Author

jmguzik commented Jun 3, 2021

Drop-by-comment: please update the commit message to describe which issue it's fixing.

There is no particular issue. I just found the error, not reported it as an issue, instead opened a PR.

@jmguzik jmguzik force-pushed the fix-cmd-prune-filter-images branch from c74d3a7 to 6e9528c Compare June 3, 2021 20:50
@jmguzik jmguzik requested review from rhatdan and vrothberg June 3, 2021 22:07
@vrothberg
Copy link
Member

Drop-by-comment: please update the commit message to describe which issue it's fixing.

There is no particular issue. I just found the error, not reported it as an issue, instead opened a PR.

The challenge I have as a reader/reviewer of the commit message is that it mentions to fix something but it doesn't state what the problem actually was.

@jmguzik jmguzik force-pushed the fix-cmd-prune-filter-images branch from 6e9528c to e909a69 Compare June 8, 2021 09:24
@jmguzik
Copy link
Contributor Author

jmguzik commented Jun 8, 2021

The challenge I have as a reader/reviewer of the commit message is that it mentions to fix something but it doesn't state what the problem actually was.

Added commit description with further info about the problem.

Copy link
Member

@vrothberg vrothberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks

Image prune --filter is fully implemented in the api, http api
yet not connected with the cli execution. User trying to use
filters does not see the effect. This commit adds glue code to enable
possiblity of using --filter in prune in the cli execution.

Signed-off-by: Jakub Guzik <jakubmguzik@gmail.com>
@jmguzik jmguzik force-pushed the fix-cmd-prune-filter-images branch from e909a69 to a5ad36c Compare June 8, 2021 13:18
@rhatdan
Copy link
Member

rhatdan commented Jun 8, 2021

/approve
/lgtm
/hold
Thanks @jmguzik

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 8, 2021
@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jun 8, 2021
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 8, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jmguzik, rhatdan

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
Copy link
Member

/hold cancel

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 9, 2021
@openshift-merge-robot openshift-merge-robot merged commit a2e1df8 into containers:master Jun 9, 2021
openstack-mirroring pushed a commit to openstack-archive/tripleo-heat-templates that referenced this pull request Feb 3, 2022
With the undercloud using ephemeral Heat, there will be images for
ephemeral Heat in the local container storage that do not have any
associated containers. Podman purge would delete these images, and they
then wouldn't be available for overcloud commands.

Instead, skip running the podman purge tasks on the Undercloud. This
means that the local container image storage will grow over time. Given
the reduced number of services on the undercloud, the storage usage is
not as bad as it was previously. However, operators will need to be
aware.

While "podman image prune" does have a --filter option to preserve
images, it does not work in the version of podman in
container-tools:3.0. When the needed patch[1] is available, the podman
purge tasks can be re-enabled, which would address the issue of growing
local storage.

[1] containers/podman@a5ad36c
[2] containers/podman#10390

Change-Id: Ibd2200aa912960b267a9975571e05665a29e40f0
Signed-off-by: James Slagle <jslagle@redhat.com>
openstack-mirroring pushed a commit to openstack/openstack that referenced this pull request Feb 3, 2022
* Update tripleo-heat-templates from branch 'master'
  to c4aa1e3464c6a332edcf1a1abe08047f0350efa6
  - Merge "Skip podman purge on Undercloud"
  - Skip podman purge on Undercloud
    
    With the undercloud using ephemeral Heat, there will be images for
    ephemeral Heat in the local container storage that do not have any
    associated containers. Podman purge would delete these images, and they
    then wouldn't be available for overcloud commands.
    
    Instead, skip running the podman purge tasks on the Undercloud. This
    means that the local container image storage will grow over time. Given
    the reduced number of services on the undercloud, the storage usage is
    not as bad as it was previously. However, operators will need to be
    aware.
    
    While "podman image prune" does have a --filter option to preserve
    images, it does not work in the version of podman in
    container-tools:3.0. When the needed patch[1] is available, the podman
    purge tasks can be re-enabled, which would address the issue of growing
    local storage.
    
    [1] containers/podman@a5ad36c
    [2] containers/podman#10390
    
    Change-Id: Ibd2200aa912960b267a9975571e05665a29e40f0
    Signed-off-by: James Slagle <jslagle@redhat.com>
openstack-mirroring pushed a commit to openstack-archive/tripleo-heat-templates that referenced this pull request Feb 17, 2022
With the undercloud using ephemeral Heat, there will be images for
ephemeral Heat in the local container storage that do not have any
associated containers. Podman purge would delete these images, and they
then wouldn't be available for overcloud commands.

Instead, skip running the podman purge tasks on the Undercloud. This
means that the local container image storage will grow over time. Given
the reduced number of services on the undercloud, the storage usage is
not as bad as it was previously. However, operators will need to be
aware.

While "podman image prune" does have a --filter option to preserve
images, it does not work in the version of podman in
container-tools:3.0. When the needed patch[1] is available, the podman
purge tasks can be re-enabled, which would address the issue of growing
local storage.

[1] containers/podman@a5ad36c
[2] containers/podman#10390

Change-Id: Ibd2200aa912960b267a9975571e05665a29e40f0
Signed-off-by: James Slagle <jslagle@redhat.com>
(cherry picked from commit 7eb280a)
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 23, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants