Bug 987750 - Exceeded timeout installing CouchDB
Exceeded timeout installing CouchDB
Product: OpenShift Online
Classification: Red Hat
Component: Containers (Show other bugs)
Unspecified Unspecified
unspecified Severity high
: ---
: ---
Assigned To: Hiro Asari
libra bugs
Depends On:
  Show dependency treegraph
Reported: 2013-07-24 01:36 EDT by David Perrales
Modified: 2013-11-03 20:50 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-07-25 13:54:36 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description David Perrales 2013-07-24 01:36:42 EDT
Description of problem:
I create in openshift forum https://www.openshift.com/forums/openshift/exceeded-timeout-installing-couchdb a entry about issue.

I am trying to install couchdb from https://github.com/marianoguerra/couchdb-for-openshift repository but a have an error about exceed timeout.

As Mariano said "Now go play an come back around one hour later and you will have a running couchdb instance". How I can avoid this problem?

Version-Release number of selected component (if applicable):

v1.2 Public Openshift 

How reproducible:

Express installation describe in https://github.com/marianoguerra/couchdb-for-openshift 

Steps to Reproduce:
1. rhc create-app -a couchdb -t diy-0.1
2. cd couchdb
3. git remote add couchdb-for-openshift -m master git://github.com/marianoguerra/couchdb-for-openshift.git
4. git pull -s recursive -X theirs couchdb-for-openshift master
5. git push

Actual results:

(...) remote: An error occurred executing 'gear postreceive' (exit code: -1) remote: Error message: Shell command '/var/lib/openshift/51ebbd465973ca751c000c74/app-root/runtime/repo/.openshift/action_hooks/build' exceeded timeout of 3343 remote: remote: For more details about the problem, try running the command again with the '--trace' option. To ssh://51ebbd465973ca751c000c74@XXXXXX.rhcloud.com/~/git/bugs.git/ a277a54..0dd969d master -> master

Expected results:

CouchDB Installed: http://appname-$yournamespace.rhcloud.com/_utils

Additional info:
Comment 1 Hiro Asari 2013-07-25 12:03:18 EDT
Do you know if this quickstart ever worked without timing out? We now have a timeout of 3600 seconds on shell command execution. Increasing the timeout may solve the problem, but doing so could affect other gears sharing the node. (I do not believe that the timeout can be altered by the quickstart.)

This quickstart downloads (in pre-build) and compiles (in build) from source many software packages, which is the problem.

The pre-build hook downloads the archives on EVERY code push. Downloading time eats into the time allocated for deployment. You *could* add the archive to the git repo, but that would add bloat to the repo itself. 

You *may* be able to break the process into pieces; for example, on the first 'git push', download and build ICU. On the next push, download and build spidermonkey, and so on. This may work, if no single step exceeds the timeout, but there is no guarantee. (I am particularly concerned with downloading and compiling Erlang.)

Ideally, Erlang and CouchDB should be supported cartridges, but I do not think it is on our radar. I advise you to propose it at https://www.openshift.com/ideas.
Comment 2 Hiro Asari 2013-07-25 12:20:32 EDT
As a benchmark, I tried using this quickstart (without any alteration) on a development image with nothing else on it. It was able to complete deployment (but barely-—maybe in 58 minutes).
Comment 3 David Perrales 2013-07-25 13:54:36 EDT
You are right. There are a lot steps and is too long process. I will try to resolve this problem finding an alternative solution. 

We finished our private openshift installation. I will change timeout value in a node and try to install this quickstart. After that is simple to upload the result to another repo or use gear snapshot capability. 

Anyway thanks for your time.
Comment 4 Hiro Asari 2013-07-25 13:59:05 EDT

Just a thought... If you have control over the nodes that your gears run on, you could bypass a lot of the hassle by installing (manually or otherwise) couchdb package (which will install Erlang as a dependency).
Comment 5 David Perrales 2013-07-25 14:14:33 EDT
That is a good idea but the final objective is deploy this gear into the public paas. I need to resolve this issue in a different way.
Comment 6 matzew 2013-10-24 16:36:47 EDT
Getting the 

remote: Error message: Shell command '/var/lib/openshift/526975de50044650db0000e8/app-root/runtime/repo/.openshift/action_hooks/build' exceeded timeout of 3419

Error as well :-(
Comment 7 Hiro Asari 2013-10-24 17:16:58 EDT
The current process to make CouchDB (via an action hook) is too time-consuming. We will need a real cartridge that installs the 'couchdb' RPM package. Looks like we have version 1.0.4 available in the repository.

I created https://trello.com/c/Iid6N299/322-create-a-couchdb-cartridge which will be prioritized and triaged in due time.

Note You need to log in before you can comment on or make changes to this bug.