Bug 1798192

Summary: Builds fail with "image is in use by a container"
Product: OpenShift Container Platform Reporter: Adam Kaplan <adam.kaplan>
Component: BuildAssignee: Nalin Dahyabhai <nalin>
Status: CLOSED CURRENTRELEASE QA Contact: wewang <wewang>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.2.0CC: aos-bugs, bparees, wzheng
Target Milestone: ---   
Target Release: 4.3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-02-07 02:28:50 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 Adam Kaplan 2020-02-04 18:53:38 UTC
Description of problem:

OCP 4.2 builds can fail with the following error:

```
STEP 10: COMMIT temp.builder.openshift.io/ci-op-nbir7n6t/artifacts:<id>
<sha>
error: build error: Image used by <sha>: image is in use by a container
```

These errors go away if an arbitrary environment variable is added to the Docker strategy build config.


Version-Release number of selected component (if applicable): 4.2.0


How reproducible: Sometimes


Steps to Reproduce:
1. Run a Docker strategy build using a multi-stage dockerfile.


Actual results:

Build fails with "image is in use by container" error. Error goes away and build memory is reduced if an arbitrary environment variable is added.


Expected results:

Builds succeed.


Additional info:

https://github.com/openshift/ci-tools/pull/337/files

Comment 1 Ben Parees 2020-02-05 02:46:56 UTC
I think we've confirmed this was fixed in 4.3 so we just need to decide if we're going to backport the fix to 4.2.

Assuming Adam/Nalin agree, please close/clone as needed to get this off the 4.4 blocker list.

Comment 2 Adam Kaplan 2020-02-07 02:28:50 UTC
Original issue came from Test Platform team moving workloads to 4.x clusters. They are now testing with 4.3 - closing as CURRENT_RELEASE, I don't think we have a compelling reason to backport.