Bug 1154063 - "Permission denied" for /bin/rpm when run "gear restart" inside gear
Summary: "Permission denied" for /bin/rpm when run "gear restart" inside gear
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Containers
Version: 2.2.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Brenton Leanhardt
QA Contact: libra bugs
URL:
Whiteboard:
Depends On: 1153889
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-10-17 12:32 UTC by Brenton Leanhardt
Modified: 2014-12-10 13:24 UTC (History)
11 users (show)

Fixed In Version: openshift-origin-util-scl-1.20.1.1-1
Doc Type: Bug Fix
Doc Text:
Previously, attempting to restart a gear from within an SSH session failed with a permission error. This issue was due to the gear restart process using the oo-exec-ruby command, which used the rpm command to check the Ruby version. This bug fix updates the oo-exec-ruby command to use the "/usr/bin/ruby --version" command instead of the rpm command, and as a result gears can now be restarted successfully from within an SSH session.
Clone Of: 1153889
Environment:
Last Closed: 2014-12-10 13:24:26 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2014:1979 0 normal SHIPPED_LIVE Red Hat OpenShift Enterprise 2.2.2 bug fix and enhancement update 2014-12-10 18:23:46 UTC

Description Brenton Leanhardt 2014-10-17 12:32:59 UTC
+++ This bug was initially created as a clone of Bug #1153889 +++

Description:
Below information appears when run "gear restart" inside gear:
[php-w.dev.rhcloud.com 5440bda64079701da0000025]\> gear restart
/usr/bin/oo-exec-ruby: line 8: /bin/rpm: Permission denied
Cart to restart?
1. php-5.4
?  1
Restarting PHP 5.4 cartridge (Apache+mod_php)
Application directory "/" selected as DocumentRoot
/usr/bin/oo-exec-ruby: line 8: /bin/rpm: Permission denied
/usr/bin/oo-exec-ruby: line 8: /bin/rpm: Permission denied
/usr/bin/oo-exec-ruby: line 8: /bin/rpm: Permission denied
/usr/bin/oo-exec-ruby: line 8: /bin/rpm: Permission denied
/usr/bin/oo-exec-ruby: line 8: /bin/rpm: Permission denied

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

How reproducible:
always

steps to Reproduce:
1. Create an app
2. SSH to the app and run "gear restart"

Actual results:
There will a permission denied warning appears.

Expected results:
It should run without warning

Additional info:
1. [php-w.dev.rhcloud.com 5440bda64079701da0000025]\> ls -al /bin/rpm
-rwxr-x---. 1 root wheel 30600 Sep 12  2013 /bin/rpm
2. This permission warning also appears during git push.

--- Additional comment from weiwei jiang on 2014-10-17 04:15:07 EDT ---

This issue also can be reproduced when git push back to app head gear.

$ git push 
Counting objects: 5, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 270 bytes, done.
Total 3 (delta 2), reused 0 (delta 0)
remote: /usr/bin/oo-exec-ruby: line 8: /bin/rpm: Permission denied
remote: Stopping Python 2.6 cartridge
remote: Waiting for stop to finish
remote: Waiting for stop to finish
remote: Waiting for stop to finish
remote: Stopping MySQL 5.1 cartridge
remote: /usr/bin/oo-exec-ruby: line 8: /bin/rpm: Permission denied
remote: Building git ref 'master', commit b0d19f1
remote: /usr/bin/oo-exec-ruby: line 8: /bin/rpm: Permission denied
remote: Activating virtenv
remote: Running setup.py script..
remote: running develop
remote: running egg_info
remote: creating YourAppName.egg-info
remote: writing requirements to YourAppName.egg-info/requires.txt
remote: writing YourAppName.egg-info/PKG-INFO
remote: writing top-level names to YourAppName.egg-info/top_level.txt
remote: writing dependency_links to YourAppName.egg-info/dependency_links.txt
remote: writing requirements to YourAppName.egg-info/requires.txt
remote: writing YourAppName.egg-info/PKG-INFO
remote: writing top-level names to YourAppName.egg-info/top_level.txt
remote: writing dependency_links to YourAppName.egg-info/dependency_links.txt
remote: writing manifest file 'YourAppName.egg-info/SOURCES.txt'
remote: reading manifest file 'YourAppName.egg-info/SOURCES.txt'
remote: writing manifest file 'YourAppName.egg-info/SOURCES.txt'
remote: running build_ext
remote: Creating /var/lib/openshift/5440f498ef46d6d849000001/app-root/runtime/dependencies/python/virtenv/lib/python2.6/site-packages/YourAppName.egg-link (link to .)
remote: Adding YourAppName 1.0 to easy-install.pth file
remote: 
remote: Installed /var/lib/openshift/5440f498ef46d6d849000001/app-root/runtime/repo
remote: Processing dependencies for YourAppName==1.0
remote: Searching for Django==1.4
remote: Best match: Django 1.4
remote: Processing Django-1.4-py2.6.egg
<-...............->
remote: Preparing build for deployment
remote: Deployment id is 42c7419f
remote: Activating deployment
remote: Starting MySQL 5.1 cartridge
remote: /usr/bin/oo-exec-ruby: line 8: /bin/rpm: Permission denied
remote: Script 
<-................->
remote: 73 static files copied.
remote: Starting Python 2.6 cartridge (Apache+mod_wsgi)
remote: Application directory "wsgi/" selected as DocumentRoot
remote: Application "wsgi/application" selected as default WSGI entry point
remote: /usr/bin/oo-exec-ruby: line 8: /bin/rpm: Permission denied
remote: /usr/bin/oo-exec-ruby: line 8: /bin/rpm: Permission denied
remote: -------------------------
remote: Git Post-Receive Result: success
remote: Activation status: success
remote: Deployment completed with status: success
To ssh://5440f498ef46d6d849000001.rhcloud.com/~/git/py26.git/
   d6e350e..b0d19f1  master -> master

--- Additional comment from Michal Fojtik on 2014-10-17 07:19:02 EDT ---

https://bugzilla.redhat.com/show_bug.cgi?id=1153975#c1

Comment 4 Ma xiaoqiang 2014-12-02 01:40:54 UTC
Check on puddle [2.2.2/2014-11-26.3]

1. create an app
#rhc app create testapp php-5.4
2. SSH to the app and run "gear restart"
> gear restart
Cart to restart?
1. php-5.4
?  1
Restarting PHP 5.4 cartridge (Apache+mod_php)
Application directory "/" selected as DocumentRoot

Comment 6 errata-xmlrpc 2014-12-10 13:24:26 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://rhn.redhat.com/errata/RHBA-2014-1979.html


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