Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1390865

Summary: Pipeline stages display abnormally on web console
Product: OpenShift Container Platform Reporter: Yanping Zhang <yanpzhan>
Component: BuildAssignee: Jimmi Dyson <jdyson>
Status: CLOSED ERRATA QA Contact: Wang Haoran <haowang>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.4.0CC: aos-bugs, jokerman, mmccomas, spadgett, tdawson, yanpzhan
Target Milestone: ---Keywords: Regression
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Cause: Multiple Jenkins builds were triggered for single OpenShift Build. Consequence: Build details appeared to sync inconsistently. Fix: Ensure only a single Jenkins build is triggered for each OpenShift build. Result: Build details sync properly and console displays pipeline properly.
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-01-18 12:48:43 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
pipeline.gif
none
jenkins-jobs
none
jenkinslog none

Description Yanping Zhang 2016-11-02 07:06:22 UTC
Created attachment 1216372 [details]
pipeline.gif

Description of problem:
Create jenkinsPipelineStrategy bc and deploy jenkins master pod. Start pipeline build, check stage on build page and overview page, the stages status is unstable, they flash quickly, sometimes stage 2 status would cover stage 1 status.

Version-Release number of selected component (if applicable):
openshift v3.4.0.18+ada983f
kubernetes v1.4.0+776c994
etcd 3.1.0-rc.0
image info:
$ docker images | grep jenkins # on pod's node
registry.ops.openshift.com/openshift3/jenkins-1-rhel7 <none> 2552a065d61d 13 hours ago    679.7 MB
How reproducible:
Always

Steps to Reproduce:
1.Create jenkinsPipelineStrategy bc, deploy jenkins master pod and edit bc to add stages. 
$ oc new-app -f https://raw.githubusercontent.com/openshift/origin/master/examples/jenkins/pipeline/samplepipeline.json
$ oc edit bc sample-pipeline # Edit as follows by adding lines 'input message' into stages:

...
      jenkinsfile: |-
        node('nodejs') {
        stage 'stage1'
        input message: 'really approve?'
        stage 'stage2'
        input message: 'really approve?'
        ……
        )

2.Start a build

$ oc start-build sample-pipeline

3.Wait a moment for the build to be running, check the pipeline build in bc page and overview page on web console:

Actual results:
3.The stages status is unstable, they flash quickly, sometimes stage 2 status would cover stage 1 status. Refer to attachment.

Expected results:
3.Every stage should go smoothly and display well on bc and overview page. 

Additional info:

Comment 1 Samuel Padgett 2016-11-02 13:15:35 UTC
yanpzhan can you check if there were two jobs started in the Jenkins console for this build? I suspect two Jenkins jobs are trying to sync status back to the same OpenShift build, causing the flicker you're seeing. Also please attach the log for the Jenkins pod to see if there are any errors.

Comment 2 Yanping Zhang 2016-11-04 07:11:59 UTC
Checked again. Indeed as you said: after I approved stage 1, two jenkins jobs are running on jenkins console which causing the flicker, and after a while 3 jenkins jobs showing on jenkins console, but I didn't start andy jenkins job manually. Could see that nodejs pod number increased:
# oc get pod
NAME                  READY     STATUS    RESTARTS   AGE
jenkins-1-bthzs       1/1       Running   0          21m
mongodb-1-mqzhs       1/1       Running   0          21m
nodejs-5f0f2217a1c5   1/1       Running   0          2m
# oc get pod
NAME                  READY     STATUS    RESTARTS   AGE
jenkins-1-bthzs       1/1       Running   0          25m
mongodb-1-mqzhs       1/1       Running   0          25m
nodejs-5f0f2217a1c5   1/1       Running   0          6m
nodejs-5f31e6fcbc56   1/1       Running   0          4m
# oc get pod
NAME                  READY     STATUS    RESTARTS   AGE
jenkins-1-bthzs       1/1       Running   0          31m
mongodb-1-mqzhs       1/1       Running   0          31m
nodejs-5f0f2217a1c5   1/1       Running   0          12m
nodejs-5f31e6fcbc56   1/1       Running   0          9m
nodejs-5f8f0d1b0074   1/1       Running   0          3m

Attach jenkins log.

Comment 3 Yanping Zhang 2016-11-04 07:14:39 UTC
Created attachment 1217301 [details]
jenkins-jobs

Comment 4 Yanping Zhang 2016-11-04 07:15:56 UTC
Created attachment 1217302 [details]
jenkinslog

Comment 5 Samuel Padgett 2016-11-04 11:56:13 UTC
This appears to be a sync pipeline issue. Assigning to Jimmi. Jimmi, let us know if there is anything we can do to help.

Comment 6 Jimmi Dyson 2016-11-10 10:54:37 UTC
Please try with latest Jenkins image - cannot reproduce with that, console runs smoothly for me.

Comment 7 Yanping Zhang 2016-11-15 03:26:26 UTC
Tested on OCP v3.4.0.26 with latest jenkins images:
# docker images|grep jenkins
registry.ops.openshift.com/openshift3/jenkins-2-rhel7              <none>              d126876bf60a        2 days ago          677.4 MB
Now the pipeline stages show well on web console, the issue is fixed, so move the bug to Verified.

Comment 9 errata-xmlrpc 2017-01-18 12:48:43 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/RHBA-2017:0066