Bug 969605 - non-executable bin/control script fails to be ignored
non-executable bin/control script fails to be ignored
Status: CLOSED CURRENTRELEASE
Product: OpenShift Online
Classification: Red Hat
Component: Containers (Show other bugs)
2.x
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Paul Morie
libra bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-05-31 18:05 EDT by Jhon Honce
Modified: 2015-05-14 19:20 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-06-11 00:15:15 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jhon Honce 2013-05-31 18:05:44 EDT
Description of problem:
A bin/control file that is not executable should be ignored and not generate an error.

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


How reproducible:
always

Steps to Reproduce:
1. Create a cartridge (downloadable easiest) and chmod a-x bin/control
2. Attempt to create an application with the cartridge


Actual results:
'set -e' cannot be run error

Expected results:
no error and hooks run if available

Additional info:
Comment 1 Paul Morie 2013-06-03 10:08:30 EDT
We used to have a validation for this:

origin-server/node/lib/openshift-origin-node/model/cartridge_repository.rb

...but it's commented out now.  Tracking down why it was.
Comment 2 Paul Morie 2013-06-03 14:09:21 EDT
PR submitted to stage and master.

I added a validation so that users will get an error if a cartridge control script is not executable, as well as a code change to ensure that user's won't hit the "'set -e' cannot be run" error if the cartridge author leaves the bin dir unlocked and they chmod -x the control script.
Comment 4 Meng Bo 2013-06-04 02:10:06 EDT
Checked on devenv_3313, issue has been fixed.

Create app with download cartridge which bin/control with 644 permission will get error message during creation.

# rhc app create app1 https://raw.github.com/bmeng/downloadable-mock/master/metadata/manifest.yml --no-dns
The cartridge 'https://raw.github.com/bmeng/downloadable-mock/master/metadata/manifest.yml' will be downloaded and installed

Application Options
-------------------
  Namespace:  bmengdev
  Cartridges: https://raw.github.com/bmeng/downloadable-mock/master/metadata/manifest.yml
  Gear Size:  default
  Scaling:    no

Creating application 'app1' ... 
Malformed cartridge (downloadable-mock, 0.1, 0.0.1):
bin/control is not executable

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