Bug 1809360

Summary: The `--from` info should point to the `operator-registry` image from the release stream
Product: OpenShift Container Platform Reporter: Evan Cordell <ecordell>
Component: OLMAssignee: Evan Cordell <ecordell>
OLM sub component: OLM QA Contact: Jian Zhang <jiazha>
Status: CLOSED ERRATA Docs Contact:
Severity: medium    
Priority: medium CC: bandrade, jiazha, kuiwang, nhale, scolange, tbuskey
Version: 4.4   
Target Milestone: ---   
Target Release: 4.3.z   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1808078 Environment:
Last Closed: 2020-03-24 14:34:26 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1808078    
Bug Blocks:    

Comment 6 Jian Zhang 2020-03-11 05:42:29 UTC
1, Install the `oc` client that contains the fixed PR, as follows:
[jzhang@dhcp-140-36 4.3]$ ./oc version -o yaml
clientVersion:
  buildDate: "2020-03-10T13:11:25Z"
  compiler: gc
  gitCommit: 79a17e70404a12c4259550465659107e4524ecee
  gitTreeState: clean
  gitVersion: openshift-clients-4.3.6-202003090404
  goVersion: go1.12.12
  major: ""
  minor: ""
  platform: linux/amd64
releaseClientVersion: 4.3.0-0.nightly-2020-03-10-182422
...

2, Run the `--help` option, check the output:
[jzhang@dhcp-140-36 4.3]$ ./oc adm catalog build --help
Builds a catalog container image from a collection operator manifests.

 Extracts the contents of a collection of operator manifests to disk, and builds them into an operator registry catalog
image.

Usage:
  oc adm catalog build [flags]

Examples:
  # Build an operator catalog from an appregistry repo and store in a file
  oc adm catalog mirror --appregistry-org=redhat-operators --to=file://offline/redhat-operators:4.3
  
  # Build an operator catalog from an appregistry repo and mirror to a registry
  oc adm catalog mirror --appregistry-org=redhat-operators --to=quay.io/my/redhat-operators:4.3

Options:
      --appregistry-endpoint='https://quay.io/cnr': Endpoint for pulling from an application registry instance.
      --appregistry-org='': Organization (Namespace) to pull from an application registry instance
      --auth-token='': Auth token for communicating with an application registry.
      --dir='': The directory on disk that file:// images will be copied under.
      --filter-by-os='': A regular expression to control which images are considered when multiple variants are
available. Images will be passed as '<platform>/<architecture>[/<variant>]'.
      --from='quay.io/openshift/origin-operator-registry:latest': The image to use as a base.
      --from-dir='': The directory on disk that file:// images will be read from. Overrides --dir
      --insecure=false: Allow push and pull operations to registries to be made over HTTP
      --manifest-dir='': Local path to cache manifests when downloading.
      --max-per-registry=4: Number of concurrent requests allowed per registry.
  -a, --registry-config='': Path to your registry credentials (defaults to ~/.docker/config.json)
      --skip-verification=false: Skip verifying the integrity of the retrieved content. This is not recommended, but may
be necessary when importing images from older image registries. Only bypass verification if the registry is known to be
trustworthy.
      --to='': The image repository tag to apply to the built catalog image.
      --to-db='': Local path to save the database to.

Use "oc adm options" for a list of global command-line options (applies to all commands).

As we can see above, the based image is "quay.io/openshift/origin-operator-registry:latest" now, and it works well based on https://bugzilla.redhat.com/show_bug.cgi?id=1808078#c3. LGTM, verify it.

Comment 8 errata-xmlrpc 2020-03-24 14:34:26 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, 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/RHBA-2020:0858