Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1728111

Summary: oc adm node-logs --tail option 200k lines limit.
Product: OpenShift Container Platform Reporter: Takayoshi Kimura <tkimura>
Component: ocAssignee: Maciej Szulik <maszulik>
Status: CLOSED ERRATA QA Contact: zhou ying <yinzhou>
Severity: low Docs Contact:
Priority: low    
Version: 4.1.0CC: aos-bugs, jokerman, mfojtik, wking
Target Milestone: ---   
Target Release: 4.2.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: 2019-10-16 06:33:23 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 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