Bug 1034583

Summary: Fail to add Jenkins client to zend-6.1 apps
Product: OpenShift Online Reporter: Zhe Wang <zhewang>
Component: ImageAssignee: Vojtech Vitek <vvitek>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: high Docs Contact:
Priority: high    
Version: 2.xCC: hripps, mfojtik, xtian
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: 2014-01-30 00:50:57 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 Zhe Wang 2013-11-26 07:15:59 UTC
Description of problem:
It always fails to add a jenkins-client to a zend-6.1 app

Version-Release number of selected component (if applicable):
vvitek-Zend-QE-preserve

How reproducible:
always

Steps to Reproduce:
1. create a zend-6.1 app
2. add a jenkins-client to this app

Actual results:
Adding a jenkins-client to the zend-6.1 app always fails with the errors below:

Adding jenkins-client-1 to application 'zend61' ... 

Could not add job 'zend61-build' in Jenkins server:
   create_job status: 
build config does not exist
You'll need to correct this error before attempting to embed the Jenkins client again.


Expected results:
Adding a Jenkins-client to a zend-6.1 app should be successful.

Additional info:

Comment 1 Michal Fojtik 2013-12-02 14:24:17 UTC
After some initial investigation I found that this might be an SSL certification error:

If I remove the '-s/--silent' option from the curl to make it more verbose, I get this output in logs:


   * About to connect() to jenkins-mfojtik.dev.rhcloud.com port 443 (#0)
*   Trying 10.181.144.137...   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0connected
* Connected to jenkins-mfojtik.dev.rhcloud.com (10.181.144.137) port 443 (#0)
* successfully set certificate verify locations:
*   CAfile: /etc/pki/tls/certs/ca-bundle.crt
  CApath: none
* SSLv3, TLS handshake, Client hello (1):
} [data not shown]
* error:14077458:SSL routines:SSL23_GET_SERVER_HELLO:reason(1112)
* Closing connection #0
curl: (35) error:14077458:SSL routines:SSL23_GET_SERVER_HELLO:reason(1112)
DEBUG: pid 21040 exit 35

Comment 2 Michal Fojtik 2013-12-02 14:49:47 UTC
Googling reveal the solution:

http://carnivore.it/2011/10/07/error_14077458_ssl_routines_ssl23_get_server_hello_reason_1112

So adding '-ssl3' into all curl commands fixed the problem. PR on the way.

Also I dunno what this breaks just for Zend 6.1 or it breaks for the other carts as well (it should ;-) Zhe Wang, could you please confirm that this bug is Zend-6.1 only?

Comment 3 Michal Fojtik 2013-12-02 15:24:39 UTC
So I tested this on Ruby cart and the jenkins-client works fine without -ssl3 option...

Comment 8 Vojtech Vitek 2013-12-06 18:02:09 UTC
Commit pushed to master at https://github.com/openshift/li

https://github.com/openshift/li/commit/42890fc9ab68af211d9f394f694d72d27b883612
fix secondary carts failures due to zend-6.1 LD_LIBRARY_PATH

This is rather workaround fix for:

  Bug 1034552 - Postgresql-9.2 can not be added to zend-6.1 applications
  https://bugzilla.redhat.com/show_bug.cgi?id=1034552

  Bug 1034583 - Fail to add Jenkins client to zend-6.1 apps
  https://bugzilla.redhat.com/show_bug.cgi?id=1034583

until we implement "Handle multiple catridges having their
own LD_LIBRARY_PATH" feature request. https://trello.com/c/BB2errnd

Comment 9 Zhe Wang 2013-12-09 02:33:33 UTC
Verify this bug in devenv-stage_604:

[zhe@fedora runs]$ rhc app-create zend61 zend-6.1 --enable-jenkins
Application Options
-------------------
  Domain:     stg604tst
  Cartridges: zend-6.1
  Gear Size:  default
  Scaling:    no

Creating application 'zend61' ... done

  Failed to start Zend Server Deployment daemon
  Note: You should set password for the Zend Server Console at: https://zend61-stg604tst.dev.rhcloud.com/ZendServer
Zend Server 6 started successfully

Setting up a Jenkins application ... done

  Jenkins created successfully.  Please make note of these credentials:

   User: admin
   Password: AdJ6-Dusdiky

Note:  You can change your password at: https://jenkins-stg604tst.dev.rhcloud.com/me/configure

Setting up Jenkins build ... done

  Associated with job 'zend61-build' in Jenkins server.

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

Cloning into 'zend61'...
The authenticity of host 'zend61-stg604tst.dev.rhcloud.com (54.204.180.76)' can't be established.
RSA key fingerprint is 9a:10:0a:fa:fd:04:81:96:c7:7b:f5:40:cb:01:26:0b.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'zend61-stg604tst.dev.rhcloud.com,54.204.180.76' (RSA) to the list of known hosts.

Your application 'zend61' is now available.

  URL:        http://zend61-stg604tst.dev.rhcloud.com/
  SSH to:     52a52b19a3803157a7000250.rhcloud.com
  Git remote: ssh://52a52b19a3803157a7000250.rhcloud.com/~/git/zend61.git/
  Cloned to:  /home/zhe/redhat/runs/zend61

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