Bug 1730222 - The dry run is not showing a valid result on the cli console as tested on OCP v3.11
Summary: The dry run is not showing a valid result on the cli console as tested on OC...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Image Registry
Version: 3.11.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: 3.11.z
Assignee: Oleg Bulatov
QA Contact: Wenjing Zheng
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-07-16 08:50 UTC by rushil
Modified: 2023-03-24 15:04 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-11-28 14:54:56 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description rushil 2019-07-16 08:50:44 UTC
Description of problem:

While doing the dry run, the result is not as expected.
The IS has more than 3 tags still there are none seen in the image prune dry run.


# oc adm prune images --keep-tag-revisions=2 --confirm=false --namespace openshift --force-insecure=true 
Dry run enabled - no modifications will be made. Add --confirm to remove images
Deleted 0 objects.


Version-Release number of selected component (if applicable):
3.11

How reproducible:
Very

Steps to Reproduce:

$ oc adm prune images --keep-tag-revisions=2 --confirm=false --namespace openshift --force-insecure=true 


Actual results:
Not showing the expected tags.

Expected results:
This should show the images which are supposed to be pruned

Additional info:

Comment 1 Oleg Bulatov 2019-07-16 09:36:32 UTC
`oc adm prune images` does not delete image stream tags. It deletes history of the tag.

For example, when you push a new image to the image stream tag `latest`, you still can pull the previous image. The pruner can delete this previous image if it is not used by any pod.

How many historical images (revisions) does each tag have? If less than 3, then it works as expected.


Note You need to log in before you can comment on or make changes to this bug.