Bug 1903033 - duplicated lines of imageContentSources is seen when mirror release image to local registry
Summary: duplicated lines of imageContentSources is seen when mirror release image to ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: oc
Version: 4.7
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 4.7.0
Assignee: Sally
QA Contact: Johnny Liu
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-12-01 07:28 UTC by Johnny Liu
Modified: 2021-02-24 15:37 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-02-24 15:36:34 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift oc pull 661 0 None open Bug 1903033: deduplicate imageContentSources printed when mirroring release 2020-12-01 20:31:44 UTC
Red Hat Product Errata RHSA-2020:5633 0 None None None 2021-02-24 15:37:05 UTC

Description Johnny Liu 2020-12-01 07:28:39 UTC
Description of problem:


Version-Release number of selected component (if applicable):
$ oc version --client
Client Version: 4.7.0-0.nightly-2020-11-30-172451

How reproducible:
Always

Steps to Reproduce:
1. Mirror release image to local registry
$ oc adm release mirror   --from=registry.svc.ci.openshift.org/ocp/release:4.7.0-0.nightly-2020-11-26-221840 --to=upshift.mirror-registry.qe.devcluster.openshift.com:5000/ocp/release --to-release-image=upshift.mirror-registry.qe.devcluster.openshift.com:5000/ocp/release:4.7.0-0.nightly-2020-11-26-221840
2.
3.

Actual results:
$ oc adm release mirror   --from=registry.svc.ci.openshift.org/ocp/release:4.7.0-0.nightly-2020-11-26-221840 --to=upshift.mirror-registry.qe.devcluster.openshift.com:5000/ocp/release --to-release-image=upshift.mirror-registry.qe.devcluster.openshift.com:5000/ocp/release:4.7.0-0.nightly-2020-11-26-221840
<--snip-->
Success
Update image:  upshift.mirror-registry.qe.devcluster.openshift.com:5000/ocp/release:4.7.0-0.nightly-2020-11-26-221840
Mirror prefix: upshift.mirror-registry.qe.devcluster.openshift.com:5000/ocp/release
Mirror prefix: upshift.mirror-registry.qe.devcluster.openshift.com:5000/ocp/release:4.7.0-0.nightly-2020-11-26-221840

To use the new mirrored repository to install, add the following section to the install-config.yaml:

imageContentSources:
- mirrors:
  - upshift.mirror-registry.qe.devcluster.openshift.com:5000/ocp/release
  source: quay.io/openshift-release-dev/ocp-v4.0-art-dev
- mirrors:
  - upshift.mirror-registry.qe.devcluster.openshift.com:5000/ocp/release
  source: quay.io/openshift-release-dev/ocp-v4.0-art-dev
- mirrors:
  - upshift.mirror-registry.qe.devcluster.openshift.com:5000/ocp/release
  source: registry.svc.ci.openshift.org/ocp/release
- mirrors:
  - upshift.mirror-registry.qe.devcluster.openshift.com:5000/ocp/release
  source: registry.svc.ci.openshift.org/ocp/release


To use the new mirrored repository for upgrades, use the following to create an ImageContentSourcePolicy:

apiVersion: operator.openshift.io/v1alpha1
kind: ImageContentSourcePolicy
metadata:
  name: example
spec:
  repositoryDigestMirrors:
  - mirrors:
    - upshift.mirror-registry.qe.devcluster.openshift.com:5000/ocp/release
    source: quay.io/openshift-release-dev/ocp-v4.0-art-dev
  - mirrors:
    - upshift.mirror-registry.qe.devcluster.openshift.com:5000/ocp/release
    source: quay.io/openshift-release-dev/ocp-v4.0-art-dev
  - mirrors:
    - upshift.mirror-registry.qe.devcluster.openshift.com:5000/ocp/release
    source: registry.svc.ci.openshift.org/ocp/release
  - mirrors:
    - upshift.mirror-registry.qe.devcluster.openshift.com:5000/ocp/release
    source: registry.svc.ci.openshift.org/ocp/release

Duplicated lines of imageContentSources/repositoryDigestMirrors is seen.

Expected results:
To use the new mirrored repository to install, add the following section to the install-config.yaml:

imageContentSources:
- mirrors:
  - upshift.mirror-registry.qe.devcluster.openshift.com:5000/ocp/release
  source: quay.io/openshift-release-dev/ocp-v4.0-art-dev
- mirrors:
  - upshift.mirror-registry.qe.devcluster.openshift.com:5000/ocp/release
  source: registry.svc.ci.openshift.org/ocp/release


To use the new mirrored repository for upgrades, use the following to create an ImageContentSourcePolicy:

apiVersion: operator.openshift.io/v1alpha1
kind: ImageContentSourcePolicy
metadata:
  name: example
spec:
  repositoryDigestMirrors:
  - mirrors:
    - upshift.mirror-registry.qe.devcluster.openshift.com:5000/ocp/release
    source: quay.io/openshift-release-dev/ocp-v4.0-art-dev
  - mirrors:
    - upshift.mirror-registry.qe.devcluster.openshift.com:5000/ocp/release
    source: registry.svc.ci.openshift.org/ocp/release

Additional info:
1. 4.6 does not have such issue.

Comment 1 Maciej Szulik 2020-12-01 10:10:59 UTC
Sally, probably a simple de-duplication should be sufficient before printing those.

Comment 2 Sally 2020-12-01 14:13:19 UTC
This bug was introduced with the PR that resolved https://bugzilla.redhat.com/show_bug.cgi?id=1878823, i'll add the de-dupe to resolve this,thanks.

Comment 4 Johnny Liu 2020-12-04 03:16:20 UTC
Verified this bug with 4.7.0-0.nightly-2020-12-03-205004, get passed.

$ oc adm release mirror   --from=registry.svc.ci.openshift.org/ocp/release:4.7 --to=upshift.mirror-registry.qe.devcluster.openshift.com:5000/ocp/release --to-release-image=upshift.mirror-registry.qe.devcluster.openshift.com:5000/ocp/release:4.7
<--snip-->
Success
Update image:  upshift.mirror-registry.qe.devcluster.openshift.com:5000/ocp/release:4.7
Mirror prefix: upshift.mirror-registry.qe.devcluster.openshift.com:5000/ocp/release
Mirror prefix: upshift.mirror-registry.qe.devcluster.openshift.com:5000/ocp/release:4.7

To use the new mirrored repository to install, add the following section to the install-config.yaml:

imageContentSources:
- mirrors:
  - upshift.mirror-registry.qe.devcluster.openshift.com:5000/ocp/release
  source: quay.io/openshift-release-dev/ocp-v4.0-art-dev
- mirrors:
  - upshift.mirror-registry.qe.devcluster.openshift.com:5000/ocp/release
  source: registry.svc.ci.openshift.org/ocp/release


To use the new mirrored repository for upgrades, use the following to create an ImageContentSourcePolicy:

apiVersion: operator.openshift.io/v1alpha1
kind: ImageContentSourcePolicy
metadata:
  name: example
spec:
  repositoryDigestMirrors:
  - mirrors:
    - upshift.mirror-registry.qe.devcluster.openshift.com:5000/ocp/release
    source: quay.io/openshift-release-dev/ocp-v4.0-art-dev
  - mirrors:
    - upshift.mirror-registry.qe.devcluster.openshift.com:5000/ocp/release
    source: registry.svc.ci.openshift.org/ocp/release

Comment 7 errata-xmlrpc 2021-02-24 15:36:34 UTC
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 (Moderate: OpenShift Container Platform 4.7.0 security, bug fix, and enhancement 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-2020:5633


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