Description of problem: Embedding the jenkins-client to normal app after snapshot restoring the jenkins server app will fail. In the below steps, I list the environment variables of jenkins on both jenkins server app and php app before and after restoring. After restoring the jenkins server app, jenkins environment variables are not restored, I guess that is the reason which we cannot embed the jenkins client to php after restoring the jenkins server. Version-Release number of selected component (if applicable): rhc (0.95.13) devenv-stage_223 How reproducible: always Steps to Reproduce: 1.create an jenkins app and normal app(eg.php-5.3); Jenkins created successfully. Please make note of these credentials: User: admin Password: akyGyxpwD54M 2.save the jenkins app using rhc-snapshot -s; 3.ssh to php and jenkins server app,check the jenkins environment variables: [jk-jsq6.dev.rhcloud.com .env]\> echo $JENKINS_PASSWORD gmWpTwZfAlzV [jk-jsq6.dev.rhcloud.com .env]\> echo $JENKINS_URL https://jk-jsq6.dev.rhcloud.com/ [jk-jsq6.dev.rhcloud.com .env]\> echo $JENKINS_USERNAME system_builder [jk-jsq6.dev.rhcloud.com .env]\> [php-jsq6.dev.rhcloud.com .env]\> echo $JENKINS_PASSWORD gmWpTwZfAlzV [php-jsq6.dev.rhcloud.com .env]\> echo $JENKINS_URL https://jk-jsq6.dev.rhcloud.com/ [php-jsq6.dev.rhcloud.com .env]\> echo $JENKINS_USERNAME system_builder [php-jsq6.dev.rhcloud.com .env]\> 5.embed the jenkins-client into php successfully; 6.destroy jenkins server app, and the jenkins-client embedded into php is deleted automatically; 7.ssh to php app,check the jenkins environment variables again(they will be deleted); 8.create jenkins server again; Jenkins created successfully. Please make note of these credentials: User: admin Password: flXDRsTpJ4Dx 9.ssh to the jenkins server app and php app, check the jenkins environment variables(they will be different with step 3 and 4); [jk-jsq6.dev.rhcloud.com .env]\> echo $JENKINS_PASSWORD fXRS15ubQYyg [jk-jsq6.dev.rhcloud.com .env]\> echo $JENKINS_URL https://jk-jsq6.dev.rhcloud.com/ [jk-jsq6.dev.rhcloud.com .env]\> echo $JENKINS_USERNAME system_builder [php-jsq6.dev.rhcloud.com .env]\> echo $JENKINS_PASSWORD fXRS15ubQYyg [php-jsq6.dev.rhcloud.com .env]\> echo $JENKINS_URL https://jk-jsq6.dev.rhcloud.com/ [php-jsq6.dev.rhcloud.com .env]\> echo $JENKINS_USERNAME system_builder 10.restore the jenkins server app using rhc-snapshot -r; 11.ssh to the jenkins server and php app, check the jenkins environment variables(they are the same with step 9); [jk-jsq6.dev.rhcloud.com .env]\> echo $JENKINS_PASSWORD fXRS15ubQYyg [jk-jsq6.dev.rhcloud.com .env]\> echo $JENKINS_URL https://jk-jsq6.dev.rhcloud.com/ [jk-jsq6.dev.rhcloud.com .env]\> echo $JENKINS_USERNAME system_builder [php-jsq6.dev.rhcloud.com .env]\> echo $JENKINS_PASSWORD fXRS15ubQYyg [php-jsq6.dev.rhcloud.com .env]\> echo $JENKINS_URL https://jk-jsq6.dev.rhcloud.com/ [php-jsq6.dev.rhcloud.com .env]\> echo $JENKINS_USERNAME system_builder 12.embed jenkens-client to php again, you will get the output error to prompt embedding failed; Actual results: [root@jsq .openshift]# rhc app cartridge add -a php -c jenkins-client-1.4 -p x Problem reported from server. Response code was 500. Re-run with -d for more information. RESULT: Could not add job 'php-build' in Jenkins server: You'll need to correct this error before attempting to embed the Jenkins client again. Expected results: Embed the jenkins-client to the php successfully after restoring. Additional info:
Created attachment 597772 [details] broker log file
https://github.com/openshift/origin-server/pull/3261
Commit pushed to master at https://github.com/openshift/origin-server https://github.com/openshift/origin-server/commit/4e17b7c62a87b08a290664fb7a447f848bf356da Bug 839581: Reset system_builder credentials on jenkins restore
It's fixed, verified on devenv_3604, please refer to the following results: 1.Create an jenkins app and normal app(eg.php-5.3); 2.Save the jenkins app using "rhc snapshot save"; 3.Embed the jenkins-client into php successfully; 4.Destroy jenkins server app 5.Create jenkins app again 6.Restore the jenkins server app using "rhc snapshot restore" 7.Embed jenkens-client to php again [root@F17-CCY test]# rhc cartridge add jenkins-client-1.4 -a cphp Adding jenkins-client-1.4 to application 'cphp' ... done jenkins-client-1.4 (Jenkins Client 1.4) --------------------------------------- Gears: Located with php-5.3 Job URL: https://cjk-cdm.dev.rhcloud.com/job/cphp-build/ Associated with job 'cphp-build' in Jenkins server.