Bug 1114948

Summary: [origin_cartridge_213] Meets "InvalidByteSequenceError" on the first time do jenkins build for app
Product: OpenShift Online Reporter: Meng Bo <bmeng>
Component: ImageAssignee: Ben Parees <bparees>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.xCC: jokerman, mmccomas
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1116819 (view as bug list) Environment:
Last Closed: 2014-07-15 10:31:31 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: 1116819    

Description Meng Bo 2014-07-01 10:19:25 UTC
Description of problem:
Create app and add the jenkins client to the app, do jenkins build.

It will report the build failed with following error but the jenkins build actually running well in the background.

remote: Executing Jenkins build.
remote:
remote: You can track your build at https://jenkins-bmengdev.dev.rhcloud.com/job/perl1-build
remote:
remote: Waiting for build to schedule....../opt/rh/ruby193/root/usr/share/ruby/json/common.rb:155:in `encode': "\xE2" on US-ASCII (Encoding::InvalidByteSequenceError
remote:         from /opt/rh/ruby193/root/usr/share/ruby/json/common.rb:155:in `initialize'
remote:         from /opt/rh/ruby193/root/usr/share/ruby/json/common.rb:155:in `new'
remote:         from /opt/rh/ruby193/root/usr/share/ruby/json/common.rb:155:in `parse'
remote:         from /var/lib/openshift/53b2c0fee6ed66d678000036/jenkins-client//bin/jenkins_build:24:in `get_jobs_info'
remote:         from /var/lib/openshift/53b2c0fee6ed66d678000036/jenkins-client//bin/jenkins_build:38:in `get_build_num'
remote:         from /var/lib/openshift/53b2c0fee6ed66d678000036/jenkins-client//bin/jenkins_build:80:in `<main>'
remote: !!!!!!!!
remote: Deployment Halted!
remote: If the build failed before the deploy step, your previous
remote: build is still running.  Otherwise, your application may be
remote: partially deployed or inaccessible.
remote: Fix the build and try again.
remote: !!!!!!!!
remote: An error occurred executing 'gear postreceive' (exit code: 1)
remote: Error message: CLIENT_ERROR: Failed to execute: 'control post-receive' for /var/lib/openshift/53b2c0fee6ed66d678000036/jenkins-client
remote:
remote: For more details about the problem, try running the command again with the '--trace' option.
To ssh://53b2c0fee6ed66d678000036.rhcloud.com/~/git/perl1.git/
   08ab80a..4b731f0  master -> master


Manually check the build_info at the same time will get the following result:
...
    "inQueue": true,
    "keepDependencies": false,
    "lastBuild": null,
    "lastCompletedBuild": null,
    "lastFailedBuild": null,
    "lastStableBuild": null,
    "lastSuccessfulBuild": null,
    "lastUnstableBuild": null,
    "lastUnsuccessfulBuild": null,
    "name": "perl1-build",
...

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

How reproducible:
not pretty sure but often on the 1st time build

Steps to Reproduce:
1. Create app with jenkins client added
2. Do jenkins build
3.

Actual results:
It will report fail with error in description. But the build successfully actually.

Expected results:
Should not show such error.

Additional info:
There is nothing unusual found in the jenkins log.

Comment 1 Ben Parees 2014-07-01 20:53:08 UTC
https://github.com/openshift/origin-server/pull/5563

I was not able to reproduce this, but i've added some code that may address the invalid byte sequences, please give it a shot. 

Thanks

Comment 2 Meng Bo 2014-07-02 07:07:49 UTC
With several tries on devenv_4932, I did not meet the issue.

Move the bug to verified.