Bug 1044312

Summary: Drush command site-install needs a higher bootstrap level to run in Zend-6.1 for drupal quickstart
Product: OpenShift Online Reporter: Wei Sun <wsun>
Component: TemplatesAssignee: Ben Parees <bparees>
Status: CLOSED WONTFIX QA Contact: libra bugs <libra-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.xCC: akostadi, bparees, dmcphers, hripps, xiuwang
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: 2015-06-11 21:52:34 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:

Description Wei Sun 2013-12-18 05:07:53 UTC
Description of problem:
Try to create drupal quickstart with zend-6.1 cartridge,but it failed.Some error messages are shown:
Drush command terminated abnormally due to an unrecoverable error.   [error]
Error: Call to undefined function ctype_alnum() in
/var/lib/openshift/52b11abc49d56d4711000028/app-root/runtime/dependencies/zend/phplib/pear/pear/php/drush/includes/command.inc,
line 896
ERROR: Unable download and install Drupal.
An error occurred executing 'gear postreceive' (exit code: 7)

It works for php-5.3 cartridge and zend-5.6 cartridge.
Version-Release number of selected component (if applicable):
https://github.com/openshift/drupal-quickstart
devenv_4148

How reproducible:
Always

Steps to Reproduce:
1.Create a drupal quickstart with zend-6.1 and mysql-5.1
2.Create a drupal quickstart with zend-6.1 and mysql-5.5
3.

Actual results:
[wsun@dhcp-8-229 test]$ rhc app create drupal6 zend-6.1 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:      wsundev4148
Cartridges:  zend-6.1, mysql-5.1, cron-1.4
Source Code: git://github.com/openshift/drupal-quickstart.git
Gear Size:   default
Scaling:     no

Creating application 'drupal6' ... 
The initial build for the application failed: Shell command '/sbin/runuser -s /bin/sh 52b11a1949d56d4711000009 -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 Zend Server daemon
zsd is not running
Stopping Zend Server JobQueue daemon
jqd is not running
Stopping Zend Server Deployment daemon
zdd is not running
Stopping Zend Server Java Bridge daemon
java_daemon is not running
Stopping Zend Server Console

lighttpd is not running
Stopping Apache
Syntax error on line 2 of /var/lib/openshift/52b11a1949d56d4711000009/zend/configuration/etc/conf.d/openshift.conf:
DocumentRoot must be a directory
httpd (no pid file) not running
Stopping Zend Server Monitor node
monitor is not running
Stopping MySQL cartridge
Repairing links for 1 deployments
Building git ref 'master', commit 8b529ba
Checking pear: pear.drush.org/drush

Attempting to discover channel "pear.drush.org"...
downloading channel.xml ...
Starting to download channel.xml (804 bytes)
....done: 804 bytes
Auto-discovered channel "pear.drush.org", alias "drush", adding to registry
downloading drush-6.2.0.0.tgz ...
Starting to download drush-6.2.0.0.tgz (505,989 bytes)
...done: 505,989 bytes
install ok: channel://pear.drush.org/drush-6.2.0.0

Download and install the latest stable version of Drupal

Drush command terminated abnormally due to an unrecoverable error.   [error]
Error: Call to undefined function ctype_alnum() in
/var/lib/openshift/52b11a1949d56d4711000009/app-root/runtime/dependencies/zend/phplib/pear/pear/php/drush/includes/command.inc,
line 896
ERROR: Unable download and install Drupal.
An error occurred executing 'gear postreceive' (exit code: 7)
Error message: Failed to execute action hook 'build' for 52b11a1949d56d4711000009 application drupal6

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


Expected results:
Could create drupal quickstart with zend-6.1 cartridge

Additional info:

Comment 1 Wei Sun 2014-02-10 12:30:40 UTC
Tested this bug on devenv_4352,still could not create drupal quick start with zend-6.1 cartridge

Comment 2 Vojtech Vitek 2014-08-05 12:37:59 UTC
@Wei Sun, I believe the description/cause of this error is wrong. The ctype extension is actually enabled in zend-6.1 gears.

> $ php -i | grep ctype
> /var/lib/openshift/53e1012facda962ee400001b/zend/php-5.4/etc/conf.d/ctype.ini,
> ctype
> ctype functions => enabled

> $ rhc ssh zend61
> $ php -r 'ctype_alnum("test") OR die("horribly");'; echo $?
> 0

Comment 3 Vojtech Vitek 2014-08-05 12:38:29 UTC
In case you still can't create a Drupal Quickstart app on zend-6.1, could you please find out the cause and update this bug (or close this bz and submit a new one) accordingly?

Comment 4 XiuJuan Wang 2014-08-06 02:29:53 UTC
(In reply to Vojtech Vitek from comment #3)

The cause has changed as following, will update the bz title.

# rhc app create drupal6 zend-6.1 mysql-5.1 cron --from-code=git://github.com/openshift/drupal-quickstart.git  
The server 'localhost' is not configured. Please run 'rhc setup'.
Using cron-1.4 (Cron 1.4) for 'cron'

Application Options
-------------------
Domain:      test
Cartridges:  zend-6.1, mysql-5.1, cron-1.4
Source Code: git://github.com/openshift/drupal-quickstart.git
Gear Size:   default
Scaling:     no

Creating application 'drupal6' ... 
The initial build for the application failed: Shell command '/sbin/runuser -s /bin/sh
53e1c940041d02925b000001 -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 Zend Server daemon
zsd is not running
Stopping Zend Server JobQueue daemon
jqd is not running
Stopping Zend Server Deployment daemon
zdd is not running
Stopping Zend Server Java Bridge daemon
java_daemon is not running
Stopping Zend Server Console

lighttpd is not running
Stopping Apache
Syntax error on line 2 of
/var/lib/openshift/53e1c940041d02925b000001/zend/configuration/etc/conf.d/openshift.conf:
DocumentRoot must be a directory
httpd (no pid file) not running
Stopping Zend Server Monitor node
monitor is not running
Stopping MySQL 5.1 cartridge
Repairing links for 1 deployments
Building git ref 'master', commit 7940959
Checking pear: pear.drush.org/drush

Attempting to discover channel "pear.drush.org"...
downloading channel.xml ...
Starting to download channel.xml (804 bytes)
....done: 804 bytes
Auto-discovered channel "pear.drush.org", alias "drush", adding to registry
downloading drush-6.2.0.0.tgz ...
Starting to download drush-6.2.0.0.tgz (505,989 bytes)
...done: 505,989 bytes
install ok: channel://pear.drush.org/drush-6.2.0.0

Download and install the latest stable version of Drupal

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

patching file /var/lib/openshift/53e1c940041d02925b000001/app-root/data/downloads/drupal-7.30/.htaccess
Drupal installed to /var/lib/openshift/53e1c940041d02925b000001/app-root/data/downloads/drupal-7.30

Preparing build for deployment
Deployment id is c623cb81
Activating deployment
Starting Cron cartridge
Starting MySQL 5.1 cartridge
/var/lib/openshift/53e1c940041d02925b000001/app-root/runtime/repo/php
/var/lib/openshift/53e1c940041d02925b000001

Creating a new Drupal site at /var/lib/openshift/53e1c940041d02925b000001/app-root/data/sites/default

Command site-install needs a higher bootstrap level to run - you will    [error]
need to invoke drush from a more functional Drupal environment to run
this command.
The drush command 'site-install standard' could not be executed.         [error]
The directory php does not contain a valid Drupal installation           [error]
Unable to configure your Drupal installation

-------------------------
Git Post-Receive Result: failure
Activation status: failure
Activation failed for the following gears:
53e1c940041d02925b000001 (Error activating gear: CLIENT_ERROR: Failed to execute action hook 'deploy' for
53e1c940041d02925b000001 application drupal6)
Deployment completed with status: failure
postreceive failed

Comment 5 Aleksandar Kostadinov 2014-08-11 16:54:57 UTC
is this same as bug 1126388?

Comment 6 Vojtech Vitek 2014-08-11 18:48:44 UTC
@Aleksandar probably not.