Bug 1687666 - console operator events should be in good format
Summary: console operator events should be in good format
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Management Console
Version: 4.1.0
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: 4.2.0
Assignee: bpeterse
QA Contact: Yadan Pei
Depends On:
TreeView+ depends on / blocked
Reported: 2019-03-12 05:53 UTC by Yadan Pei
Modified: 2019-10-16 06:27 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Previously console operator logs for events would print some messages in duplicate. A bump to a dependency repo has resolved this issue.
Clone Of:
Last Closed: 2019-10-16 06:27:41 UTC
Target Upstream Version:

Attachments (Terms of Use)
ConsoleOperatorLogs (20.93 KB, text/plain)
2019-09-03 02:36 UTC, Yadan Pei
no flags Details

System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2019:2922 None None None 2019-10-16 06:27:49 UTC

Description Yadan Pei 2019-03-12 05:53:11 UTC
Description of problem:
console operator events are somewhat duplicated, see details in steps

Version-Release number of selected component (if applicable):
$ oc get pods -n openshift-console-operator
NAME                                READY   STATUS    RESTARTS   AGE
console-operator-79c6d668f4-5rqm7   1/1     Running   1          16m
[yapei@dhcp-140-3 ~]$ oc get pods -n openshift-console-operator -o yaml | grep image
      image: quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:9ed5afd504bef6ceae7c4a9111b6cb1dc87cac01595c8eafda0ac3467a57fa41

How reproducible:

Steps to Reproduce:
1. Check operator logs when changing console.operator.spec.managementState
$ oc logs -f console-operator-79c6d668f4-5rqm7 -n openshift-console-operator
I0312 03:11:40.609393       1 event.go:221] Event(v1.ObjectReference{Kind:"Deployment", Namespace:"openshift-console-operator", Name:"console-operator", UID:"e072ab00-4463-11e9-8b80-022fa83de086", APIVersion:"apps/v1", ResourceVersion:"", FieldPath:""}): type: 'Normal' reason: 'OperatorStatusChanged' Status for operator console changed: {"conditions":[{"type":"Available","status":"Unknown","lastTransitionTime":"2019-03-12T03:11:

A: 39Z","reason":"Unmanaged"},{"type":"Progressing","status":"Unknown","lastTransitionTime":"2019-03-12T03:11:39Z","reason":"Unmanaged"},{"type":"Failing","status":"Unknown","lastTransitionTime":"2019-03-12T03:11:39Z","reason":"Unmanaged"},{"type":"Upgradeable","status":"Unknown","lastTransitionTime":"2019-03-12T03:11:39Z","reason":"Unmanaged"}],"versions":null,"relatedObjects":null,"extension":null}

B: 40Z","reason":"Unmanaged"},{"type":"Progressing","status":"Unknown","lastTransitionTime":"2019-03-12T03:11:40Z","reason":"Unmanaged"},{"type":"Failing","status":"Unknown","lastTransitionTime":"2019-03-12T03:11:40Z","reason":"Unmanaged"},{"type":"Upgradeable","status":"Unknown","lastTransitionTime":"2019-03-12T03:11:40Z","reason":"Unmanaged"}],"versions":null,"relatedObjects":null,"extension":null}

I0312 03:11:40.766213       1 leaderelection.go:245] successfully renewed lease openshift-console-operator/console-operator-lock
I0312 03:11:40.802991       1 request.go:530]

Actual results:
1. more events are available here http://pastebin.test.redhat.com/735562
It looks like we print duplicate messages A & B, even they have 1 second duration

Expected results:
1. Show necessary events only once

Additional info:
Not sure if this is console operator issue or openshift/library-go/pkg/operator/events issue, please help re-direct if it's considered as a bug

Comment 3 bpeterse 2019-03-20 20:37:32 UTC
Not sure if this is console operator issue or openshift/library-go/pkg/operator/events issue, please help re-direct if it's considered as a bug

The console operator is not explicitly creating any events right now.  All of the events are generated by library-go.

Comment 5 bpeterse 2019-08-30 13:53:16 UTC
This should have been resolved via a library-go bump.  There are several bumps since the time the bug was reported.  Starting with the oldest PR following bug report date:
- https://github.com/openshift/console-operator/pull/192
- https://github.com/openshift/console-operator/pull/207
- https://github.com/openshift/console-operator/pull/233
- https://github.com/openshift/console-operator/pull/240
- https://github.com/openshift/console-operator/pull/264
- https://github.com/openshift/console-operator/pull/268
- https://github.com/openshift/console-operator/pull/276

Several of these exist in 4.1, this bug has been resolved as part of fixes for other issues and features.

Comment 6 Yadan Pei 2019-09-03 02:36:06 UTC
console operator log looks good when changing spec.managementState 

Verified on 4.2.0-0.nightly-2019-09-02-172410

Comment 7 Yadan Pei 2019-09-03 02:36:35 UTC
Created attachment 1611020 [details]

Comment 8 errata-xmlrpc 2019-10-16 06:27:41 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.


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