Bug 1006566 - Drupal quickstart no longer works after devenv 3769
Drupal quickstart no longer works after devenv 3769
Status: CLOSED CURRENTRELEASE
Product: OpenShift Online
Classification: Red Hat
Component: Containers (Show other bugs)
2.x
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Vojtech Vitek
libra bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-09-10 16:20 EDT by Wesley Hearn
Modified: 2015-05-14 19:28 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-09-19 12:50:42 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 Wesley Hearn 2013-09-10 16:20:25 EDT
Description of problem:
After devenv 3769 I am unable to create a drupal application using the quickstart

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

How reproducible:
Always

Steps to Reproduce:
1. rhc app create drupal php-5.3 -k mysql-5 cron --from-code=https://github.com/openshift/drupal-quickstart.git -l $user -p $pass
2. wait
3. watch it fail

Actual results:
[04:10 PM] 
[130]whearn@deadbox:~ $ rhc app create drupal php-5.3 -k mysql-5 cron --from-code=https://github.com/openshift/drupal-quickstart.git -l $user -p $pass
Using mysql-5.1 (MySQL Database 5.1) for 'mysql-5'
Using cron-1.4 (Cron 1.4) for 'cron'

Application Options
-------------------
  Namespace:   whearn
  Cartridges:  php-5.3, mysql-5.1, cron-1.4
  Source Code: https://github.com/openshift/drupal-quickstart.git
  Gear Size:   default
  Scaling:     no

Creating application 'drupal' ... 
The initial build for the application failed: Shell command '/sbin/runuser -s /bin/sh 522f7cc203ef643995000382 -c "exec /usr/bin/runcon              
'unconfined_u:system_r:openshift_t:s0:c6,c539' /bin/sh -c \"gear postreceive >> /tmp/initial-build.log 2>&1\""' returned an error. rc=255         
                                                                                                                                               
.Last 10 kB of build output:                                                                                                                  
Stopping MySQL cartridge                                                                                                                     
Stopping PHP cartridge                                                                                                                      
Syntax error on line 2 of /var/lib/openshift/522f7cc203ef643995000382/php/configuration/etc/conf.d/openshift.conf:
DocumentRoot must be a directory
httpd (no pid file) not running
Stopping Cron cartridge

ln: creating symbolic link `./drush': Permission denied
An error occurred executing 'gear postreceive' (exit code: 1)
Error message: Failed to execute action hook 'build' for 522f7cc203ef643995000382 application drupal

For more details about the problem, try running the command again with the '--trace' option.


Expected results:
The application to be correctly created

Additional info:
Comment 1 Wesley Hearn 2013-09-10 17:20:05 EDT
Also it seems previously created drupal apps after being upgraded now error when you go to them with

"PDOException: SQLSTATE[42000]: Syntax error or access violation: 1286 Unknown table engine 'InnoDB': SELECT expire, value FROM {semaphore} WHERE name = :name; Array ( [:name] => variable_init ) in lock_may_be_available() (line 167 of /var/lib/openshift/522e2bbf03ef645b04000148/app-root/data/downloads/drupal-7.23/includes/lock.inc)."
Comment 2 Yujie Zhang 2013-09-10 22:39:37 EDT
Tested on INT(devenv_3769), the drupal application can be created successfully from website and using rhc "rhc app create drupal45634 php-5.3 mysql-5 --from-code=https://github.com/openshift/drupal-quickstart.git", but I can reproduce your bug if adding cron cartridge when creating drupal application using "rhc app create drupal45634 php-5.3 mysql-5 cron --from-code=https://github.com/openshift/drupal-quickstart.git".
Comment 3 Vojtech Vitek 2013-09-11 10:08:49 EDT
@Wesley Hearn: Comment 1 doesn't seem related to the
> ln: creating symbolic link `./drush': Permission denied
error. It's rather a Drupal-MySQL locking issue.
Comment 4 Vojtech Vitek 2013-09-11 11:15:00 EDT
> ln: creating symbolic link `./drush': Permission denied
https://github.com/openshift/drupal-quickstart/blob/master/.openshift/action_hooks/build#L30

Unfortunately, I couldn't reproduce the issue even with the second command from Comment 2.

> rhc app create drupal45634 php-5.3 mysql-5 cron --from-code=https://github.com/openshift/drupal-quickstart.git
> Using mysql-5.1 (MySQL Database 5.1) for 'mysql-5'
> Using cron-1.4 (Cron 1.4) for 'cron'
> 
> Application Options
> -------------------
>   Namespace:   vvitek
>   Cartridges:  php-5.3, mysql-5.1, cron-1.4
>   Source Code: https://github.com/openshift/drupal-quickstart.git
>   Gear Size:   default
>   Scaling:     no
> 
> Creating application 'drupal45634' ... done
> 
> ...
> 
> Waiting for your DNS name to be available ... done
Comment 5 Vojtech Vitek 2013-09-11 11:19:41 EDT
However, the
> ln: creating symbolic link `./drush': Permission denied
error will definitely go out when we merge the subsequent Drupal Quickstart changes related to https://trello.com/c/Wvww2mJd Trello card. I will send a Pull Request link here once it's ready.
Comment 7 Vojtech Vitek 2013-09-11 11:32:56 EDT
The Drupal Quickstart PR (see comment 6) would fix the issue eventually once it gets merged - but it can be done no earlier than in a week or two, as stated at https://github.com/openshift/drupal-quickstart/pull/5#issuecomment-23022637.

However it doesn't fix the original cause of this bug described in comment 0. I couldn't figure out it yet nor I was able to reproduce the issue.
Comment 8 Vojtech Vitek 2013-09-11 11:34:29 EDT
@Yujie Zhang, can you please retest again and paste here the error log as well?
Comment 9 Vojtech Vitek 2013-09-11 11:38:33 EDT
Could you also test against https://github.com/VojtechVitek/drupal-quickstart#drush_path ?
Comment 10 Vojtech Vitek 2013-09-11 15:05:34 EDT
rhc app create drupal php-5.3 mysql-5 cron --from-code=git://github.com/VojtechVitek/drupal-quickstart.git#drush_path
> Creating application 'drupal' ... done
>
> Waiting for your DNS name to be available ... done
>
> Cloning into 'drupal'...
> Your application 'drupal' is now available.

Confirmed. The https://github.com/openshift/drupal-quickstart/pull/5 PR fixes this issue.
Comment 11 Thomas Wiest 2013-09-11 17:08:10 EDT
Vojtech Vitek, can we make this PR backwards compatible so that we can push it now instead of having to wait for the latest code to go to PROD?

We use this quickstart as part of our monitoring of our deploy process, so we need it to work both before _and_ after the upgrade with the same quickstart (we create apps using it both before and after the upgrade to test the deploy).
Comment 12 Yujie Zhang 2013-09-11 23:18:34 EDT
Tested on devenv_3776, using https://github.com/VojtechVitek/drupal-quickstart#drush_path repo, it can be created successfully, result is as following:

[root@dhcp-8-252 features]# rhc app create drupal23 php-5.3 mysql-5 cron --from-code=https://github.com/VojtechVitek/drupal-quickstart#drush_path -l yujzhang+int999@redhat.com -p redhat --server ec2-23-20-136-97.compute-1.amazonaws.com
Using mysql-5.1 (MySQL Database 5.1) for 'mysql-5'
Using cron-1.4 (Cron 1.4) for 'cron'

Application Options
-------------------
  Namespace:   sss
  Cartridges:  php-5.3, mysql-5.1, cron-1.4
  Source Code: https://github.com/VojtechVitek/drupal-quickstart#drush_path
  Gear Size:   default
  Scaling:     no

Creating application 'drupal23' ... done

  To schedule your scripts to run on a periodic basis, add the scripts to 
your application's .openshift/cron/{minutely,hourly,daily,weekly,monthly}/
directories (and commit and redeploy your application).

Example: A script .openshift/cron/hourly/crony added to your application
         will be executed once every hour.
         Similarly, a script .openshift/cron/weekly/chronograph added
         to your application will be executed once every week.


MySQL 5.1 database added.  Please make note of these credentials:

       Root User: adminXnWSyAS
   Root Password: pKCtIDiNRZmh
   Database Name: drupal23

Connection URL: mysql://$OPENSHIFT_MYSQL_DB_HOST:$OPENSHIFT_MYSQL_DB_PORT/

You can manage your new MySQL database by also embedding phpmyadmin.
The phpmyadmin username and password will be the same as the MySQL credentials above.

Your public SSH key must be uploaded to the OpenShift server to access code.  Upload now? (yes|no) yes

Since you do not have any keys associated with your OpenShift account, your new key will be uploaded as the 'default' key.

Uploading key 'default' ... done

Waiting for your DNS name to be available ... done

Cloning into 'drupal23'...
The authenticity of host 'drupal23-sss.dev.rhcloud.com (23.20.136.97)' can't be established.
RSA key fingerprint is f7:06:29:25:42:48:3c:22:ab:30:fd:a5:98:fe:f8:34.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'drupal23-sss.dev.rhcloud.com' (RSA) to the list of known hosts.

Your application 'drupal23' is now available.

  URL:        http://drupal23-sss.dev.rhcloud.com/
  SSH to:     523130dfc09c4f3870000042@drupal23-sss.dev.rhcloud.com
  Git remote: ssh://523130dfc09c4f3870000042@drupal23-sss.dev.rhcloud.com/~/git/drupal23.git/
  Cloned to:  /home/webauto/features/drupal23

Run 'rhc show-app drupal23' for more details about your app.

So verify this bug.
Comment 13 Vojtech Vitek 2013-09-12 10:13:48 EDT
@Thomas Wiest, I will try to investigate this but I'm not sure that'd be possible. Will get back to you shortly.
Comment 21 Vojtech Vitek 2013-09-16 13:24:12 EDT
@Thomas Wiest, @Michal Fojtik: FYI, I created bug 1008609 for the cron issue.

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