Bug 1622014 - Starting a pipeline build from Jenkins UI or Jenkins triggers could result in duplicate build parameters.
Summary: Starting a pipeline build from Jenkins UI or Jenkins triggers could result in...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: ImageStreams
Version: 3.11.0
Hardware: All
OS: All
unspecified
unspecified
Target Milestone: ---
: 3.11.0
Assignee: Gabe Montero
QA Contact: wewang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-08-24 07:28 UTC by Yuxiang Zhu
Modified: 2018-10-11 07:26 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-10-11 07:25:54 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:2652 0 None None None 2018-10-11 07:26:26 UTC

Description Yuxiang Zhu 2018-08-24 07:28:31 UTC
Description of problem:
When using OpenShift Pipeline, starting a pipeline build from Jenkins UI or Jenkins triggers could result in duplicate build parameters. This leads to unpredictable behavior in the pipeline job and some Jenkins plugins just stop working when it happens.

Version-Release number of selected component (if applicable):
3.11 and master branch

How reproducible:
See https://github.com/openshift/jenkins-sync-plugin/pull/254 

Actual results:
There are duplicate parameters in the Jenkins job run.

Expected results:
There should be no duplicate parameters in a Jenkins triggered job run.


Additional info:
A fix has been given in https://github.com/openshift/jenkins-sync-plugin/pull/254 .

Comment 1 Gabe Montero 2018-08-27 13:37:20 UTC
PR https://github.com/openshift/jenkins-sync-plugin/pull/254 from @Yuziang Zhu has merged.

I've initiated v1.0.26 of the sync plugin with that change.

Comment 2 Gabe Montero 2018-08-27 17:33:40 UTC
PR https://github.com/openshift/jenkins/pull/685 

and distgit job

https://buildvm.openshift.eng.bos.redhat.com:8443/job/devex/job/devex%252Fjenkins-plugins/62/


is pulling in the sync plugin fix into the centos/rhel images respectively.

I will move to on qa when I see a brew pulp image with the new sync plugin version.

Comment 3 Gabe Montero 2018-08-29 15:32:09 UTC
image brew-pulp-docker01.web.prod.ext.phx2.redhat.com:8888/openshift3/jenkins-2-rhel7:v3.11.0.20180828.200945

has v1.0.26 of the sync plugin

moving to qa

Comment 6 Ben Parees 2018-08-31 13:56:02 UTC
Are you sure that's a pod log from the slave? I don't know why the slave would be running sync-plugin logic.

Also the error you got sounds like a permissions problem in your default service account.  The sync plugin is expected to have edit permission for the namespace it operates against..   your pod is running w/ the "default" service account and it would appear it does not have permission to view configmaps, which would normally be part of the edit permission.

Can you provide your full recreate steps, as well as providing your slave pod template definition and the slave pod yaml?



To answer your original question, yes registry.dev.redhat.io/openshift3/jenkins-2-rhel7:v3.11 has the v1.026 plugin, registry.dev.redhat.io uses the same storage as brew, so the images will be identical.

Comment 7 wewang 2018-09-03 07:25:01 UTC
@Ben Parees sorry my misunderstood, the bug already verified in registry.dev.xxx/openshift3/jenkins-2-rhel7 ea444244e521
registry.dev.xxx/openshift3/jenkins-slave-base-rhel7 126b00ef54fe
Thanks @Yuxiang Zhu 

steps:
1. Launch openshift with latest jenkins version

2. Using file from pull/254, replace docker.io/openshift/jenkins-slave-base-centos7:latest with registry.dev.xxx/openshift3/jenkins-slave-base-rhel7:latest
 
3.Create buildconfig from above file
 $oc create -f XXX

4.Start a pipeline build from jenkins job

5. Check the page "This build requires parameters: ", will not duplicate parameters, and start a build

6. Build complete

OpenShift Build bug/demo-pipeline-1
Started by user wewang
[Pipeline] podTemplate
[Pipeline] {
[Pipeline] node
Still waiting to schedule task
Jenkins doesn’t have label jenkins-slave-40249bxxxx86-c545a9db3b9a
Agent jenkins-slave-40249bbe-c6a9-4dc1-xxx5a9db3b9a-2g33z-sjbfx is provisioned from template Kubernetes Pod Template
Agent specification [Kubernetes Pod Template] (jenkins-slave-xxxc6a9-4dc1-8f86-c545a9db3b9a): 

Running on jenkins-slave-40249bbe-c6a9-4dc1-8f86-c545a9db3b9a-2g33z-sjbfx in /home/jenkins/workspace/bug/bug-demo-pipeline
[Pipeline] {
[Pipeline] container
[Pipeline] {
[Pipeline] stage
[Pipeline] { (foo)
[Pipeline] echo
Hello, openshift
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
[Pipeline] // container
[Pipeline] }
[Pipeline] // node
[Pipeline] }
[Pipeline] // podTemplate
[Pipeline] End of Pipeline
Finished: SUCCESS

Comment 9 errata-xmlrpc 2018-10-11 07:25:54 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-2018:2652


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