Description of problem: When using dry-run with oc-mirror, the images that will be mirrored are shown, but not the images that will be pruned. Version-Release number of selected component (if applicable): Client Version: version.Info{Major:"", Minor:"", GitVersion:"v0.2.0-alpha.1-41-gf93ddac", GitCommit:"f93ddac6", GitTreeState:"clean", BuildDate:"2022-05-23T14:55:01Z", GoVersion:"go1.17.1", Compiler:"gc", Platform:"linux/amd64"} How reproducible: 100% Steps to Reproduce: 1. Generate imageset config apiVersion: mirror.openshift.io/v1alpha2 kind: ImageSetConfiguration storageConfig: local: path: metadata mirror: additionalimages: - name: docker.io/library/busybox 2. Run oc-mirror with mirror to mirror mode oc-mirror --config imageset-config.yaml docker://localhost:5000 3. Generate a differential config apiVersion: mirror.openshift.io/v1alpha2 kind: ImageSetConfiguration storageConfig: local: path: metadata mirror: additionalimages: - name: docker.io/library/alpine 4. Run oc-mirror with dry-run oc-mirror --config imageset-config.yaml docker://localhost:5000 --dry-run Actual results: mapping.txt (or another resulting file) contains planned images for mirroring Expected results: Output that contains information for pruned images. In this case busybox. Additional info:
checked with latest version , the issue has fixed: oc-mirror version Client Version: version.Info{Major:"", Minor:"", GitVersion:"4.11.0-202206090038.p0.g49a4f17.assembly.stream-49a4f17", GitCommit:"49a4f1789993d90dc9763cb527a57fd70f9ae0e9", GitTreeState:"clean", BuildDate:"2022-06-09T01:20:22Z", GoVersion:"go1.18", Compiler:"gc", Platform:"linux/amd64"} when do the second mirror with -dry-run : oc-mirror --config setting.yaml docker://localhost:5000 --dest-use-http --dry-run Checking push permissions for localhost:5000 Creating directory: oc-mirror-workspace/src/publish Creating directory: oc-mirror-workspace/src/v2 Creating directory: oc-mirror-workspace/src/charts Creating directory: oc-mirror-workspace/src/release-signatures localhost:5000/ library/alpine blobs: docker.io/library/alpine sha256:a9cf34276208f96ac1b1df0261e9b57cd830dce0d69baacc06d9734b16e9b0af 1.436KiB docker.io/library/alpine sha256:167aa1543edcfc961f880fb6092f1e97d6bc6d071e3452235989f02d162e3a42 1.438KiB docker.io/library/alpine sha256:e66264b98777e12192600bf9b4d663655c98a090072e1bab49e233d7531d1294 1.438KiB docker.io/library/alpine sha256:96ac9c6717e4bcea54410e5577cda5e92e436f543e992276d77a39616d704c07 1.439KiB docker.io/library/alpine sha256:00ffe82f0625133ef6bf1ab5bdfa7d85c15ca5539227123cbbf14a864eb66896 1.444KiB docker.io/library/alpine sha256:55144f9f68e28a49543d5b67ab8f778ade4da413d261d9a023144f2d514c4343 1.45KiB docker.io/library/alpine sha256:6e30ab57aeeef1ebca8ac5a6ea05b5dd39d54990be94e7be18bb969a02d10a3f 1.452KiB docker.io/library/alpine sha256:6366ba92f08e2418e90171f1e34bd86ecd50fdc95953b3f33b8943c143518eca 2.3MiB docker.io/library/alpine sha256:af1ac1a73384e058591d04d19bc05a06781cc32d52d4593b468d6cb95eda9858 2.461MiB docker.io/library/alpine sha256:79a25ccaf940855872635c06e7614d9b27dd38ffb5a8adfdb9274dfdc0ea0d87 2.485MiB docker.io/library/alpine sha256:b3c136eddcbf2003d3180787cef00f39d46b9fd9e4623178282ad6a8d63ad3b0 2.57MiB docker.io/library/alpine sha256:d3deabf2a506ef6f5fa7c2a68bf27047574cef9908b30a97ff2d01ae539b089a 2.661MiB docker.io/library/alpine sha256:2408cc74d12b6cd092bb8b516ba7d5e290f485d3eb9672efc00f0583730179e8 2.669MiB docker.io/library/alpine sha256:bb638a3869eed698f88775c7a48f36f8e22e7c6bbaa98fa1d5678966b619b859 2.672MiB manifests: sha256:0615cdd745d0b78e7e6ac3a7b1f02e4daefa664eae0324120955f4e4c91bea3f sha256:0f3aeb63bb71ccd3ba0020772f5617e50946a4f2713953c3f494203f1544ea03 sha256:3c66139adbd2513f9fc56eff206513ffc8356b282bed31a4e74c7eb926b850aa sha256:4ff3ca91275773af45cb4b0834e12b7eb47d1c18f770a0b151381cd227f4c253 sha256:686d8c9dfa6f3ccfc8230bc3178d23f84eeaf7e457f36f271ab1acc53015037c sha256:72af6266bafde8c78d5f20a2a85d0576533ce1ecd6ed8bcf7baf62a743f3b24d sha256:83167bc8418071fc178d191ed604f44792c94ad3c3ac26350c29d2445f6a9644 sha256:c3c58223e2af75154c4a7852d6924b4cc51a00c821553bbd9b3319481131b2e0 sha256:686d8c9dfa6f3ccfc8230bc3178d23f84eeaf7e457f36f271ab1acc53015037c -> latest stats: shared=0 unique=14 size=17.83MiB ratio=1.00 phase 0: localhost:5000 library/alpine blobs=14 mounts=0 manifests=9 shared=0 info: Planning completed in 5.49s info: Dry run complete Writing image mapping to oc-mirror-workspace/mapping.txt Writing image pruning plan to oc-mirror-workspace/pruning-plan.json more pruning-plan.json { "registry": "localhost:5000", "repositories": [ { "name": "library/busybox", "manifests": [ "sha256:0d4b25aec0a40382a3eaea29e3af360f2c5908c91b3b12ded5492fdc5e74050c", "sha256:0dc78806f5885db569f7389b0e0df2e190346b0df59937268c5862d5bfc5f933", "sha256:2c5e2045f35086c019e80c86880fd5b7c7a619878b59e3b7592711e1781df51a", "sha256:3614ca5eacf0a3a1bcc361c939202a974b4902b9334ff36eb29ffe9011aaad83", "sha256:3cb3c11a9bac8d6ca264766461deae86cdd58c174ecb26cdf2222e8e489c4132", "sha256:897ee244eb86a38fa6f7d21e6a9e22aae41f105c574fc47b2c77cff8be98e29d", "sha256:ac0e2006c03b435ee605c4bf84464d9fb665353643fa6295962bd69c23ced5dc", "sha256:c940f8509c36033b11bd7468bf9d9cb60b51f4be13033cfe70e86581944d66cc", "sha256:d339093e7bda33949fb5f3ddb6eeb6b51b8b0950183a132831c74cba05f0a1ea", "sha256:da1b5115bf7e41d123977962115034c67d019ef63fc0c3b9ddfdea3b6f9f9992", "sha256:dcdf379c574e1773d703f0c0d56d67594e7a91d6b84d11ff46799f60fb081c52" ] } ] }
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Important: OpenShift Container Platform 4.11.0 bug fix and security update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2022:5069