Description of problem:
oc-mirror is not respecting --max-nested-paths while mirroring from disk to mirror
Version-Release number of selected component (if applicable):
tested with oc-mirror version 4.16
How reproducible:
!00% reproducible
Steps to Reproduce:
1- Mirror the platform images to disk using below imageset.
# ./oc-mirror --config=imageset.yaml file:///opt/path apiVersion: mirror.openshift.io/v1alpha2 kind: ImageSetConfiguration archiveSize: 4 mirror: platform: channels: - name: stable-4.13 type: ocp minVersion: 4.13.46 maxVersion: 4.13.46 shortestPath: true storageConfig: local: path: /var/oc-mirror/ocp-4.13
2- Perform the disk to registry using below command
# ./oc-mirror --from /opt/path/mirror_seq1_000000.tar docker://mirror.registry:8443/ocpuser/ocp4/openshift4 --max-nested-paths 4
3- Verify the mapping.txt and see its containing more than 4 nested repository (example entry is below) and its working as expected if we mirror from registry to registry.
quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:364bad05d2d9cc44ca8f8bc7922c6dc7c84f575e00a32dfdf31482c9ab8642d1=mirror.registry:8443/ocpuser/ocp4/openshift4/openshift/release:4.13.46-x86_64-agent-installer-api-server quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:230f4e1552f330570f6e568c55778169724acf42daeb9a0a4a2e3da62e9d9e16=mirror.registry:8443/ocpuser/ocp4/openshift4/openshift/release:4.13.46-x86_64-ibm-vpc-block-csi-driver
Actual results:
its going beyond --max-nested-path
Expected results:
oc-mirror should consider --max-nested-path while mirroring disk to registry
Additional info: