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:
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.
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 https://github.com/openshift/origin-server/commit/cf2cd9fa5118c4f8a80801c013aad60a8442a4ea Fix bug 969605 https://github.com/openshift/origin-server/commit/577ee8a86431dee12cbac9b14c0143f0409a1aaa 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 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