Red Hat Bugzilla – Bug 1288637
gear start aborts prematurely if a single cartridge fails to start
Last modified: 2016-11-07 22:48:31 EST
Description of problem:
When a gear contains multiple cartridges, the start process exits completely when a single cartridge's start command returns a non-zero exit code. This can leads to situations where an app is rendered non-functional due to a bug in a secondary cartridge.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. create an app with several cartridges. For example, php, mysql, and https://github.com/wshearn/openshift-cartridge-osbs-client.git
2. edit backup-client/bin/control and remove the "|| true" from the curl command lines
3. stop the gear
4. start the gear
In the application we observed, the mysql cartridge started first, followed by the backup-client cartridge. The backup-client cartridge failed (because there was no server configured for curl to connect to), and the php cartridge's start script was never called.
The php cartridge should start regardless of whether the backup-client cartridge starts successfully.
Does it make sense in general to start the framework when the database fails to start?
Could you use Configure-Order in your custom cartridge's manifest to start the framework cartridge first? Would that be a satisfactory solution?
We had a face-to-face discussion about this one, but I don't recall the specifics. This seems to be a pretty rare case, so I think we can defer it for now. I'll re-raise it if we see other occurrences.
Closing this for now as per Andy's comment. Lets re-open this if we see any other interesting occurrences.