Cause: When Kubernetes settings are updated, Jenkins is restarted/reloaded. This causes all of the configurations to be reloaded, including ours. credentialsId becomes null and causes NPE's to be thrown, stopping the watchers, which can't recover.
Consequence: When Kube is updated, we stop being able to sync with OpenShift
Fix: The getter for credentialsId check for null, and returns "" if so
Result: The bug does not occur, Kube can now be updated without NPE
Created attachment 1279224[details]
Jenkins pod log
Description of problem:
Failed to sync jenkins pipeline build status from openshift to jenkins job with jenkins-2-rhel7 brew image
Version-Release number of selected component (if applicable):
brew-pulp.../openshift3/jenkins-2-rhel7@sha256:fafadceb7ece7d8be0cb4ee03344583ed029ac5ef2423f573cfbae3d9bfc6284
brew-pulp.../openshift3/jenkins-1-rhel7@sha256:2d3aa31d0c2428ac1278419bf7f4489f9d05a74f5f53828ee8aa1e778adadd2f
openshift-login 0.12
openshift-pipeline 1.0.42
openshift-sync 0.1.14
oc v3.6.64
kubernetes v1.6.1+5115d708d7
features: Basic-Auth GSSAPI Kerberos SPNEGO
openshift v3.5.5.15
kubernetes v1.5.2+43a9be4
How reproducible:
Always
Steps to Reproduce:
1.Create a project, create a jenkins pipeline bc
$ oc new-app https://raw.githubusercontent.com/openshift/origin/master/examples/jenkins/pipeline/samplepipeline.yaml
2.Wait jenkins pod is reday, log in jenkins webconsole, then go to Manage Jenkins page -> Configure System page.
Modify slave image under "Kuberneters Pod Template", save
3.Start new pipeline build via command
$ oc start-build sample-pipeline
Actual results:
Pipeline build keep new status, no jenkins job is trigger in jenkins webconsole
# oc get build
NAME TYPE FROM STATUS STARTED DURATION
sample-pipeline-1 JenkinsPipeline New
Expected results:
Pipeline build is running, jenkins job is existing in jenkins webconsole
Additional info:
don't put it ON_QA until it's in an image that QE can test.
next steps:
1) the plugin needs to be released (you/gabe)
2) the plugin needs to be RPM packaged (troy/sam)
3) the jenkins image needs to be updated to reference the new plugin version (you)
4) QE can test w/ the new centos image produced by (3) but ultimately the bug can't be validated until a new rhel image is built that consumes the rpm from (2).
2+3 can happen in parallel.
Test with
brew-pulp.../openshift3/jenkins-1-rhel7@sha256:a82dcb86416e13f5e66e4ad6f7c1e03a70431c4676028dfb7ee2172a8b9b0adb
jenkins-plugin-openshift-pipeline-1.0.47-10.el7.x86_64
jenkins-plugin-openshift-login-0.12-10.el7.x86_64
jenkins-plugin-openshift-sync-0.1.23-10.el7.x86_64
could sync pipeline build status after modifying slave pod template in jenkins server
could move to verified
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://access.redhat.com/errata/RHEA-2017:1716