Bug 827281 - Application Template creates broken apps...
Application Template creates broken apps...
Status: CLOSED CURRENTRELEASE
Product: OpenShift Origin
Classification: Red Hat
Component: Containers (Show other bugs)
2.x
Unspecified Unspecified
high Severity high
: ---
: ---
Assigned To: Krishna Raman
libra bugs
: Triaged
: 827322 827329 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-05-31 22:51 EDT by Thomas Wiest
Modified: 2015-05-14 18:54 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-06-08 13:58:55 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Thomas Wiest 2012-05-31 22:51:36 EDT
Description of problem:
When you create an application from the website using the application templates, the created application doesn't work.

I tried to create applications from the following templates:
* drupal
* wordpress
* ruby on rails

All the created apps were broken.


Version-Release number of selected component (if applicable):
rhc-node-0.93.13-1.el6_2.x86_64


How reproducible:
very


Steps to Reproduce:
1. Go to the integration environment website
2. Create an application based on a template
3. Notice that the resulting app is broken

  
Actual results:
drupal:
Notice: Undefined index: OPENSHIFT_DB_USERNAME in include_once() (line 186 of /var/lib/stickshift/5599331bd62a4b8ab72ba444763cc586/app-root/runtime/repo/php/sites/default/settings.php).
Notice: Undefined index: OPENSHIFT_DB_PASSWORD in include_once() (line 187 of /var/lib/stickshift/5599331bd62a4b8ab72ba444763cc586/app-root/runtime/repo/php/sites/default/settings.php).
Notice: Undefined index: OPENSHIFT_DB_HOST in include_once() (line 188 of /var/lib/stickshift/5599331bd62a4b8ab72ba444763cc586/app-root/runtime/repo/php/sites/default/settings.php).
Notice: Undefined index: OPENSHIFT_DB_PORT in include_once() (line 189 of /var/lib/stickshift/5599331bd62a4b8ab72ba444763cc586/app-root/runtime/repo/php/sites/default/settings.php).
PDOException: SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in lock_may_be_available() (line 164 of /var/lib/stickshift/5599331bd62a4b8ab72ba444763cc586/app-root/runtime/repo/php/includes/lock.inc).


WordPress:
Error establishing a database connection


Ruby On Rails:
Service Temporarily Unavailable


Expected results:
All apps should work the same way that they do when you manually go through the quickstart creation from the github quickstarts.
Comment 1 Thomas Wiest 2012-05-31 23:03:46 EDT
The Ruby On Rails app finally deployed successfully (it took a long time).

So disregard that one in the description above.
Comment 2 Thomas Wiest 2012-06-01 01:03:20 EDT
To be clear, I can manually connect to the drupal app's mysql instance, but when I look in the DB, I don't see any drupal tables:

mysql>   show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| druptst2           |
| mysql              |
+--------------------+
3 rows in set (0.00 sec)

mysql>   use druptst2
Database changed
mysql>   show tables;
Empty set (0.00 sec)

mysql>
Comment 3 Thomas Wiest 2012-06-01 01:14:08 EDT
Kraman had me stop and start the drupal app which got past the initial error, but now we get this error:

Uncaught exception thrown in shutdown function.
PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'druptst2.semaphore' doesn't exist: DELETE FROM {semaphore} WHERE (value = :db_condition_placeholder_0) ; Array ( [:db_condition_placeholder_0] => 17226333334fc84f0aec45a2.32926404 ) in lock_release_all() (line 266 of /var/lib/stickshift/5599331bd62a4b8ab72ba444763cc586/app-root/runtime/repo/php/includes/lock.inc).


This error is almost certainly because the drupal tables haven't been deployed to the DB (see comment 2).
Comment 4 Xiaoli Tian 2012-06-01 04:18:37 EDT
*** Bug 827322 has been marked as a duplicate of this bug. ***
Comment 5 Adam Miller 2012-06-01 10:48:44 EDT
*** Bug 827329 has been marked as a duplicate of this bug. ***
Comment 6 Fotios Lindiakos 2012-06-01 15:47:44 EDT
Based on kraman's fixes to the quickstarts, applications should deploy successfully. Waiting for his pull requests to be accepted. 

This is no longer a blocker, since we know the fixes are on the quickstart side. If there are more problems, no changes would need to be made to the broker/packages.
Comment 7 Fotios Lindiakos 2012-06-01 17:38:06 EDT
Verified all 4 templates work now that kraman's changed have been pulled into the quickstart master repositories. 

Please note that when testing Rails, it will return a "503: Service Temporarily Unavailable" until the gems are installed and the server comes back up (usually take about 8 minutes). This is expected, although we are looking into the cause and a solution.
Comment 8 Yujie Zhang 2012-06-04 03:03:34 EDT
Tested 4 kind if template app on stage, they are all working now, so verify this bug.

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