Bug 987750

Summary: Exceeded timeout installing CouchDB
Product: OpenShift Online Reporter: David Perrales <perales>
Component: ContainersAssignee: Hiro Asari <hasari>
Status: CLOSED UPSTREAM QA Contact: libra bugs <libra-bugs>
Severity: high Docs Contact:
Priority: unspecified    
Version: 1.xCC: hasari, jkeck, matzew, perales
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-07-25 17:54:36 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description David Perrales 2013-07-24 05:36:42 UTC
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.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 16:03:18 UTC
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 16:20:32 UTC
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 17:54:36 UTC
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 17:59:05 UTC
David,

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 18:14:33 UTC
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 20:36:47 UTC
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 21:16:58 UTC
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.