Bug 1541914 - Unclear warning if set --no-cache for source build
Summary: Unclear warning if set --no-cache for source build
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: oc
Version: 3.9.0
Hardware: Unspecified
OS: Unspecified
medium
urgent
Target Milestone: ---
: 3.9.0
Assignee: Ben Parees
QA Contact: Xingxing Xia
URL:
Whiteboard:
Depends On:
Blocks: 1542247 1542248
TreeView+ depends on / blocked
 
Reported: 2018-02-05 08:01 UTC by Wenjing Zheng
Modified: 2018-06-18 18:28 UTC (History)
4 users (show)

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.
Clone Of:
: 1542247 1542248 (view as bug list)
Environment:
Last Closed: 2018-06-18 14:40:32 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

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


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