Bug 1858779

Summary: Image operating system mismatch
Product: OpenShift Container Platform Reporter: peter ducai <pducai>
Component: BuildAssignee: Adam Kaplan <adam.kaplan>
Status: CLOSED ERRATA QA Contact: wewang <wewang>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 4.4CC: adam.kaplan, aos-bugs, gmontero, hgomes, ppostler, skuznets, wzheng
Target Milestone: ---   
Target Release: 4.6.0   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Cause: Buildah erased image architecture and OS fields on images Consequence: Common container tools will fail because the resulting images do not identify their architecture and OS. Fix: Buildah does not overwrite the image and architecture unless there are explicit overrides. Result: Resulting images always have architecture and OS fields, and the image mismatch warning does not appear.
Story Points: ---
Clone Of:
: 1868388 (view as bug list) Environment:
Last Closed: 2020-10-27 16:16:00 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: 1868388, 1868401    

Description peter ducai 2020-07-20 11:49:13 UTC
Description of problem:

Customer gets errors when building from Dockerfile and pushing image, due to missing OS and Arch


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

Customer is running latest (updated) OCP 4.4.11 running on VSphere 5.5 and other cluster on 5.7

CoreOS 44.81.202007010318-0 (Ootpa) 4.18.0-147.20.1.el8_1.x86_64   
cri-o://1.17.4-18.dev.rhaos4.4.gitfb8131a.el8


How reproducible:


Steps to Reproduce:

 Build from Dockerfile.

Actual results:

STEP 8: RUN /usr/libexec/s2i/assemble
---> Enabling s2i support in httpd24 image
    AllowOverride All
---> Installing application source
=> sourcing 20-copy-config.sh ...
=> sourcing 40-ssl-certs.sh ...
---> Generating SSL key pair for httpd...
STEP 9: CMD /usr/libexec/s2i/run
STEP 10: COMMIT temp.builder.openshift.io/rusk/httpd-example-1:0c294c4d
time="2020-07-16T14:50:21Z" level=info msg="Image operating system mismatch: image uses \"\", expecting \"linux\""
time="2020-07-16T14:50:21Z" level=info msg="Image architecture mismatch: image uses \"\", expecting \"amd64\""
Getting image source signatures


Expected results:

 Successful build without OS/Arch errors.




Additional info:

Also last release notes [1] claims [2] should be fixed (also in 4.5)
[1] https://docs.openshift.com/container-platform/4.4/release_notes/ocp-4-4-release-notes.html#ocp-4-4-bug-fixes
[2] https://bugzilla.redhat.com/show_bug.cgi?id=1821860


possibly linked to 

https://bugzilla.redhat.com/show_bug.cgi?id=1821858
https://bugzilla.redhat.com/show_bug.cgi?id=1813387
https://github.com/containers/podman/issues/5503
https://github.com/containers/podman/pull/5508.

Comment 1 Adam Kaplan 2020-07-20 14:23:45 UTC
This warning can be ignored - it is logged by the subsystem that selects an image from a manifest list, and does not impact the ability of builds to push images to the internal registry. The logging of this at a "warning" level a known issue, and has been addressed in a newer version of the library.

Moving severity of this issue to "low".

Comment 4 Adam Kaplan 2020-07-22 13:07:59 UTC
Moving the severity back to "high" - the empty arch/OS tags propagate to the image and imagestream tag, which prevents container scanning tools from working.

Comment 6 Adam Kaplan 2020-08-04 12:42:37 UTC
This can be fixed by bumping the buildah version in openshift/builder to v1.15.1. For backports we should use buildah v1.14.11 once it is released.

Comment 18 errata-xmlrpc 2020-10-27 16:16:00 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 (OpenShift Container Platform 4.6 GA Images), 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:4196