Bug 1392353 - There is no "sample-pipeline" job in jenkins webconsole
Summary: There is no "sample-pipeline" job in jenkins webconsole
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: ImageStreams
Version: 3.4.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Jimmi Dyson
QA Contact: Wang Haoran
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-11-07 09:57 UTC by Dongbo Yan
Modified: 2017-03-08 18:43 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: New BuildConfig events were missed. Consequence: Associated Jenkins jobs were not created. Fix: Ensure order of resource watches is correct and periodically resync to prevent missing events. Result: Associated Jenkins jobs are always created.
Clone Of:
Environment:
Last Closed: 2017-01-18 12:50:21 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Jenkins pod log (13.84 KB, text/plain)
2016-11-07 09:57 UTC, Dongbo Yan
no flags Details
updated sync plugin (5.01 MB, patch)
2016-11-07 21:36 UTC, Gabe Montero
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:0066 0 normal SHIPPED_LIVE Red Hat OpenShift Container Platform 3.4 RPM Release Advisory 2017-01-18 17:23:26 UTC

Description Dongbo Yan 2016-11-07 09:57:50 UTC
Created attachment 1217957 [details]
Jenkins pod log

Description of problem:
After jenkins is deployed, cannot find "sample-pipeline" job in jenkins webconsole

Version-Release number of selected component (if applicable):
brew-pulp.../openshift3/jenkins-2-rhel7         ede34972221e  
brew-pulp.../openshift3/jenkins-1-rhel7         b05627cfafbf 
openshift-login         0.6	
openshift-pipeline      1.0.28	
openshift-sync          0.0.14	

openshift v3.4.0.22+5c56720
kubernetes v1.4.0+776c994
etcd 3.1.0-rc.0

How reproducible:
Always

Steps to Reproduce:
1.Create a pipeline build
 $ oc new-app https://raw.githubusercontent.com/openshift/origin/master/examples/jenkins/pipeline/samplepipeline.json
2.Login in jenkins, check jenkins job info

Actual results:
Cannot find "sample-pipeline" job

Expected results:
jenkins job "sample-pipeline" is existing 

Additional info:
jenkins pod log -- attachment

Comment 1 Gabe Montero 2016-11-07 20:04:02 UTC
@ Donbo Yan - you have to run `oc start-build sample-pipeline` in order to see the "sample-pipeline" job in the Jenkins console.

That said, I just tried it with a local build and got some unexpected results.  The a job run started, but the project was not created.

I'm going to send this back to QA and have them retry it with the correct procedure.  In the meantime, I'll try to diagnose what I am seeing locally.  If Donbo Yan sees similar issues after running `oc start-build sample-pipeline` that I am seeing, we'll debug from there.

Comment 2 Ben Parees 2016-11-07 20:47:18 UTC
The job definition should show up as soon as the pipeline buildconfig is created, there is no need to start the build to get the job definition to show up.

it's possible there is a terminology confusion here, but I think Dongbo is referring to the job definition, not a running instance of the job.

Gabe was your recreate attempt using the pulp rhel image?

Comment 3 Gabe Montero 2016-11-07 20:59:12 UTC
Ah - my apologies on the start-build confusion.

I tried a combo of things, including the brew pulp rhel.  As an fyi, I also saw the issue I'm seeing with centos.

As part of debugging what I saw, I saw that the relevant paths in sync plugin had changed since 0.0.14 (0.1.-SNAPSHOT) and I was no longer able to reproduce when upgrading to that level after iniitally seeing the issue.  The sample-pipeline project appeared when it did not before.

I think it would still be useful for Dongo to provide the jenkins pod logs *AFTER* running `oc start-build` ... to see if the same messages around the job appear ("NO SUBJECT" for the job name for example, then only update msgs vs create msgs for BuildConfigWatcher.upsertJob.  That would confirm if he is seeing the same thing I am.

I'm in the process of creating an image that from startup leverages 0.1-SNAPSHOT to better confirm if the post 0.0.14 commits in BuildConfigWatcher work around this issue.  I'll update this bug once I am done with that.

Comment 4 Gabe Montero 2016-11-07 21:36:02 UTC
Created attachment 1218270 [details]
updated sync plugin

Comment 5 Gabe Montero 2016-11-07 21:42:45 UTC
OK, I can consistently produce the problem I'm seeing with v0.0.14.  Then, updating the pre-installed jenkins-ephemeral template to use and modified jenkins image that using 0.1-SNAPSHOT of the sync plugin, with everything else the same, I cannot produce the issue I'm seeing.  3 runs with each version.

These commits

1cb8c87f0bf6a90c4e199f2eacd595332ee374ff
600605f29893522d33c6cdca24f8a64d7e84b5d6
1f77bf490670a56ee851e1d05aab34545172733e
a86ce1cd6658ba82f4ac88ba87aee0ec56198cfe

that modify BuildConfigWatcher.java look to my reading of them pertinent to the problem I'm seeing.

I've attached the openshift-sync.hpi file from my testing to this bug.  In addition to running oc start-build to see if the "NO SUBJECT" text appears in the pod log, assuming I uploaded it correctly, QE *could* upgrade the sync plugin after seeing the issue and see if this resolves it.

Of course, in the interim, if Jimmi thinks something else is going on, we can go from there.

Comment 6 Ben Parees 2016-11-08 00:27:48 UTC
Thanks Gabe, assigning to Jimmi, sounds like a new release of the sync plugin is needed.

Comment 7 Ben Parees 2016-11-09 19:10:31 UTC
v0.15 of the sync plugin is released, assigning to Troy to package and build new rhel image.

Comment 8 Dongbo Yan 2016-11-10 06:45:36 UTC
Test with
brew-pulp.../openshift3/jenkins-2-rhel7           20e80cb29407     brew-pulp.../openshift3/jenkins-1-rhel7           91ba1b4bff1d
openshift-login    0.8
openshift-pipeline 1.0.32	
openshift-sync     0.0.15

openshift v3.4.0.23+24b1a58
kubernetes v1.4.0+776c994
etcd 3.1.0-rc.0

could find "sample-pipeline" job in jenkins webconsole

Comment 10 errata-xmlrpc 2017-01-18 12:50:21 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


Note You need to log in before you can comment on or make changes to this bug.