Bug 1800464

Summary: The `--from` info should point to the `operator-registry` image from the release stream
Product: OpenShift Container Platform Reporter: Jian Zhang <jiazha>
Component: OLMAssignee: Nick Hale <nhale>
OLM sub component: OLM QA Contact: Jian Zhang <jiazha>
Status: CLOSED ERRATA Docs Contact:
Severity: medium    
Priority: medium CC: bandrade, kuiwang, nhale, scolange, tbuskey
Version: 4.4   
Target Milestone: ---   
Target Release: 4.5.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1808078 (view as bug list) Environment:
Last Closed: 2020-07-13 17:14:10 UTC Type: Bug
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:    
Bug Blocks: 1808078    

Description Jian Zhang 2020-02-07 07:29:45 UTC
Description of problem:
The `--from` point to the upstream image.

      --from='quay.io/operator-framework/operator-registry-server:latest': The image to use as a base.

Version-Release number of selected component (if applicable):
Both 4.3, 4.4
[jzhang@dhcp-140-36 ~]$ ./oc version
Client Version: 4.3.0-0.nightly-2020-02-03-174914
[jzhang@dhcp-140-36 ~]$ oc version
Client Version: 4.4.0-0.nightly-2020-02-04-032141

How reproducible:
always

Steps to Reproduce:
1. Download the `oc` client. For example:
[jzhang@dhcp-140-36 ~]$ wget https://openshift-release-artifacts.svc.ci.openshift.org/4.3.0-0.nightly-2020-02-03-174914/openshift-client-linux-4.3.0-0.nightly-2020-02-03-174914.tar.gz

2. Check the `oc adm catalog build` help info

Actual results:

[jzhang@dhcp-140-36 ~]$ ./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]

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.
      --from='quay.io/operator-framework/operator-registry-server:latest': The image to use as a base.
      --from-dir='': The directory on disk that file:// images will be read from. Overrides --dir
      --manifest-dir='': Local path to cache manifests when downloading.
      --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).


Expected results:
The `--from` info should point to the `operator-registry` image from the release stream

Additional info:

Comment 1 Jian Zhang 2020-02-07 07:44:25 UTC
The release image should be: registry.redhat.io/openshift4/ose-operator-registry
mac:~ jianzhang$ docker pull registry.redhat.io/openshift4/ose-operator-registry
Using default tag: latest
latest: Pulling from openshift4/ose-operator-registry

@evan correct me if I'm wrong, thanks!

Comment 7 Jian Zhang 2020-03-10 03:12:30 UTC
[jzhang@dhcp-140-36 ~]$ ./oc version -o yaml
clientVersion:
  buildDate: "2020-03-07T03:47:49Z"
  compiler: gc
  gitCommit: 8ce61268781d2074158d05ad11141792b94b1910
  gitTreeState: dirty
  gitVersion: openshift-clients-4.5.0-202003062301
  goVersion: go1.13.4
  major: ""
  minor: ""
  platform: linux/amd64
releaseClientVersion: 4.5.0-0.nightly-2020-03-09-225220
...


The base image 'quay.io/operator-framework/operator-registry-server:latest' has been changed to the downstream image: 'quay.io/openshift/origin-operator-registry:latest'. And, this image works well based on https://bugzilla.redhat.com/show_bug.cgi?id=1808078#c3
LGTM, verify it.

[jzhang@dhcp-140-36 ~]$ ./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 build --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 build --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.

Comment 9 errata-xmlrpc 2020-07-13 17:14:10 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:2409