Bug 1308720 - Unable to deploy Drupal
Unable to deploy Drupal
Status: CLOSED ERRATA
Product: OpenShift Container Platform
Classification: Red Hat
Component: Image (Show other bugs)
2.2.0
Unspecified Unspecified
high Severity high
: ---
: ---
Assigned To: Vu Dinh
Gaoyun Pei
:
Depends On: 1291905
Blocks:
  Show dependency treegraph
 
Reported: 2016-02-15 16:04 EST by Vu Dinh
Modified: 2016-03-22 12:54 EDT (History)
7 users (show)

See Also:
Fixed In Version: openshift-origin-cartridge-php-1.35.3.1-1.el6op
Doc Type: Bug Fix
Doc Text:
Cause: The Drush component of Drupal application can't be installed via PEAR anymore. Consequence: The Drupal application fails during installation process as Drush can't be installed. Fix: The PEAR package is removed and Drush is now installed via composer instead. Result: The Drupal application is installed successfully after Drush is installed via composer correctly.
Story Points: ---
Clone Of: 1291905
Environment:
Last Closed: 2016-03-22 12:54:41 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 Vu Dinh 2016-02-15 16:04:00 EST
+++ This bug was initially created as a clone of Bug #1291905 +++

Description of problem:
Unable to deploy Drupal application using drupal-quickstart due to Drush installation failure

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


How reproducible:
Create an Drupal application using drupal-quickstar from github.

Steps to Reproduce:
1. rhc app create drupal php-5.3 mysql-5.1 cron --from-code=git://github.com/openshift/drupal-quickstart.git
2.
3.

Actual results:
Output shows Drush cannot be installed via PEAR:

Creating application 'drupal' ... 
The initial build for the application failed: Shell command '/sbin/runuser -s /bin/sh 56707b294e70736a2d00002e -c "exec /usr/bin/runcon 'unconfined_u:system_r:openshift_t:s0:c0,c1000' /bin/sh -c \"gear
postreceive --init >> /tmp/initial-build.log 2>&1\""' returned an error. rc=255

.Last 10 kB of build output:
Stopping Cron cartridge
Stopping MySQL 5.1 cartridge
Stopping PHP 5.3 cartridge (Apache+mod_php)
Repairing links for 1 deployments
Building git ref 'master', commit 828f03d
Checking .openshift/pear.txt for PEAR dependency...
Checking PEAR: pear.drush.org/drush

Attempting to discover channel "pear.drush.org"...
Attempting fallback to https instead of http on channel "pear.drush.org"...
unknown channel "pear.drush.org" in "pear.drush.org/drush"
invalid package name/package file "pear.drush.org/drush"
install failed
An error occurred executing 'gear postreceive' (exit code: 1)
Error message: CLIENT_ERROR: Failed to execute: 'control build' for /var/lib/openshift/56707b294e70736a2d00002e/php

Expected results:
Application should have been created successfully.


Additional info:
This issue is due to PEAR installation for Drush is no longer supported. Here is the link to the issue: https://github.com/openshift/drupal-quickstart/issues/31

--- Additional comment from Vu Dinh on 2015-12-15 15:52:10 EST ---

https://github.com/openshift/origin-server/pull/6339
https://github.com/openshift/drupal-quickstart/pull/33

--- Additional comment from XiuJuan Wang on 2016-01-11 21:59:46 EST ---

Works for drupal with php-5.3&mysql-5.1 and php-5.4&mysql-5.5 in devenv-5753

Counting objects: 3, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (2/2), 251 bytes, done.
Total 2 (delta 1), reused 0 (delta 0)
remote: Stopping Cron cartridge
remote: Stopping MySQL 5.5 cartridge
remote: Stopping PHP 5.4 cartridge (Apache+mod_php)
remote: Waiting for stop to finish
remote: Waiting for stop to finish
remote: Waiting for stop to finish
remote: Building git ref 'master', commit 936f098
remote: Checking .openshift/pear.txt for PEAR dependency...
remote: Checking composer.json for Composer dependency... 
remote: Warning: This development build of composer is over 30 days old. It is recommended to update it by running "/var/lib/openshift/569469ec5f37571955000026/php/usr/bin/composer self-update" to get the latest version.
remote: Loading composer repositories with package information
remote: Installing dependencies (including require-dev)
remote:   - Installing pear/console_table (1.2.1)
remote:     Loading from cache
remote: 
remote:   - Installing symfony/polyfill-mbstring (v1.0.1)
remote:     Loading from cache
remote: 
remote:   - Installing symfony/var-dumper (v2.8.1)
remote:     Loading from cache
remote: 
remote:   - Installing symfony/yaml (v2.8.1)
remote:     Loading from cache
remote: 
remote:   - Installing d11wtq/boris (v1.0.10)
remote:     Loading from cache
remote: 
remote:   - Installing drush/drush (7.1.0)
remote:     Loading from cache
remote: 
remote: pear/console_table suggests installing pear/Console_Color2 (>=0.1.2)
remote: symfony/var-dumper suggests installing ext-symfony_debug ()
remote: Writing lock file
remote: Generating optimized autoload files
remote: 
remote: Drupal is already installed at /var/lib/openshift/569469ec5f37571955000026/app-root/data/downloads/drupal-7.41
remote: 
remote: Preparing build for deployment
remote: Deployment id is f9c584f9
remote: Activating deployment
remote: Starting Cron cartridge
remote: Starting MySQL 5.5 cartridge
remote: Drupal is already configured.  Delete settings.php to rerun setup
remote: 
remote: Starting PHP 5.4 cartridge (Apache+mod_php)
remote: Application directory "php/" selected as DocumentRoot
remote: -------------------------
remote: Git Post-Receive Result: success
remote: Activation status: success
remote: Deployment completed with status: success
To ssh://569469ec5f37571955000026@drupal54-xiuwang.dev.rhcloud.com/~/git/drupal54.git/
   8152ed0..936f098  master -> master
Comment 4 Gaoyun Pei 2016-02-26 05:17:43 EST
Test this bug with puddle 2.2/2016-02-25.2

Drupal still couldn't be created.

[root@broker ~]# rhc app create drupal php-5.3 mysql-5.1 cron --from-code=git://github.com/openshift/drupal-quickstart.git
Using cron-1.4 (Cron 1.4) for 'cron'

Application Options
-------------------
Domain:      anlidom
Cartridges:  php-5.3, mysql-5.1, cron-1.4
Source Code: git://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 56d024da6892dfd7df000001 -c "exec /usr/bin/runcon
'unconfined_u:system_r:openshift_t:s0:c3,c652' /bin/sh -c \"gear postreceive --init >> /tmp/initial-build.log 2>&1\""' returned an error. rc=255

.Last 10 kB of build output:
Stopping Cron cartridge
Stopping PHP 5.3 cartridge (Apache+mod_php)
Stopping MySQL 5.1 cartridge
Repairing links for 1 deployments
Building git ref 'master', commit 8152ed0
Checking .openshift/pear.txt for PEAR dependency...
Checking composer.json for Composer dependency... 
Warning: This development build of composer is over 30 days old. It is recommended to update it by running "/var/lib/openshift/56d024da6892dfd7df000001/php/usr/bin/composer
self-update" to get the latest version.
Loading composer repositories with package information
Installing dependencies (including require-dev)
  - Installing pear/console_table (v1.2.1)
    Downloading

  - Installing symfony/var-dumper (v2.6.13)
    Downloading

  - Installing symfony/yaml (v2.6.13)
    Downloading

  - Installing d11wtq/boris (v1.0.10)
    Downloading

  - Installing drush/drush (7.1.0)
    Downloading

pear/console_table suggests installing pear/Console_Color2 (>=0.1.2)
symfony/var-dumper suggests installing ext-symfony_debug ()
Writing lock file
Generating optimized autoload files

Download and install the latest stable version of Drupal

Project drupal (7.43) downloaded to                                    [success]
/var/lib/openshift/56d024da6892dfd7df000001/app-root/data/downloads/drupal-7.43.
Project drupal contains:                                               [success]
 - 3 profiles: standard, minimal, testing
 - 4 themes: garland, bartik, seven, stark
 - 47 modules: shortcut, aggregator, toolbar, forum, poll, syslog,
openid, comment, taxonomy, dashboard, overlay, image, simpletest,
profile, search, tracker, dblog, file, translation, locale, color,
book, system, php, trigger, update, contextual, menu, node, filter,
field_ui, block, statistics, blog, text, options, list, number,
field_sql_storage, field, help, path, user, contact, rdf,
drupal_system_listing_compatible_test,
drupal_system_listing_incompatible_test

patching file /var/lib/openshift/56d024da6892dfd7df000001/app-root/data/downloads/drupal-7.43/.htaccess
Hunk #1 FAILED at 4.
1 out of 1 hunk FAILED -- saving rejects to file /var/lib/openshift/56d024da6892dfd7df000001/app-root/data/downloads/drupal-7.43/.htaccess.rej
An error occurred executing 'gear postreceive' (exit code: 1)
Error message: CLIENT_ERROR: Failed to execute action hook 'build' for 56d024da6892dfd7df000001 application drupal

For more details about the problem, try running the command again with the '--trace' option.
Comment 5 Vu Dinh 2016-02-26 13:08:50 EST
There was an issue with the drupal-quickstart and it has been fixed now.

The bug is ready to be tested again :).

Thanks so much,
Vu
Comment 6 Gaoyun Pei 2016-02-28 22:48:22 EST
Test with the latest drupal quickstart, build successfully now.

[root@broker drupal]# git push
Counting objects: 221, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (119/119), done.
Writing objects: 100% (213/213), 39.38 KiB, done.
Total 213 (delta 92), reused 202 (delta 86)
remote: Stopping Cron cartridge
remote: Stopping MySQL 5.1 cartridge
remote: Stopping PHP 5.3 cartridge (Apache+mod_php)
remote: Waiting for stop to finish
remote: Waiting for stop to finish
remote: Waiting for stop to finish
remote: Building git ref 'master', commit 1808cc0
remote: Checking .openshift/pear.txt for PEAR dependency...
remote: Checking composer.json for Composer dependency...
remote: Warning: This development build of composer is over 30 days old. It is recommended to update it by running "/var/lib/openshift/yes-drupal-1/php/usr/bin/composer self-update" to get the latest version.
remote: Loading composer repositories with package information
remote: Installing dependencies (including require-dev)
remote:   - Installing pear/console_table (v1.2.1)
remote:     Downloading
remote:     Failed to download pear/console_table from dist: Could not authenticate against github.com
remote:     Now trying to download from source
remote:   - Installing pear/console_table (v1.2.1)
remote:     Cloning a129a91d8bf19317d81e68d1d3a2e18932f684e4
remote:
remote:   - Installing symfony/var-dumper (v2.6.13)
remote:     Downloading
remote:     Failed to download symfony/var-dumper from dist: Could not authenticate against github.com
remote:     Now trying to download from source
remote:   - Installing symfony/var-dumper (v2.6.13)
remote:     Cloning 5fba957a30161d8724aade093593cd22f815bea2
remote:
remote:   - Installing symfony/yaml (v2.6.13)
remote:     Downloading
remote:     Failed to download symfony/yaml from dist: Could not authenticate against github.com
remote:     Now trying to download from source
remote:   - Installing symfony/yaml (v2.6.13)
remote:     Cloning c044d1744b8e91aaaa0d9bac683ab87ec7cbf359
remote:
remote:   - Installing d11wtq/boris (v1.0.10)
remote:     Downloading
remote:     Failed to download d11wtq/boris from dist: Could not authenticate against github.com
remote:     Now trying to download from source
remote:   - Installing d11wtq/boris (v1.0.10)
remote:     Cloning 31055b15e2d3fe47f31f6aa8e277f8f3fc7eb483
remote:
remote:   - Installing drush/drush (7.1.0)
remote:     Downloading
remote:     Failed to download drush/drush from dist: Could not authenticate against github.com
remote:     Now trying to download from source
remote:   - Installing drush/drush (7.1.0)
remote:     Cloning 7e5e4b15e617ed77804d836a66229a70a67025c9
remote: pear/console_table suggests installing pear/Console_Color2 (>=0.1.2)
remote: symfony/var-dumper suggests installing ext-symfony_debug ()
remote: Writing lock file
remote: Generating optimized autoload files
remote: Download and install the latest stable version of Drupal
remote: Project drupal (7.43) downloaded to                                    [success]
remote: /var/lib/openshift/yes-drupal-1/app-root/data/downloads/drupal-7.43.
remote: Project drupal contains:                                               [success]
remote:  - 3 profiles: standard, minimal, testing
remote:  - 4 themes: garland, seven, bartik, stark
remote:  - 47 modules: shortcut, block, statistics, color, options, number,
remote: text, list, field_sql_storage, field, comment, syslog, image,
remote: trigger, php, rdf, contextual, node, update, dashboard, locale,
remote: forum, poll, system, filter, profile, field_ui, aggregator, tracker,
remote: path, taxonomy, help, contact, translation, toolbar, book, user,
remote: file, dblog, menu, openid, overlay, simpletest, search, blog,
remote: drupal_system_listing_incompatible_test,
remote: drupal_system_listing_compatible_test
remote:
remote: patching file /var/lib/openshift/yes-drupal-1/app-root/data/downloads/drupal-7.43/.htaccess
remote: Drupal installed to /var/lib/openshift/yes-drupal-1/app-root/data/downloads/drupal-7.43
remote:
remote: Preparing build for deployment
remote: Deployment id is 2552f263
remote: Activating deployment
remote: Starting Cron cartridge
remote: Starting MySQL 5.1 cartridge
remote: /var/lib/openshift/yes-drupal-1/app-root/runtime/repo/php /var/lib/openshift/yes-drupal-1
remote:
remote: Creating a new Drupal site at /var/lib/openshift/yes-drupal-1/app-root/data/sites/default
remote:
remote: You are about to create a /var/lib/openshift/yes-drupal-1/app-root/data/sites/default/settings.php file and DROP all tables in your 'drupal' database. Do you want to continue? (y/n): y
remote: Starting Drupal installation. This takes a while. Consider using the        [ok]
remote: --notify global option.
remote: Installation complete.  User name: admin  User password: kGAYqy56i2Xi       [ok]
remote: /var/lib/openshift/yes-drupal-1
remote:
remote: Drupal is now configured
remote:
remote: CLIENT_RESULT:
remote: CLIENT_RESULT: Drupal installed successfully.
remote: CLIENT_RESULT:
remote: CLIENT_RESULT:       Drupal admin login: admin
remote: CLIENT_RESULT:    Drupal admin password: kGAYqy56i2Xi
remote: CLIENT_RESULT:
remote: CLIENT_RESULT: Don't forget to change your drupal admin password!
remote:
remote: Starting PHP 5.3 cartridge (Apache+mod_php)
remote: Application directory "php/" selected as DocumentRoot
remote: -------------------------
remote: Git Post-Receive Result: success
remote: Activation status: success
remote: Deployment completed with status: success
To ssh://yes-drupal-1@drupal-yes.ose22-auto.com.cn/~/git/drupal.git/
   7e9e21e..1808cc0  master -> master
Comment 8 errata-xmlrpc 2016-03-22 12:54:41 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHSA-2016-0489.html

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