Bug 1467819 - Failed to deploy pod after s2i build with ruby repo which has run script
Summary: Failed to deploy pod after s2i build with ruby repo which has run script
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: ImageStreams
Version: 3.6.0
Hardware: Unspecified
OS: Unspecified
medium
high
Target Milestone: ---
: ---
Assignee: Ben Parees
QA Contact: XiuJuan Wang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-07-05 08:46 UTC by XiuJuan Wang
Modified: 2017-08-16 19:51 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
regression that was fixed before being released.
Clone Of:
Environment:
Last Closed: 2017-08-01 15:22:46 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description XiuJuan Wang 2017-07-05 08:46:58 UTC
Description of problem:
the rights of run script in https://github.com/openshift-qe/hot-deploy-ruby is :
-rwxrwxr-x. 1 wxj wxj  95 Jul  5 15:07 run
But after s2i build ,docker run the builder image to check the run script:
 $ ls /tmp/scripts/run -l
-rwxr-xr-x. 1 default root 95 Jul  5 08:00 /tmp/scripts/run

Then deploy builder image met below error:
/usr/bin/container-entrypoint: line 2: /tmp/scripts/run: Permission denied
/usr/bin/container-entrypoint: line 2: exec: /tmp/scripts/run: cannot execute: Permission denied

Could deploy successfully with registry.access.redhat.com/rhscl/ruby-22-rhel7 and ruby-23-rhel7 in free-int(3.6.116)
Failed deploy with registry.access.redhat.com/rhscl/ruby-22-rhel7 and ruby-23-rhel7 in OCP 3.6.133
Failed deploy with brew.../ruby-22-rhel7 and  ruby-23-rhel7 in OCP-3.6.133

Version-Release number of selected component (if applicable):
registry.access.redhat.com/rhscl/ruby-22-rhel7 ruby-23-rhel7 and ruby-20-rhel7

brew../ruby-22-rhel7  de36b5fda43e
brew../ruby-23-rhel7  abd1fee676d3

How reproducible:
always

Steps to Reproduce:
1.Create an app
oc new-app ruby:latest https://github.com/openshift-qe/hot-deploy-ruby
2.After build complete, check app pod
3.

Actual results:
step 2 : app pod is CrashLoopBackOff status
and pod logs is following:
/usr/bin/container-entrypoint: line 2: /tmp/scripts/run: Permission denied
/usr/bin/container-entrypoint: line 2: exec: /tmp/scripts/run: cannot execute: Permission denied


Expected results:
Should deploy successfully

Additional info:

Comment 1 Ben Parees 2017-07-05 18:03:44 UTC
this was introduced by https://github.com/openshift/source-to-image/pull/763 and would affect any build using s2i scripts from the application git repo.  Working on a fix.

Comment 2 openshift-github-bot 2017-07-05 20:41:39 UTC
Commit pushed to master at https://github.com/openshift/source-to-image

https://github.com/openshift/source-to-image/commit/1eebbcc799972898997419629320009ea12e0cf6
ensure created directories are readable/executable

bug 1467819

https://bugzilla.redhat.com/show_bug.cgi?id=1467819

add test repo for overriding scripts

Comment 3 Ben Parees 2017-07-05 21:34:10 UTC
fix: https://github.com/openshift/origin/pull/15065

Comment 5 XiuJuan Wang 2017-07-10 06:58:44 UTC
This issue has been fixed in [1], app pod could deploy successfully after s2i build
Server https://****:8443
openshift v3.6.138
kubernetes v1.6.1+5115d708d7


Note You need to log in before you can comment on or make changes to this bug.