Bug 1771329 - Failed to run `oc adm catalog build` command on MacOS
Summary: Failed to run `oc adm catalog build` command on MacOS
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: oc
Version: 4.3.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 4.3.0
Assignee: Nick Hale
QA Contact: Jian Zhang
URL:
Whiteboard:
: 1771635 (view as bug list)
Depends On:
Blocks: 1772206
TreeView+ depends on / blocked
 
Reported: 2019-11-12 07:48 UTC by Jian Zhang
Modified: 2020-07-15 19:00 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Release Note
Doc Text:
Clone Of:
: 1772206 (view as bug list)
Environment:
Last Closed: 2020-05-04 11:15:07 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift oc pull 161 0 'None' closed Bug 1771329: only build adm catalog command for linux 2021-01-12 09:09:07 UTC
Red Hat Product Errata RHBA-2020:0581 0 None None None 2020-05-04 11:15:34 UTC

Description Jian Zhang 2019-11-12 07:48:18 UTC
Description of problem:
Got the below error when running it on MacOS.

mac:learn jianzhang$ oc adm catalog build --appregistry-org=jiazha --to=quay.io/jiazha/learn-test:v1
error: Binary was compiled with 'CGO_ENABLED=0', go-sqlite3 requires cgo to work. This is a stub

Version-Release number of selected component (if applicable):
MacOS version:
mac:learn jianzhang$ sw_vers 
ProductName:	Mac OS X
ProductVersion:	10.14.6
BuildVersion:	18G1012
mac:learn jianzhang$ uname
Darwin

oc version:
mac:learn jianzhang$ oc version
Client Version: openshift-clients-4.3.0-201910250623-48-g8c30708e

How reproducible:
always

Steps to Reproduce:
1. Install the oc binary(MAC version) from https://openshift-release-artifacts.svc.ci.openshift.org/4.3.0-0.nightly-2019-11-12-013930/
 
2. Run "oc adm catalog build --appregistry-org=jiazha --to=quay.io/jiazha/learn-test:v1" command.

Actual results:

error: Binary was compiled with 'CGO_ENABLED=0', go-sqlite3 requires cgo to work. This is a stub

Expected results:
It works well on MacOS.

Additional info:
The oc of the Linux version works well.
[root@dhcp-140-36 jzhang]#  oc adm catalog build --appregistry-org=jiazha --to=quay.io/jiazha/learn-test:v1
INFO[0002] loading Bundles                               dir=/tmp/manifests-143131030
INFO[0002] directory                                     dir=/tmp/manifests-143131030 file=manifests-143131030 load=bundles
INFO[0002] directory                                     dir=/tmp/manifests-143131030 file=learn-operator load=bundles
...
[root@dhcp-140-36 jzhang]# uname
Linux

Comment 1 Nick Hale 2019-11-12 18:25:38 UTC
*** Bug 1771635 has been marked as a duplicate of this bug. ***

Comment 5 Jian Zhang 2019-11-25 09:24:00 UTC
Hi, Nick

> I'm opening a duplicate BZ, targeting 4.4, where we'll find a more permanent fix.

I change the target release of this bug to 4.3 since you have opened another bug for 4.4.
Now, this `oc adm catalog` command only supports on Linux, not on Mac and Windows. I think we should highlight it in the 4.3 release document.


Download the latest `oc` for MacOS.
mac:Downloads jianzhang$ tar -zxvf openshift-client-mac-4.3.0-0.nightly-2019-11-25-022933.tar.gz
x README.md
x oc
x kubectl
mac:Downloads jianzhang$ ./oc version
Client Version: openshift-clients-4.3.0-201910250623-68-g9d412f42
Server Version: 4.2.0-0.nightly-2019-11-22-005934
Kubernetes Version: v1.14.6+a11558a

Now, we can see the "catalog" option has been removed. LGTM, verify it.
mac:Downloads jianzhang$ ./oc adm catalog
error: unknown command "catalog"
See 'oc adm -h' for help and examples
mac:Downloads jianzhang$ ./oc adm --help
Administrative Commands

 Actions for administering an OpenShift cluster are exposed here.

Usage:
  oc adm [flags]

Cluster Management:
  upgrade                            Upgrade a cluster
  top                                Show usage statistics of resources on the server
  must-gather                        Launch a new instance of a pod for gathering debug information
  inspect                            Collect debugging data for a given resource

Node Management:
  drain                              Drain node in preparation for maintenance
  cordon                             Mark node as unschedulable
  uncordon                           Mark node as schedulable
  taint                              Update the taints on one or more nodes
  node-logs                          Display and filter node logs

Security and Policy:
  new-project                        Create a new project
  policy                             Manage cluster authorization and security policy
  groups                             Manage groups
  certificate                        Approve or reject certificate requests
  pod-network                        Manage pod network

Maintenance:
  prune                              Remove older versions of resources from the server
  migrate                            Migrate data in the cluster

Configuration:
  create-kubeconfig                  Create a basic .kubeconfig file from client certs
  create-bootstrap-project-template  Create a bootstrap project template
  create-login-template              Create a login template
  create-provider-selection-template Create a provider selection template
  create-error-template              Create an error page template

Other Commands:
  build-chain                        Output the inputs and dependencies of your builds
  completion                         Output shell completion code for the specified shell (bash or zsh)
  config                             Change configuration files for the client
  verify-image-signature             Verify the image identity contained in the image signature

Use "oc adm <command> --help" for more information about a given command.
Use "oc adm options" for a list of global command-line options (applies to all commands).

Comment 7 errata-xmlrpc 2020-05-04 11:15:07 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:0581

Comment 8 Chris Johnson 2020-07-15 19:00:59 UTC
The errata suggests that `oc adm catalog` is available in OCP 4.4.3.  I've confirmed that it is not, nor is it in 4.4.13.  It is, however, available in 4.5.1.


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