This is a clone of issue OCPBUGS-44714. The following is the description of the original issue:
—
Description of problem:
While generating delete-images.yaml for the pruning of images using oc-mirror v2, the manifest which are generated under working-dir/cluster-resources (IDMS,ITMS etc) are getting deleted automatically
Version-Release number of selected component (if applicable):
4.17
How reproducible:
100% reproducible
Steps to Reproduce:
1- Create a DeleteImageSetConfiguration file like below
apiVersion: mirror.openshift.io/v2alpha1 kind: DeleteImageSetConfiguration delete: platform: channels: - name: stable-4.17 minVersion: 4.17.3 maxVersion: 4.17.3 operators: - catalog: registry.redhat.io/redhat/redhat-operator-index:v4.17 packages: - name: aws-load-balancer-operator - name: node-observability-operator - name: 3scale-operator additionalImages: - name: registry.redhat.io/ubi8/ubi:latest - name: registry.redhat.io/ubi9/ubi@sha256:20f695d2a91352d4eaa25107535126727b5945bff38ed36a3e59590f495046f0
2- ensure that the manifest are generated by the oc-mirror are present in the working-dir/cluster-resources
ls -lrth /opt/417ocmirror/working-dir/cluster-resources/
total 16K
-rw-r--r--. 1 root root 491 Nov 18 21:57 itms-oc-mirror.yaml
-rw-r--r--. 1 root root 958 Nov 18 21:57 idms-oc-mirror.yaml
-rw-r--r--. 1 root root 322 Nov 18 21:57 updateService.yaml
-rw-r--r--. 1 root root 268 Nov 18 21:57 cs-redhat-operator-index-v4-17.yaml
3- Generate the delete-images.yaml using below command
./oc-mirror delete --config ./deleteimageset.yaml --workspace file:///opt/417ocmirror --v2 --generate docker://bastionmirror.amuhamme.upi:8443/417images2024/11/18 23:53:12 [WARN] : ⚠️ --v2 flag identified, flow redirected to the oc-mirror v2 version. This is Tech Preview, it is still under development and it is not production ready. 2024/11/18 23:53:12 [INFO] : 👋 Hello, welcome to oc-mirror 2024/11/18 23:53:12 [INFO] : ⚙️ setting up the environment for you... 2024/11/18 23:53:12 [INFO] : 🔀 workflow mode: diskToMirror / delete 2024/11/18 23:53:12 [INFO] : 🕵️ going to discover the necessary images... 2024/11/18 23:53:12 [INFO] : 🔍 collecting release images... 2024/11/18 23:53:12 [INFO] : 🔍 collecting operator images... 2024/11/18 23:53:13 [INFO] : 🔍 collecting additional images... 2024/11/18 23:53:13 [INFO] : 📄 Generating delete file... 2024/11/18 23:53:13 [INFO] : /opt/417ocmirror/working-dir/delete file created 2024/11/18 23:53:13 [INFO] : delete time : 712.42082ms 2024/11/18 23:53:13 [INFO] : 👋 Goodbye, thank you for using oc-mirror
4- Verify after generating the delete-images.yaml the manifests present in the working-dir/cluster-resources/ got deleted.
# ls -lrth /opt/417ocmirror/working-dir/cluster-resources/ total 0 # ls -lrth /opt/417ocmirror/working-dir/delete total 72K -rwxr-xr-x. 1 root root 65K Nov 18 23:53 delete-images.yaml -rwxr-xr-x. 1 root root 617 Nov 18 23:53 delete-imageset-config.yaml
Actual results:
Generating delete-images.yaml is deleting the manifest under working-dir/cluster-resources/
Expected results:
Generating delete-images.yaml should not delete the manifest under working-dir/cluster-resources/
Additional info:
- clones
-
OCPBUGS-44714 oc-mirror v2 automatically deleting the manifests which are generated under working-dir/cluster-resources while generating delete-images.yaml
-
- Verified
-
- is blocked by
-
OCPBUGS-44714 oc-mirror v2 automatically deleting the manifests which are generated under working-dir/cluster-resources while generating delete-images.yaml
-
- Verified
-
- links to
-
RHEA-2024:6122 OpenShift Container Platform 4.18.z bug fix update
[OCPBUGS-48430] oc-mirror v2 automatically deleting the manifests which are generated under working-dir/cluster-resources while generating delete-images.yaml
Resolution | New: Done-Errata [ 10803 ] | |
Status | Original: Verified [ 10015 ] | New: Closed [ 6 ] |
Release Note Status | Original: In Progress [ 30960 ] | New: Done [ 30963 ] |
Release Note Text |
Original:
* Previously, when using `oc-mirror --v2 delete --generate`command, the contents of the working-dir/cluster-resources folder were cleared.
With this fix, the working-dir/cluster-resources folder is not cleaned when the delete feature is used. |
New:
* Previously, when using `oc-mirror --v2 delete --generate`command, the contents of the working-dir/cluster-resources folder were cleared. With this fix, the working-dir/cluster-resources folder is not cleaned when the delete feature is used. (link:https://issues.redhat.com/browse/OCPBUGS-48430[* |
Release Note Text |
Original:
Previously, when using `oc-mirror --v2 delete --generate`command, the contents of the working-dir/cluster-resources folder were cleared.
With this fix, the working-dir/cluster-resources folder is not cleaned when the delete feature is used. |
New:
* Previously, when using `oc-mirror --v2 delete --generate`command, the contents of the working-dir/cluster-resources folder were cleared.
With this fix, the working-dir/cluster-resources folder is not cleaned when the delete feature is used. |
Release Note Text |
Original:
*Cause*: What actions or circumstances cause this bug to present. *Consequence*: What happens when the bug presents. *Fix*: What was done to fix the bug. *Result*: Bug doesn’t present anymore. |
New:
Previously, when using `oc-mirror --v2 delete --generate`command, the contents of the working-dir/cluster-resources folder were cleared.
With this fix, the working-dir/cluster-resources folder is not cleaned when the delete feature is used. |
Release Note Text |
New:
*Cause*: What actions or circumstances cause this bug to present. *Consequence*: What happens when the bug presents. *Fix*: What was done to fix the bug. *Result*: Bug doesn’t present anymore. |
Release Note Type | Original: Release Note Not Required [ 31862 ] | New: Bug Fix [ 30950 ] |
Remote Link | New: This issue links to "RHEA-2024:6122 (Web Link)" [ 1915764 ] |
Status | Original: ON_QA [ 15723 ] | New: Verified [ 10015 ] |
Status | Original: MODIFIED [ 14454 ] | New: ON_QA [ 15723 ] |
Status | Original: POST [ 15726 ] | New: MODIFIED [ 14454 ] |
QA Contact | Original: ying zhou [ yinzhou ] | New: Rama Kasturi Narra [ knarra ] |
Assignee | Original: Luigi Mario Zuccarelli [ luzuccar@redhat.com ] | New: Rafael Fonseca dos Santos [ rdossant ] |
Status | Original: New [ 10016 ] | New: POST [ 15726 ] |
Release Note Status | New: In Progress [ 30960 ] |
Release Note Type | New: Release Note Not Required [ 31862 ] |
Remote Link |
New:
This issue links to "openshift/oc-mirror#1006: [release-4.18] |
Assignee | Original: Rafael Fonseca dos Santos [ rdossant ] | New: Luigi Mario Zuccarelli [ luzuccar@redhat.com ] |
Sprint | New: CLID Sprint 265 [ 67856 ] | |
Target Version | Original: 4.19.0 [ 12436719 ] | New: 4.18.0 [ 12431397 ] |
Assignee | Original: Luigi Mario Zuccarelli [ luzuccar@redhat.com ] | New: Rafael Fonseca dos Santos [ rdossant ] |
Link | New: This issue is blocked by OCPBUGS-44714 [ OCPBUGS-44714 ] |
Link | New: This issue clones OCPBUGS-44714 [ OCPBUGS-44714 ] |
QA Contact | New: ying zhou [ yinzhou ] |
Since the problem described in this issue should be resolved in a recent advisory, it has been closed.
For information on the advisory (Important: OpenShift Container Platform 4.18.1 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-2024:6122