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

Bug 1541914

Summary: Unclear warning if set --no-cache for source build
Product: OpenShift Container Platform Reporter: Wenjing Zheng <wzheng>
Component: ocAssignee: Ben Parees <bparees>
Status: CLOSED CURRENTRELEASE QA Contact: Xingxing Xia <xxia>
Severity: urgent Docs Contact:
Priority: medium    
Version: 3.9.0CC: aos-bugs, jokerman, mmccomas, smunilla
Target Milestone: ---   
Target Release: 3.9.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openshift v3.9.0-0.42.0 Doc Type: Bug Fix
Doc Text:
Cause: Passing the --no-cache argument to start-build when running a build for a non-docker strategy build was not checked for validity. Consequence: A nil pointer error can occur trying to process the invalid argument. Fix: Error check the arguments being provided to the build to ensure they are applicable and return an error if they are not. Result: An error is returned to the user in this situation instead of a nil pointer condition.
Story Points: ---
Clone Of:
: 1542247 1542248 (view as bug list) Environment:
Last Closed: 2018-06-18 14:40:32 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:
Bug Depends On:    
Bug Blocks: 1542247, 1542248    

Description Wenjing Zheng 2018-02-05 08:01:47 UTC
Description of problem:
Below warning appears if try to set --no-cache for source build
# oc start-build ruby-ex --no-cache=false
Unable to connect to the server: unexpected EOF; some request body already written

Version-Release number of selected component (if applicable):
oc v3.9.0-0.36.0
kubernetes v1.9.1+a0ce1bc657
features: Basic-Auth GSSAPI Kerberos SPNEGO

How reproducible:
always

Steps to Reproduce:
1.oc new-app ruby~https://github.com/openshift/ruby-ex
2.oc start-build ruby-ex --no-cache=false
3.

Actual results:
# oc start-build ruby-ex --no-cache=false
Unable to connect to the server: unexpected EOF; some request body already written

Expected results:
Should warn --no-cache only work for docker build.

Additional info:

Comment 1 Ben Parees 2018-02-05 21:59:45 UTC
this actually crashes my master api server, so raising severity.

Comment 2 Ben Parees 2018-02-05 22:13:01 UTC
pr: https://github.com/openshift/origin/pull/18461

Comment 3 openshift-github-bot 2018-02-07 01:59:03 UTC
Commit pushed to master at https://github.com/openshift/origin

https://github.com/openshift/origin/commit/e38767685c1ee644354d4ba17598855f20173f65
check all buildrequest options for validity against build type

bug 1541914

https://bugzilla.redhat.com/show_bug.cgi?id=1541914

Comment 4 Wenjing Zheng 2018-02-14 02:14:24 UTC
Verified with below version:
# oc start-build ruby-ex --no-cache=false
Error from server (BadRequest): Cannot specify Docker build specific options on default/ruby-ex, not a Docker build.
[root@host-172-16-120-56 ~]# openshift version
openshift v3.9.0-0.42.0
kubernetes v1.9.1+a0ce1bc657
etcd 3.2.8