Bug 1796156

Summary: Unable to obtain OLM version from OLM pods command line
Product: OpenShift Container Platform Reporter: Bruno Andrade <bandrade>
Component: OLMAssignee: Evan Cordell <ecordell>
OLM sub component: OLM QA Contact: Bruno Andrade <bandrade>
Status: CLOSED ERRATA Docs Contact:
Severity: medium    
Priority: unspecified    
Version: 4.4   
Target Milestone: ---   
Target Release: 4.4.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-05-04 11:27:55 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:

Description Bruno Andrade 2020-01-29 17:56:02 UTC
Description of problem:
When it's tried to use "olm version" command inside catalog,olm and package server, the following error is shown:

oc exec catalog-operator-85df8bdc56-6sv5l  -n openshift-operator-lifecycle-manager -- olm version
time="2020-01-29T17:29:33Z" level=info msg="log level info"
time="2020-01-29T17:29:33Z" level=info msg="TLS keys not set, using non-https for metrics"
W0129 17:29:33.809048      21 client_config.go:541] Neither --kubeconfig nor --master was specified.  Using the inClusterConfig.  This might not work.
time="2020-01-29T17:29:33Z" level=error msg="Health serving failed: listen tcp :8080: bind: address already in use"
time="2020-01-29T17:29:33Z" level=error msg="Metrics (http) serving failed: listen tcp :8081: bind: address already in use"
time="2020-01-29T17:29:33Z" level=info msg="Using in-cluster kube client config"
time="2020-01-29T17:29:33Z" level=info msg="Using in-cluster kube client config"
time="2020-01-29T17:29:33Z" level=fatal msg="couldn't clean previous release" error="an empty namespace may not be set when a resource name is provided"
command terminated with exit code 1

Version-Release number of selected component (if applicable):
4.4.0-0.nightly-2020-01-29-073040

How reproducible:
Always 

Steps to Reproduce:
1. Try to obtain the olm version using the command line

Actual results:
Command failed

Expected results:
Should return the olm version and git commit hash

Comment 1 Evan Cordell 2020-01-30 13:27:05 UTC
There are different commands in each pod:

- olm-operator: /bin/olm
- catalog-operator: /bin/catalog
- package-server: /bin/package-server

Could you try `/bin/catalog --version`?

Comment 3 Bruno Andrade 2020-01-30 14:13:39 UTC
Worked as expected, thanks for your assistance.

Cluster Version: 4.4.0-0.nightly-2020-01-29-175627

oc exec catalog-operator-7b4d8fc8f8-b6nwn -n openshift-operator-lifecycle-manager -- /bin/catalog --version
OLM version: 0.14.0
git commit: f586aaf88801a1a777e4975934ddc2cad8f0ad7a


oc exec olm-operator-8cb789577-7hvpr -n openshift-operator-lifecycle-manager -- /bin/olm --version         
OLM version: 0.14.0
git commit: f586aaf88801a1a777e4975934ddc2cad8f0ad7a

Comment 5 errata-xmlrpc 2020-05-04 11:27:55 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