Bug 1679077 - should display the version of the svcat-apiserver-operator&svcat-controller-manager-operator
Summary: should display the version of the svcat-apiserver-operator&svcat-controller-m...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Service Catalog
Version: 4.1.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 4.1.0
Assignee: Jay Boyd
QA Contact: Jian Zhang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-02-20 10:13 UTC by Jian Zhang
Modified: 2019-03-29 02:26 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-03-28 20:42:40 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Jian Zhang 2019-02-20 10:13:03 UTC
Description of problem:
No version info for the two binaries: cluster-svcat-apiserver-operator, cluster-svcat-controller-manager-operator

Version-Release number of selected component (if applicable):
Image:
1, registry.svc.ci.openshift.org/openshift/origin-v4.0:cluster-svcat-apiserver-operator
io.openshift.build.commit.id=bdce91cb3565ba3491d47184b66390dd218dd4a6
io.openshift.build.source-location=https://github.com/openshift/cluster-svcat-apiserver-operator

2, registry.svc.ci.openshift.org/openshift/origin-v4.0:cluster-svcat-controller-manager-operator
io.openshift.build.commit.id=8c6e61ec3a40f58a58465c6e5c3f6be767afeb0e
io.openshift.build.source-location=https://github.com/openshift/cluster-svcat-controller-manager-operator


How reproducible:
always

Steps to Reproduce:
1. Install the OCP 4.0 cluster.
2. Access the pods running in project: openshift-svcat-apiserver-operator, openshift-svcat-controller-manager-operator
3. Check the binary info.

Actual results:
sh-4.2# cluster-svcat-apiserver-operator  --help
OpenShift cluster svcat-apiserver operator

Usage:
  cluster-svcat-apiserver-operator [flags]
  cluster-svcat-apiserver-operator [command]

Available Commands:
  help        Help about any command
  operator    Start the Cluster svcat-apiserver Operator

Flags:
      --alsologtostderr                  log to standard error as well as files
  -h, --help                             help for cluster-svcat-apiserver-operator
      --log-backtrace-at traceLocation   when logging hits line file:N, emit a stack trace (default :0)
      --log-dir string                   If non-empty, write log files in this directory
      --log-flush-frequency duration     Maximum number of seconds between log flushes (default 5s)
      --logtostderr                      log to standard error instead of files (default true)
      --stderrthreshold severity         logs at or above this threshold go to stderr (default 2)
  -v, --v Level                          log level for V logs
      --vmodule moduleSpec               comma-separated list of pattern=N settings for file-filtered logging

sh-4.2# cluster-svcat-apiserver-operator operator version
I0220 10:01:57.598601      90 cmd.go:123] Using service-serving-cert provided certificates
panic: observed file name must not be empty ([]string{"", "/var/run/secrets/serving-cert/tls.crt", "/var/run/secrets/serving-cert/tls.key"})

goroutine 1 [running]:
github.com/openshift/cluster-svcat-apiserver-operator/vendor/github.com/openshift/library-go/pkg/controller/fileobserver.(*pollingObserver).AddReactor(0xc4206cf290, 0xc420578000, 0xc4206cf230, 0x3, 0x3, 0x0, 0x0)
	/go/src/github.com/openshift/cluster-svcat-apiserver-operator/vendor/github.com/openshift/library-go/pkg/controller/fileobserver/observer_polling.go:30 +0x64c
github.com/openshift/cluster-svcat-apiserver-operator/vendor/github.com/openshift/library-go/pkg/controller/controllercmd.(*ControllerBuilder).WithRestartOnChange(0xc4204ac630, 0xc4203ca5a0, 0xc4206cf230, 0x3, 0x3, 0xc420606d80)
...

sh-4.2# cluster-svcat-controller-manager-operator --help 
OpenShift cluster svcat-controller-manager operator

Usage:
  cluster-svcat-controller-manager-operator [flags]
  cluster-svcat-controller-manager-operator [command]

Available Commands:
  help        Help about any command
  operator    Start the Cluster svcat-controller-manager Operator

Flags:
      --alsologtostderr                  log to standard error as well as files
  -h, --help                             help for cluster-svcat-controller-manager-operator
      --log-backtrace-at traceLocation   when logging hits line file:N, emit a stack trace (default :0)
      --log-dir string                   If non-empty, write log files in this directory
      --log-flush-frequency duration     Maximum number of seconds between log flushes (default 5s)
      --logtostderr                      log to standard error instead of files (default true)
      --stderrthreshold severity         logs at or above this threshold go to stderr (default 2)
  -v, --v Level                          log level for V logs
      --vmodule moduleSpec               comma-separated list of pattern=N settings for file-filtered logging

Use "cluster-svcat-controller-manager-operator [command] --help" for more information about a command.
sh-4.2# cluster-svcat-controller-manager-operator operator version
I0220 10:07:04.901688      71 cmd.go:123] Using service-serving-cert provided certificates
panic: observed file name must not be empty ([]string{"", "/var/run/secrets/serving-cert/tls.crt", "/var/run/secrets/serving-cert/tls.key"})

goroutine 1 [running]:
github.com/openshift/cluster-svcat-controller-manager-operator/vendor/github.com/openshift/library-go/pkg/controller/fileobserver.(*pollingObserver).AddReactor(0xc42053ae70, 0xc420453480, 0xc42053ae10, 0x3, 0x3, 0x0, 0x0)
	/go/src/github.com/openshift/cluster-svcat-controller-manager-operator/vendor/github.com/openshift/library-go/pkg/controller/fileobserver/observer_polling.go:30 +0x64c
github.com/openshift/cluster-svcat-controller-manager-operator/vendor/github.com/openshift/library-go/pkg/controller/controllercmd.(*ControllerBuilder).WithRestartOnChange(0xc4206a8240, 0xc4205ca300, 0xc42053ae10, 0x3, 0x3, 0xc4206304e0)

Expected results:
The two binaries(cluster-svcat-apiserver-operator, cluster-svcat-controller-manager-operator) should display the version info.

Additional info:

Comment 3 Jay Boyd 2019-03-13 16:57:16 UTC
@jian - the issue you raise in comment #1 is fixed by https://bugzilla.redhat.com/show_bug.cgi?id=1688132

Comment 4 Jian Zhang 2019-03-14 05:56:28 UTC
Jay,

Yes, thanks!

Comment 5 Jay Boyd 2019-03-27 14:17:33 UTC
I'm inclined to close this Jian with no plans for any additional enhancements around reporting the version.  As we agreed in comment 3 and 4 the operators now report the correct version in the resource.  I'm not aware of any other operators that support a `--version` argument, are you?

Comment 6 Jay Boyd 2019-03-27 20:19:03 UTC
Marking as a dup and closing.  @Jian if you feel strongly and disagree with comment 5 please reopen.

*** This bug has been marked as a duplicate of bug 1688132 ***

Comment 7 Jian Zhang 2019-03-28 05:45:45 UTC
Jay,

I understood. But, as you know, the ClusterOperator version info doesn't contain the exact PR commit.
So, it's better to report the version info so that the user can know the exact operator version, commit PR clearly.
I reopen it and change it to the "medium" priority.

Comment 8 Jay Boyd 2019-03-28 20:42:40 UTC
@Jian, I understand about the commit PR and I generally agree it is helpful.  My understanding around 4.0 is the CVO owns the versioning, its rare (and maybe even not supported) that customers will ever be overriding the cvo with specific cluster operators.  These two Service Catalog operators source originated from the cluster-openshift-apiserver and cluster-openshift-controller-manager operators, neither of which support a --version or other means to report these details.  The makefiles would have to be heavily reworked to support this.  I have reviewed other operators including the console operator, cluster image registry operator, cluster network operator  and the cvo itself - I'm not seeing any operator that supports --version flag.  Given this fact and I'm pretty tight on cycles, I'm not inclined to implement `--version` support.  If you find a number of other operators that are supporting `--version` please reopen with details.

Comment 9 Jian Zhang 2019-03-29 02:26:33 UTC
Jay,

Thanks for your information! I understand.


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