Bug 1840504

Summary: Copy cni-conf-template.json failed when building wmco operator image
Product: OpenShift Container Platform Reporter: gaoshang <sgao>
Component: Windows ContainersAssignee: Mansi Kulkarni <mankulka>
Status: CLOSED ERRATA QA Contact: gaoshang <sgao>
Severity: high Docs Contact:
Priority: unspecified    
Version: 4.5CC: aos-bugs, gmarkley, rgudimet
Target Milestone: ---   
Target Release: 4.5.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-07-13 17:41:51 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:
Attachments:
Description Flags
operator-sdk build log none

Description gaoshang 2020-05-27 04:53:39 UTC
Description of problem:
When building the operator image, got error in "COPY --from=build /build/windows-machine-config-operator/pkg/internal/cni-conf-template.json .", file not found.

# operator-sdk build quay.io/<insert username>/wmco:latest
...
STEP 40: COPY --from=build /build/windows-machine-config-operator/pkg/internal/cni-conf-template.json .
Error: error building at STEP "COPY --from=build /build/windows-machine-config-operator/pkg/internal/cni-conf-template.json .": no files found matching "/var/lib/containers/storage/overlay/f55192a304efd8f8698154e70007925883fc5570166b04ae995c611afb94f531/merged/build/windows-machine-config-operator/pkg/internal/cni-conf-template.json": no such file or directory
FATA[0166] Failed to output build image quay.io/sgaoshang/wmco:latest: failed to exec []string{"docker", "build", "-f", "build/Dockerfile", "-t", "quay.io/sgaoshang/wmco:latest", "."}: exit status 125

Version-Release number of selected component (if applicable):
windows-machine-config-operator git commit: 14afbf4ffd6bb37b8dc9518edf5a7fa9407197a0
# operator-sdk version
operator-sdk version: "v0.17.0", commit: "2fd7019f856cdb6f6618e2c3c80d15c3c79d1b6c", kubernetes version: "unknown", go version: "go1.13.10 linux/amd64"

How reproducible:
always

Steps to Reproduce:
1. Delete all local docker images
# docker rmi -f $(docker images -q)
2. Build the operator image
# operator-sdk build quay.io/<insert username>/wmco:latest

Actual results:
Operator image build failed

Expected results:
Operator image build succeed

Additional info:

Comment 1 gaoshang 2020-05-27 04:58:46 UTC
Created attachment 1692529 [details]
operator-sdk build log

Full log attached

Comment 5 gaoshang 2020-05-28 16:29:46 UTC
This bug has been verified and passed, thanks.

Version:
windows-machine-config-operator git commit: 8edef3c68c34c7c558cf3f039c9eb8706f429d7c

Steps:
Build wmco operator image succeed.
# operator-sdk build quay.io/<insert username>/wmco:latest
...
INFO[0171] Operator build complete.

Comment 6 errata-xmlrpc 2020-07-13 17:41:51 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-2020:2409