Bug 1199391 - openshift master crashes with invalid template generator
Summary: openshift master crashes with invalid template generator
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Build
Version: 3.0.0
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
: ---
Assignee: Ryan Murphy
QA Contact: Wenjing Zheng
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-03-06 06:00 UTC by Ruikai Liu
Modified: 2016-09-27 09:29 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-09-27 09:29:07 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:1933 0 normal SHIPPED_LIVE Red Hat OpenShift Container Platform 3.3 Release Advisory 2016-09-27 13:24:36 UTC

Description Ruikai Liu 2015-03-06 06:00:54 UTC
Description of problem:
If the parameter generator field of the template file is changed to some invalid value, then openshift will crash when processing the template file.

Version-Release number of selected component (if applicable):
openshift-sdn-0.4-3.git.0.954ef11.el7ose.x86_64
openshift-0.4-0.git.39.f71fbf4.el7ose.x86_64
openshift-sdn-master-0.4-3.git.0.954ef11.el7ose.x86_64
openshift-master-0.4-0.git.39.f71fbf4.el7ose.x86_64
openshift version
openshift v0.4-37-gf71fbf4
kubernetes v0.10.0-503-gc977a45

How reproducible:
Always

Steps to Reproduce:
1. Change the generator in template file:
$ sed -i 's/"generate": "expression"/"generate": "test"/' application-template-stibuild.json
2. Process the template:
$ osc process -f application-template-stibuild.json

Actual results:
F0306 13:24:20.562764   26962 process.go:98] Post https://192.168.0.105:8443/osapi/v1beta1/templateConfigs?namespace=default: EOF

Expected results:
invalid value '<*>(0xc208d7fed0)template.parameters[0]: Unable to find the 'test' generator': failure to generate parameter value

Additional info:
No such issue with version v0.4-63-g0298616-dirty

And the following is the log for the crash:
Mar 06 12:54:17 master.ose30-manual.com.cn openshift[26629]: bufio.(*Reader).fill(0xc20a2c2d20)
Mar 06 12:54:17 master.ose30-manual.com.cn openshift[26629]: /usr/lib/golang/src/pkg/bufio/bufio.go:97 +0x1b3
Mar 06 12:54:17 master.ose30-manual.com.cn openshift[26629]: bufio.(*Reader).ReadSlice(0xc20a2c2d20, 0xc20993970a, 0x0, 0x0, 0x0, 0x0, 0x0)
Mar 06 12:54:17 master.ose30-manual.com.cn openshift[26629]: /usr/lib/golang/src/pkg/bufio/bufio.go:298 +0x22c
Mar 06 12:54:17 master.ose30-manual.com.cn openshift[26629]: bufio.(*Reader).ReadLine(0xc20a2c2d20, 0x0, 0x0, 0x0, 0x423b00, 0x0, 0x0)
Mar 06 12:54:17 master.ose30-manual.com.cn openshift[26629]: /usr/lib/golang/src/pkg/bufio/bufio.go:326 +0x69
Mar 06 12:54:17 master.ose30-manual.com.cn openshift[26629]: net/textproto.(*Reader).readLineSlice(0xc2089146f0, 0x0, 0x0, 0x0, 0x0, 0x0)
Mar 06 12:54:17 master.ose30-manual.com.cn openshift[26629]: /usr/lib/golang/src/pkg/net/textproto/reader.go:55 +0x9d
Mar 06 12:54:17 master.ose30-manual.com.cn openshift[26629]: net/textproto.(*Reader).ReadLine(0xc2089146f0, 0x0, 0x0, 0x0, 0x0)
Mar 06 12:54:17 master.ose30-manual.com.cn openshift[26629]: /usr/lib/golang/src/pkg/net/textproto/reader.go:36 +0x4e
Mar 06 12:54:17 master.ose30-manual.com.cn openshift[26629]: net/http.ReadRequest(0xc20a2c2d20, 0xc20aceb1e0, 0x0, 0x0)
Mar 06 12:54:17 master.ose30-manual.com.cn openshift[26629]: /usr/lib/golang/src/pkg/net/http/request.go:556 +0xc7
Mar 06 12:54:17 master.ose30-manual.com.cn openshift[26629]: net/http.(*conn).readRequest(0xc20a977080, 0x0, 0x0, 0x0)
Mar 06 12:54:17 master.ose30-manual.com.cn openshift[26629]: /usr/lib/golang/src/pkg/net/http/server.go:577 +0x276
Mar 06 12:54:17 master.ose30-manual.com.cn openshift[26629]: net/http.(*conn).serve(0xc20a977080)
Mar 06 12:54:17 master.ose30-manual.com.cn openshift[26629]: /usr/lib/golang/src/pkg/net/http/server.go:1132 +0x61e
Mar 06 12:54:17 master.ose30-manual.com.cn openshift[26629]: created by net/http.(*Server).Serve
Mar 06 12:54:17 master.ose30-manual.com.cn openshift[26629]: /usr/lib/golang/src/pkg/net/http/server.go:1721 +0x313
Mar 06 12:54:17 master.ose30-manual.com.cn openshift[26629]: goroutine 18309 [IO wait]:
Mar 06 12:54:17 master.ose30-manual.com.cn openshift[26629]: net.runtime_pollWait(0x7f746496bf20, 0x72, 0x0)
Mar 06 12:54:17 master.ose30-manual.com.cn openshift[26629]: /usr/lib/golang/src/pkg/runtime/netpoll.goc:146 +0x66
Mar 06 12:54:17 master.ose30-manual.com.cn openshift[26629]: net.(*pollDesc).Wait(0xc20aab2ca0, 0x72, 0x0, 0x0)
Mar 06 12:54:17 master.ose30-manual.com.cn openshift[26629]: /usr/lib/golang/src/pkg/net/fd_poll_runtime.go:84 +0x46
Mar 06 12:54:17 master.ose30-manual.com.cn openshift[26629]: net.(*pollDesc).WaitRead(0xc20aab2ca0, 0x0, 0x0)
Mar 06 12:54:17 master.ose30-manual.com.cn openshift[26629]: /usr/lib/golang/src/pkg/net/fd_poll_runtime.go:89 +0x42
Mar 06 12:54:17 master.ose30-manual.com.cn openshift[26629]: net.(*netFD).Read(0xc20aab2c40, 0xc20a82b000, 0x400, 0x400, 0x0, 0x7f7468a74418, 0xb)
Mar 06 12:54:17 master.ose30-manual.com.cn openshift[26629]: /usr/lib/golang/src/pkg/net/fd_unix.go:242 +0x34c
Mar 06 12:54:17 master.ose30-manual.com.cn openshift[26629]: net.(*conn).Read(0xc208c1de60, 0xc20a82b000, 0x400, 0x400, 0x0, 0x0, 0x0)
Mar 06 12:54:17 master.ose30-manual.com.cn openshift[26629]: /usr/lib/golang/src/pkg/net/net.go:122 +0xe7
Mar 06 12:54:17 master.ose30-manual.com.cn openshift[26629]: crypto/tls.(*block).readFromUntil(0xc20adb8fc0, 0x7f74657685b8, 0xc208c1de60, 0x5, 0x0, 0x0)
Mar 06 12:54:17 master.ose30-manual.com.cn openshift[26629]: /usr/lib/golang/src/pkg/crypto/tls/conn.go:451 +0xd9
Mar 06 12:54:17 master.ose30-manual.com.cn openshift[26629]: crypto/tls.(*Conn).readRecord(0xc2086d9080, 0x17, 0x0, 0x0)
Mar 06 12:54:17 master.ose30-manual.com.cn openshift[26629]: /usr/lib/golang/src/pkg/crypto/tls/conn.go:536 +0x1ff
Mar 06 12:54:17 master.ose30-manual.com.cn openshift[26629]: crypto/tls.(*Conn).Read(0xc2086d9080, 0xc209bcd000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
Mar 06 12:54:17 master.ose30-manual.com.cn openshift[26629]: /usr/lib/golang/src/pkg/crypto/tls/conn.go:901 +0x16a
Mar 06 12:54:17 master.ose30-manual.com.cn openshift[26629]: net/http.noteEOFReader.Read(0x7f74656e6558, 0xc2086d9080, 0xc20897f708, 0xc209bcd000, 0x1000, 0x1000, 0xb1, 0x0, 0x0)
Mar 06 12:54:17 master.ose30-manual.com.cn openshift[26629]: /usr/lib/golang/src/pkg/net/http/transport.go:1203 +0x72
Mar 06 12:54:17 master.ose30-manual.com.cn openshift[26629]: net/http.(*noteEOFReader).Read(0xc20a7b7300, 0xc209bcd000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
Mar 06 12:54:17 master.ose30-manual.com.cn openshift[26629]: <autogenerated>:124 +0xca
Mar 06 12:54:17 master.ose30-manual.com.cn openshift[26629]: bufio.(*Reader).fill(0xc209d63560)
Mar 06 12:54:17 master.ose30-manual.com.cn openshift[26629]: /usr/lib/golang/src/pkg/bufio/bufio.go:97 +0x1b3
Mar 06 12:54:17 master.ose30-manual.com.cn openshift[26629]: bufio.(*Reader).Peek(0xc209d63560, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0)
Mar 06 12:54:17 master.ose30-manual.com.cn openshift[26629]: /usr/lib/golang/src/pkg/bufio/bufio.go:132 +0x101
Mar 06 12:54:17 master.ose30-manual.com.cn openshift[26629]: net/http.(*persistConn).readLoop(0xc20897f6b0)
Mar 06 12:54:17 master.ose30-manual.com.cn openshift[26629]: /usr/lib/golang/src/pkg/net/http/transport.go:782 +0x95
Mar 06 12:54:17 master.ose30-manual.com.cn openshift[26629]: created by net/http.(*Transport).dialConn
Mar 06 12:54:17 master.ose30-manual.com.cn openshift[26629]: /usr/lib/golang/src/pkg/net/http/transport.go:600 +0x93f
Mar 06 12:54:17 master.ose30-manual.com.cn systemd[1]: openshift-master.service: main process exited, code=exited, status=2/INVALIDARGUMENT
Mar 06 12:54:17 master.ose30-manual.com.cn systemd[1]: Unit openshift-master.service entered failed state.

Comment 3 Ben Parees 2016-06-22 01:05:05 UTC
pull has merged:
https://github.com/openshift/origin/pull/9283

Comment 4 Dongbo Yan 2016-06-22 07:20:09 UTC
Verified, this bug is fixed in origin,

test result: error: error processing the template "ruby-helloworld-sample": Template "ruby-helloworld-sample" is invalid: template.parameters[0]: Invalid value: "test": Unknown generator name 'test' for parameter ADMIN_USERNAME

openshift v1.3.0-alpha.1-473-gb617847
kubernetes v1.3.0-alpha.3-599-g2746284
etcd 2.3.0+git

After merged into ose, will move to verified

Comment 5 Dongbo Yan 2016-07-14 02:54:44 UTC
Verified, this bug is fixed in ose

openshift v3.3.0.4
kubernetes v1.3.0+57fb9ac
etcd 2.3.0+git

Comment 7 errata-xmlrpc 2016-09-27 09:29:07 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-2016:1933


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