Bug 1537789 - oc get events -w doesn't work
Summary: oc get events -w doesn't work
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: oc
Version: 3.9.0
Hardware: All
OS: Linux
Target Milestone: ---
: 3.10.0
Assignee: Juan Vallejo
QA Contact: Xingxing Xia
Whiteboard: aos-scalability-39
Depends On:
TreeView+ depends on / blocked
Reported: 2018-01-23 21:35 UTC by Jeremy Eder
Modified: 2018-07-30 19:09 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2018-07-30 19:09:00 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:1816 None None None 2018-07-30 19:09:34 UTC

Comment 5 Juan Vallejo 2018-02-07 21:16:41 UTC
Origin PR: https://github.com/openshift/origin/pull/18514
Upstream PR: https://github.com/kubernetes/kubernetes/pull/59506

The reason why this error was occurring was due to the large amount of events that were being generated. The general issue, however, applies to any resource whose quantity exceeds a given chunk-size (defaults to "500" for `oc get`).

When the total number of a requested resource exceeds the request's chunk-size, multiple requests end up being made to the same endpoint, with each request producing its own "Info" object. Although we are dealing with a single resource kind, `oc get --watch` produces an error as it associates more than one "Info" with more than one resource kind.

The proposed patch modifies the `oc get` command to only fail if more than one "Info" is returned AND at least one of the infos has different group-version-kind information.

This bug can be reproduced locally by creating some resources on a cluster, and running "oc get -w" with a small chunk size value:

$ oc get events -w --chunk-size=2
error: watch is only supported on individual resources and resource collections - 17 resources were found

Comment 6 Juan Vallejo 2018-02-12 15:39:34 UTC
Upstream PR [1] has merged. Waiting on Origin [2].

1. https://github.com/kubernetes/kubernetes/pull/59506
2. https://github.com/openshift/origin/pull/18514

Comment 7 XiaochuanWang 2018-02-22 02:40:00 UTC
$ oc get events -w [--chunk-size=2] does not reproduced on oc v3.9.0-0.47.0

Comment 9 errata-xmlrpc 2018-07-30 19:09:00 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.