2

When trying to create an app:

rhc --debug app create mezzgit python-2.7 --from-code https://radeksvarz@bitbucket.org/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 git@bitbucket.org: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?

Radek
  • 1,530
  • 16
  • 20

1 Answers1

2

The first example you provided:

rhc --debug app create mezzgit python-2.7 --from-code https://radeksvarz@bitbucket.org/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.

niharvey
  • 2,807
  • 2
  • 15
  • 24
  • Thanks for the explanation. Even though this means that we cannot develop some quickstarts which are having several (python) dependencies to install. – Radek Jul 16 '14 at 21:42
  • 1
    You can still create quickstarts, you just wont be able to create "one-click deploy" quickstarts if there's a lot of dependences. If its important that you do a one click deploy, consider turning your stuff into a custom cartridge. – niharvey Jul 16 '14 at 21:48
  • So it means, that people will need to follow the same CLI procedure in such "quickstarts". Is this correct? – Radek Jul 20 '14 at 12:06