Bug 1176491

Summary: Users cannot create a PHP application without internet access due to pear channel-update
Product: OpenShift Container Platform Reporter: Kenjiro Nakayama <knakayam>
Component: ImageStreamsAssignee: Luke Meyer <lmeyer>
Status: CLOSED ERRATA QA Contact: libra bugs <libra-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.2.0CC: amedeo, bleanhar, cryan, gpei, jokerman, libra-onpremise-devel, lmeyer, mmccomas, tiwillia
Target Milestone: ---Keywords: Upstream
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: openshift-origin-cartridge-php-1.31.0.1-1 Doc Type: Bug Fix
Doc Text:
Cause: The PHP cartridge attempts to update PHP Pear channels on application deployment. Consequence: Nodes that cannot reach PHP Pear channels would fail to deploy PHP applications. Fix: PHP Pear channel updates are no longer treated as critical errors blocking deployment. Result: Nodes that cannot reach PHP Pear channels now deploy PHP applications.
Story Points: ---
Clone Of:
: 1176969 (view as bug list) Environment:
Last Closed: 2015-02-12 13:09:49 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:
Bug Depends On: 1176969    
Bug Blocks:    

Description Kenjiro Nakayama 2014-12-22 06:21:26 UTC
Description of problem:

With bz1094007, the line:

  php_context "pear -c ${OPENSHIFT_HOMEDIR}.pearrc channel-update pear.php.net"

is inserted to $OSE_SRC22/cartridges/openshift-origin-cartridge-php/bin/install. 

This means users have to connet internet. OSE user don't want to access internet.


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

OSE 2.2 


Additional info:

- OSE commmit
 5b7ea7711dfd2490b60e30efb2d5652ffa45c762

- Oirigin commit 
 https://github.com/openshift/origin-server/pull/5609

- bz1094007
 https://bugzilla.redhat.com/show_bug.cgi?id=1094007

Comment 2 Luke Meyer 2014-12-23 16:31:26 UTC
For most cartridges, it will be difficult to accomplish much without access to the internet for downloading dependencies.

Nonetheless, it does seem reasonable that this particular failure to reach the internet should not block app creation. The change for bug 1094007 was made in order to resolve a warning message; I expect we could just return to showing warning messages if the channel-update didn't work out.

Comment 9 Gaoyun Pei 2015-01-26 06:56:53 UTC
Verified this bug with openshift-origin-cartridge-php-1.31.0.1-1

Change pear.php.net to an invalid address in line 38 of /usr/libexec/openshift/cartridges/php/bin/install, and remove "|| true". 

Try to create a php app.
[root@broker ~]# rhc app create test2 php-5.4 -g medium
Application Options
-------------------
Domain:     123
Cartridges: php-5.4
...
config-set succeeded
Cannot open invalid.net
Unable to complete the requested operation due to: An invalid exit code (157) was returned from the server
node1.ose22-manual.com.cn.  This indicates an unexpected problem during the execution of your request.
Reference ID: 92ec332eef98c1acacf7472845f53042

Add "|| true" back to the file. 
php app could be created successfully.

Comment 11 errata-xmlrpc 2015-02-12 13:09:49 UTC
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/RHBA-2015-0220.html