Red Hat Bugzilla – Bug 969605
non-executable bin/control script fails to be ignored
Last modified: 2015-05-14 19:20:24 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):
Steps to Reproduce:
1. Create a cartridge (downloadable easiest) and chmod a-x bin/control
2. Attempt to create an application with the cartridge
'set -e' cannot be run error
no error and hooks run if available
We used to have a validation for this:
...but it's commented out now. Tracking down why it was.
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.
Commits pushed to master at https://github.com/openshift/origin-server
Fix bug 969605
Fix bug 969605
Validate control script is executable only if it exists
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
Gear Size: default
Creating application 'app1' ...
Malformed cartridge (downloadable-mock, 0.1, 0.0.1):
bin/control is not executable