Bug 1467819 - Failed to deploy pod after s2i build with ruby repo which has run script
Failed to deploy pod after s2i build with ruby repo which has run script
Product: OpenShift Container Platform
Classification: Red Hat
Component: Image (Show other bugs)
Unspecified Unspecified
medium Severity high
: ---
: ---
Assigned To: Ben Parees
XiuJuan Wang
: Regression
Depends On:
  Show dependency treegraph
Reported: 2017-07-05 04:46 EDT by XiuJuan Wang
Modified: 2017-08-16 15 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: No Doc Update
Doc Text:
regression that was fixed before being released.
Story Points: ---
Clone Of:
Last Closed: 2017-08-01 11:22:46 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description XiuJuan Wang 2017-07-05 04:46:58 EDT
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:

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

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 14:03:44 EDT
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 16:41:39 EDT
Commit pushed to master at https://github.com/openshift/source-to-image

ensure created directories are readable/executable

bug 1467819


add test repo for overriding scripts
Comment 3 Ben Parees 2017-07-05 17:34:10 EDT
fix: https://github.com/openshift/origin/pull/15065
Comment 5 XiuJuan Wang 2017-07-10 02:58:44 EDT
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.