Reputation: 1630
When trying to create an app:
rhc --debug app create mezzgit python-2.7 --from-code https://[email protected]/radeksvarz/mezzanineopenshift.git
The app is not created and I get:
...
DEBUG: code 422 270080 ms
The initial build for the application failed: Shell command '/sbin/runuser -s
/bin/sh 53c31a3ae0b8cd298e0009c0 -c "exec /usr/bin/runcon
'unconfined_u:system_r:openshift_t:s0:c2,c490' /bin/sh -c \"gear postreceive
--init >> /tmp/initial-build.log 2>&1\""' exceeded timeout of 232
...
However this works:
rhc app create mezzgit python-2.7
cd mezzgit
del *
git remote add mezzanineopenshift -m master [email protected]:radeksvarz/mezzanineopenshift.git
git pull -s recursive -X theirs mezzanineopenshift master
git add -A
git commit -m "initial mezzanine deploy"
git push origin
Why is there an error in the first case?
Upvotes: 2
Views: 607
Reputation: 2807
The first example you provided:
rhc --debug app create mezzgit python-2.7 --from-code https://[email protected]/radeksvarz/mezzanineopenshift.git`
Is essentially doing two major actions in one call. The first is creating everything necessary for your app to run and the second is to use a custom template for this application creation. The app creation process has a timeout associated with it in order to keep things from running forever or taking an extensive amount of time, thus causing issues with the Openshift Broker.
Now the --from-code
is saying you want to use a quickstart as part of your application creation. One of the things that's going to determine if thats successful or not, is how long it takes to setup & complete that quickstart on your Openshift gear. So if executes a lot of lengthy scripts or downloads large files, its likely your app creation will time out.
Therefore if a quickstart or downloadable cartridge can't be created/completed in the specified timeout; its best to go with the secondary option. Which is to create the basic app, pull in the remote repo, and then push your changes back up. This separates things into two different actions and thus requiring the Openshift Broker to do a lot less work/waiting.
Upvotes: 2