Bugzilla (bugzilla.redhat.com) will be under maintenance for infrastructure upgrades and will not be available on July 31st between 12:30 AM - 05:30 AM UTC. We appreciate your understanding and patience. You can follow status.redhat.com for details.
Bug 1728111 - oc adm node-logs --tail option 200k lines limit.
Summary: oc adm node-logs --tail option 200k lines limit.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: oc
Version: 4.1.0
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
: 4.2.0
Assignee: Maciej Szulik
QA Contact: zhou ying
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-07-09 03:58 UTC by Takayoshi Kimura
Modified: 2020-02-24 07:34 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-10-16 06:33:23 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2019:2922 0 None None None 2019-10-16 06:33:36 UTC

Description Takayoshi Kimura 2019-07-09 03:58:39 UTC
Description of problem:

oc adm node-logs --tail option seems to have undocumented 200k lines limit.

> $ time oc adm node-logs ip-10-0-134-117.ap-northeast-1.compute.internal --tail=1000000 | gzip > log-tail.gz
> 
> real	0m3.833s
> user	0m2.217s
> sys	0m0.216s
> 
> $ $ zcat log-tail.gz | wc -l
> 200002


Version-Release number of selected component (if applicable):

OpenShift 4.1.4 AWS IPI

How reproducible:

Always

Steps to Reproduce:
1. Perform oc adm node-logs with --tail=1000000 option
2.
3.

Actual results:

Got logs with 200k lines


Expected results:

Got logs with specified lines. Or document this limit somewhere.


Additional info:

Comment 1 Maciej Szulik 2019-08-16 14:11:42 UTC
Fix in https://github.com/openshift/oc/pull/62

Comment 2 W. Trevor King 2019-10-04 17:41:45 UTC
$ oc adm release info --commits quay.io/openshift-release-dev/ocp-release:4.2.0-rc.1 | grep cli | head -n1
  cli                                           https://github.com/openshift/oc                                            75a68b31c2225b8bb10f9fb521bf368fa563c6be
$ git log --oneline 75a68b31c2225b8bb10f9fb521bf368fa563c6be | grep 'update oc adm node-logs with information about tail line limits'
dab76ce3a Bug 1728111 - update oc adm node-logs with information about tail line limits

So even though it targeted master, [1] must have got in before the 4.2/4.3 fork.

[1]: https://github.com/openshift/oc/pull/62/commits/dab76ce3a5a14efa16adf7575a6134307b74995f

Comment 3 W. Trevor King 2019-10-04 18:01:49 UTC
Back to MODIFIED so ARTs sweeper will put these in errata.

Comment 5 zhou ying 2019-10-09 02:31:54 UTC
Confirmed with latest version, the help info shows well:

oc adm node-logs -h
Display and filter node logs

 This command retrieves logs for the node. The default mode is to query the systemd journal on supported operating
systems, which allows searching, time based filtering, and unit based filtering. You may also use the --path argument to
see a list of log files available under /var/logs/ and view those contents directly.

 ......
      --tail=0: Return up to this many lines (not more than 100k) from the end of the log. Only applies to node journal
logs.

[root@dhcp-140-138 ~]# oc version
Client Version: v4.2.0
Server Version: 4.2.0-0.nightly-2019-10-07-203748
Kubernetes Version: v1.14.6+c795c6c

Comment 6 errata-xmlrpc 2019-10-16 06:33:23 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-2019:2922


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