Bug 1384973
| Summary: | Cannot use ImageStreamTag for Build custom strategy builder image | ||
|---|---|---|---|
| Product: | OpenShift Container Platform | Reporter: | Tim Waugh <twaugh> |
| Component: | Build | Assignee: | Martin Milata <mmilata> |
| Status: | CLOSED ERRATA | QA Contact: | Wang Haoran <haowang> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 3.2.1 | CC: | aos-bugs, bparees, shiywang, tdawson |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: |
Cause:
When creating Build object through REST API, the type of the "from" image is not checked and is assumed to be DockerImage.
Consequence:
Creating Build object with custom strategy referencing an ImageStreamTag as its "from" image results in failure or, potentially, build using the wrong image.
Fix:
Type of builder image is checked when creating Build object and if it is not DockerImage the request is rejected as invalid.
Result:
Custom builds with builder image specified as ImageStreamTag are rejected.
|
Story Points: | --- |
| Clone Of: | Environment: | ||
| Last Closed: | 2017-01-18 12:42:58 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
Tim Waugh
2016-10-14 13:08:06 UTC
Tim, this is working as designed. A build will not resolve an ImageStreamTag, only a BuildConfig will. However, I think we have a bug in that we're allowing the Build object to be created as valid. That seems fine. We are resolving the ImageStreamTag to a DockerImage when creating the Build object now, so that seems like the correct approach. Pull request: https://github.com/openshift/origin/pull/11398 test on oc v3.4.0.16+cc70b72 openshift v3.4.0.16+cc70b72 kubernetes v1.4.0+776c994 now return is "The Build "my-build" is invalid: spec.strategy.customStrategy.from.kind: Invalid value: "ImageStreamTag": only DockerImage references are supported for Builds " change status to verified 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-2017:0066 |