Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1358904 - "bufio.Scanner: token too long" when reading large template with openshift client
Summary: "bufio.Scanner: token too long" when reading large template with openshift cl...
Alias: None
Product: OKD
Classification: Red Hat
Component: Command Line Interface
Version: 3.x
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: ---
Assignee: Ben Parees
QA Contact: Xingxing Xia
Depends On:
TreeView+ depends on / blocked
Reported: 2016-07-21 18:10 UTC by Ben Parees
Modified: 2016-12-09 21:50 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2016-12-09 21:50:55 UTC
Target Upstream Version:

Attachments (Terms of Use)

Description Ben Parees 2016-07-21 18:10:42 UTC

Comment 1 Ben Parees 2016-11-04 21:38:59 UTC
this was fixed by upstream changes.

Comment 2 Xingxing Xia 2016-11-08 07:42:44 UTC
First, construct a large file:
$ oc export -f -o yaml > template.yaml
$ grep -n objects template.yaml

$ grep -n parameters template.yaml

$ head -n 283 template.yaml | tail -n +14 > objects.yaml
$ head -n 13 template.yaml > test.yaml
$ ls -l objects.yaml test.yaml
-rw-rw-r--. 1 xxia qe 6267 Nov  8 15:27 objects.yaml
-rw-rw-r--. 1 xxia qe 334 Nov  8 15:30 test.yaml

$ for i in `seq 12`
> do
>   cat objects.yaml >> test.yaml
> done
$ tail -n +284 template.yaml >> test.yaml

$ ls -l test.yaml
-rw-rw-r--. 1 xxia qe 76088 Nov  8 15:31 test.yaml

Now this file is large enough

Second, test old oc before the fix
$ versions/v3.3.0.5/oc create -f test.yaml
bufio.Scanner: token too long

Third, test new oc with fix
$ oc version
oc v1.4.0-alpha.1+0093383-83

$ oc create -f test.yaml
template "ruby-helloworld-sample" created

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