Bug 1451223

Summary: Failed to sync jenkins pipeline build status from openshift to jenkins job with jenkins-2-rhel7 and jenkins-1-rhel7 image
Product: OpenShift Container Platform Reporter: Dongbo Yan <dyan>
Component: ImageStreamsAssignee: Ben Parees <bparees>
Status: CLOSED ERRATA QA Contact: Dongbo Yan <dyan>
Severity: high Docs Contact:
Priority: medium    
Version: 3.6.0CC: aos-bugs, bparees, jokerman, mmccomas, smunilla
Target Milestone: ---Keywords: Regression
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
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
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-08-10 05:24:06 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:
Attachments:
Description Flags
Jenkins pod log none

Description Dongbo Yan 2017-05-16 07:22:03 UTC
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:

Comment 1 Ben Parees 2017-05-16 14:12:24 UTC
Ryan, this sounds like the issue you already own:
https://github.com/openshift/jenkins-sync-plugin/issues/132

Comment 2 Ryan Murphy 2017-05-18 19:34:29 UTC
Fix merged here: https://github.com/openshift/jenkins-sync-plugin/pull/135

Comment 3 Ben Parees 2017-05-18 19:53:34 UTC
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.

Comment 7 Dongbo Yan 2017-07-11 07:18:03 UTC
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

Comment 9 errata-xmlrpc 2017-08-10 05:24:06 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://access.redhat.com/errata/RHEA-2017:1716