Bug 1673806

Summary: OpenShift 3.10 Binary-Build fails when filename contains an umlaut
Product: OpenShift Container Platform Reporter: Christian Stark <cstark>
Component: BuildAssignee: Adam Kaplan <adam.kaplan>
Status: CLOSED ERRATA QA Contact: wewang <wewang>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 3.10.0CC: aos-bugs, mhayashi, wzheng
Target Milestone: ---Keywords: NeedsTestCase
Target Release: 4.1.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Cause: openshift-docker-builder did not have locale set via the LANG environment variable Consequence: binary builds failed because it could not extract files with UTF-8 filenames Fix: builds default the LANG environment variable to "en_US.utf8". This can be overrode by setting the LANG environment variable in the BuildConfig object. Result: binary builds succeed if file names contain UTF-8 characters
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-06-04 10:42:43 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 Christian Stark 2019-02-08 08:07:41 UTC
Description of problem:


When following the steps:

Tutorial: Building local code changes
https://docs.openshift.com/container-platform/3.10/dev_guide/dev_tutorials/binary_builds.html#binary-builds-tutorial-overview

it fails when a filename contains an umlaut

Error is:
[quicklab@master-0 ruby-hello-world]$  oc start-build ruby-hello-world --from-dir="." --follow
Uploading directory "." as binary input for the build ...
build "ruby-hello-world-13" started
Receiving source from STDIN as archive ...
error: unable to extract binary build input, must be a zip, tar, or gzipped tar, or specified as a file: exit status 1

no further useful info can be found in the logs 


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

tested with 3.10 (as customer)


How reproducible:

Follow all the steps in:
https://docs.openshift.com/container-platform/3.10/dev_guide/dev_tutorials/binary_builds.html#binary-builds-tutorial-overview

but in step 4 just rename the ruby file to contain an umlaut:

e.g
[quicklab@master-0 test]$ pwd
/home/quicklab/ruby-hello-world/test
täst.rb

Actual results:

error described is thrown and build is failing


Expected results:

build working or a meaningful error is thrown

Additional info:


customer states you cannot always prevent that a umlaut gets used and it took very long to find the issue so it should be fixed

Comment 1 Ben Parees 2019-02-08 15:03:16 UTC
I wonder if this is also a problem for git repos that contain a file w/ an umlaut, or it's specific to how the binary build tars+streams the content in.  We should check.

Comment 3 Adam Kaplan 2019-03-22 13:18:18 UTC
origin PR has merged. Builder PR adds additional debugging info.

Comment 5 wewang 2019-03-26 09:51:48 UTC
Verified in 
 4.0.0-0.nightly-2019-03-25-180911
payload: image: registry.svc.ci.openshift.org/ocp/release@sha256:2d781cbe28722b6eeb3ff969c5dc68199198fd1f0514a3284eb7215ae0cb4d2f

Steps:
1. Create files with include umlaut, like utf8_tést_app.rb
2. Start build from with local source, build complete 
[wewang@Desktop ruby]$ ls
config.ru  Dockerfile  Gemfile  utf8_tést_app.rb
  $ oc start-build ruby-hello-world --from-dir="." --follow
  $ oc get builds
NAME                 TYPE     FROM          STATUS     STARTED          DURATION
ruby-hello-world-1   Docker   Git@787f1be   Complete   12 minutes ago   1m23s
ruby-hello-world-2   Docker   Binary        Complete   6 minutes ago    1m7s

Comment 7 errata-xmlrpc 2019-06-04 10:42:43 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-2019:0758