Bug 1683127

Summary: Jenkins pipeline build always is pending in client even it is running/cancelled/deleted in jenkins webconsole
Product: OpenShift Container Platform Reporter: XiuJuan Wang <xiuwang>
Component: BuildAssignee: Gabe Montero <gmontero>
Status: CLOSED DUPLICATE QA Contact: wewang <wewang>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.1.0CC: aos-bugs, jokerman, mmccomas, wzheng, xiuwang
Target Milestone: ---Keywords: Regression
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-02-27 11:19:09 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 XiuJuan Wang 2019-02-26 09:57:56 UTC
Description of problem:
Jenkins pipeline builds always be pending in client even it is running/cancelled/deleted  in jenkins webconsole

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

openshift-client plugin 1.0.26

How reproducible:

Steps to Reproduce:
1.Create a jenkins server
2.Create a pipeline buildconfig and trigger build
3.Check builds

Actual results:

oc get  builds  -n xiu1 
NAME                                        TYPE              FROM          STATUS     STARTED          DURATION
sample-pipeline-openshift-client-plugin-1   JenkinsPipeline   Git           Pending                     
ruby-1                                      Docker            Git@787f1be   Complete   20 minutes ago   2m10s
sample-pipeline-openshift-client-plugin-2   JenkinsPipeline   Git@master    Pending 

Expected results:
Should sync pipleline build between client and jenkins webconsole.

Additional info:

Comment 1 Gabe Montero 2019-02-26 15:09:29 UTC
seems like a generic sync plugin problem (not client plugins) at first blush

will see if I can reproduced locally, go from there

Comment 2 Gabe Montero 2019-02-26 16:49:41 UTC
Hmmm ... I can't even get pipelines loaded with today's build.  The fabric8 okhttp3 watch connections are getting errors:

Feb 26, 2019 4:33:29 PM io.fabric8.kubernetes.client.dsl.internal.WatchConnectionManager$2 onFailure
WARNING: Exec Failure
	at okio.RealBufferedSource.require(RealBufferedSource.java:60)
	at okio.RealBufferedSource.readByte(RealBufferedSource.java:73)
	at okhttp3.internal.ws.WebSocketReader.readHeader(WebSocketReader.java:113)
	at okhttp3.internal.ws.WebSocketReader.processNextFrame(WebSocketReader.java:97)
	at okhttp3.internal.ws.RealWebSocket.loopReader(RealWebSocket.java:265)
	at okhttp3.internal.ws.RealWebSocket$2.onResponse(RealWebSocket.java:204)
	at okhttp3.RealCall$AsyncCall.execute(RealCall.java:153)
	at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)

@XiuJuan - can reproduce and provide my the jenkins pod logs along with the oc get builds output you provided previously.

We may have multiple issues going on here.

Comment 3 Gabe Montero 2019-02-26 16:50:38 UTC
The exceptions I am seeing could be environmental.  Will retry periodically throughout the day.

Comment 4 Gabe Montero 2019-02-26 18:19:21 UTC
OK my cluster's master settled down and I was able to run pipelines.

@XiuJuan - things ran successfully for me:

gmontero ~/go/src/github.com/openshift/origin/examples/jenkins/pipeline  (master)$ oc get builds 
NAME                                        TYPE              FROM          STATUS     STARTED              DURATION
sample-pipeline-openshift-client-plugin-1   JenkinsPipeline   Git@master    Complete   7 minutes ago        
ruby-1                                      Docker            Git@787f1be   Complete   5 minutes ago        2m0s
sample-pipeline-openshift-client-plugin-2   JenkinsPipeline   Git@master    Complete   About a minute ago   
gmontero ~/go/src/github.com/openshift/origin/examples/jenkins/pipeline  (master)$ 

So, two things:
1) if you are running off the same jenkins instance as https://bugzilla.redhat.com/show_bug.cgi?id=1683089 then that explains it;
pipeline builds won't work with those startup errors

If this is it, we'll mark this as a dupe and you can retry when the fix is available.

2) if your jenkins image at least came up, i.e. you used another version of the image, then you'll need to supply the jenkins pod log and the console output from at least 
one of your 2 pipeline runs for me to investigate.

Comment 5 XiuJuan Wang 2019-02-27 11:19:09 UTC
Today I use the jenkins image with version=v4.0.0 release= don't fix bug 1683089), met this bug in three clusters.
But could pass with image registry.svc.ci.openshift.org/ocp/4.0-2019-02-27-042750@sha256:466f38fd4218bc3d203411bb47dd815b12ca24e11fc735dc64b5fc872b3e2ae3.
So I will mark this bug as duplicate with bug 1683089.
If met again with other version, will reopen it.

*** This bug has been marked as a duplicate of bug 1683089 ***