Bug 841157 - Can't jenkins build successfully or add jenkins client to existing app after alter domain
Can't jenkins build successfully or add jenkins client to existing app after ...
Status: CLOSED CURRENTRELEASE
Product: OpenShift Origin
Classification: Red Hat
Component: Containers (Show other bugs)
2.x
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Bill DeCoste
libra bugs
: Regression, Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-07-18 06:00 EDT by Rony Gong
Modified: 2015-05-14 18:56 EDT (History)
2 users (show)

See Also:
Fixed In Version: ami-ebd87082
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-08-07 16:42:40 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 Rony Gong 2012-07-18 06:00:25 EDT
Description of problem:
Can't jenkins build success after alter domain. 
Before alter domain, I could jenkins build success.

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

How reproducible:
always


Steps to Reproduce:
1.Create app with optinons --enable-jenkins, the domain name is qgong11
2.Alter domain to qgong13
3.Then update new domain name in  app_repo/.git/config
4.Do some change, git commit and push
  
Actual results:
[root@F17x64-openshift qjbossas]# git push
Warning: Permanently added 'qjbossas-qgong13.dev.rhcloud.com' (RSA) to the list of known hosts.
Counting objects: 11, done.
Compressing objects: 100% (5/5), done.
Writing objects: 100% (6/6), 439 bytes, done.
Total 6 (delta 4), reused 0 (delta 0)
remote: Executing Jenkins build.
remote: 
remote: You can track your build at https://jenkins-qgong11.dev.rhcloud.com/job/qjbossas-build
remote: 
remote: ERROR - Job not available: http://jenkins-qgong11.dev.rhcloud.com/job/qjbossas-build
remote: !!!!!!!!
remote: Deployment Halted!
remote: If the build failed before the deploy step, your previous
remote: build is still running.  Otherwise, your application may be
remote: partially deployed or inaccessible.
remote: Fix the build and try again.
remote: !!!!!!!!
To ssh://ab8a50731442491ca7bc08c784cde662@qjbossas-qgong13.dev.rhcloud.com/~/git/qjbossas.git/
   59ef598..71633e3  master -> master



Expected results:
should build success.

Additional info:
use rhc domain show, I can see the 
Application Info
================
jenkins
    Framework: jenkins-1.4
     Creation: 2012-07-18T05:38:39-04:00
         UUID: 8e6c0229b712453a9e6d8c88087e3ff1
      Git URL: ssh://8e6c0229b712453a9e6d8c88087e3ff1@jenkins-qgong13.dev.rhcloud.com/~/git/jenkins.git/
   Public URL: http://jenkins-qgong13.dev.rhcloud.com/

 Embedded: 
      None

qjbossas
    Framework: jbossas-7
     Creation: 2012-07-18T05:39:13-04:00
         UUID: ab8a50731442491ca7bc08c784cde662
      Git URL: ssh://ab8a50731442491ca7bc08c784cde662@qjbossas-qgong13.dev.rhcloud.com/~/git/qjbossas.git/
   Public URL: http://qjbossas-qgong13.dev.rhcloud.com/

 Embedded: 
      jenkins-client-1.4 - Job URL: https://jenkins-qgong13.dev.rhcloud.com/job/qjbossas-build/
Comment 1 joycezhang 2012-07-26 03:27:28 EDT
It's failed to add jenkins-client after alter domain.
Steps to reproduce:
1. Create an app:
#rhc app create -a ruby1 -t ruby-1.8 -s
2. Change domain:
#rhc domain alter -n newdomain -p xx
3. Add jenkins client to the created app:
## rhc app cartridge add -a ruby -c jenkins-client-1.4  -p redhat -d

Actual result:
Failed to add jenkins client after alter domain as it's trying to find the original domain for jenkins server.

Please refer to following error message:

Contacting https://int.openshift.redhat.com
Problem reported from server. Response code was 500.

DEBUG:
Cartridge return code: 157

Exit Code: 1
api_c: ["placeholder"]
broker_c: ["namespace", "rhlogin", "ssh", "app_uuid", "debug", "alter", "cartridge", "cart_type", "action", "app_name", "api"]
API version:    1.1.3

RESULT:
Error contacting Jenkins server.
Could not download https://jenkin1-joyceint.int.rhcloud.com/jnlpJars/jenkins-cli.jar
Comment 2 Bill DeCoste 2012-07-27 10:53:09 EDT
rolled back changes done to handle multiple jenkins
Comment 3 Rony Gong 2012-07-30 06:06:59 EDT
Verified on devenv_1920:
1.alter domain
[root@localhost scalable]# rhc domain alter -n qgong16 --timeout 60
Password: 

OpenShift key found at /root/.ssh/id_rsa.  Reusing...

MESSAGES:
IMPORTANT: It is recommended that you restart your application to ensure all namespace related configurations are updated in the application's environment.
IMPORTANT: It is recommended that you restart your application to ensure all namespace related configurations are updated in the application's environment.

Now your new domain name(s) are being propagated worldwide (this might take a minute)...
You can use 'rhc domain show' to view any url changes.  Be sure to update any links
including the url in your local git config: <local_git_repo>/.git/config
Alteration successful.

2.jenkins build
[root@localhost qjbossas]# gitpush
[master 2f416c0] t
 Committer: root <root@localhost.localdomain>
Your name and email address were configured automatically based
on your username and hostname. Please check that they are accurate.
You can suppress this message by setting them explicitly:

    git config --global user.name "Your Name"
    git config --global user.email you@example.com

If the identity used for this commit is wrong, you can fix it with:

    git commit --amend --author='Your Name <you@example.com>'

 1 files changed, 1 insertions(+), 1 deletions(-)
[root@localhost qjbossas]# git push
Warning: Permanently added 'qjbossas-qgong16.dev.rhcloud.com' (RSA) to the list of known hosts.
Counting objects: 11, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (5/5), done.
Writing objects: 100% (6/6), 435 bytes, done.
Total 6 (delta 4), reused 0 (delta 0)
remote: Executing Jenkins build.
remote: 
remote: You can track your build at https://jenkins-qgong16.dev.rhcloud.com/job/qjbossas-build
remote: 
remote: Waiting for build to schedule................................................Done
remote: Waiting for job to complete...........................................................................................................................................Done
remote: SUCCESS
remote: New build has been deployed.
To ssh://3dd583b7f93849258f596ff1714ce150@qjbossas-qgong16.dev.rhcloud.com/~/git/qjbossas.git/
   9798d44..2f416c0  master -> master
Comment 4 Rony Gong 2012-07-30 06:25:34 EDT
3.Add jenkins-client after alter domain
[root@localhost scalable]# rhcappemb -a q2php -c jenkins-client-1.4

RESULT:

Job URL: https://jenkins-qgong17.dev.rhcloud.com/job/q2php-build/

Jenkins client 1.4 has been added to: q2php

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