Created attachment 1223054 [details] jenkins job log Description of problem: using "Scale OpenShift Deployment" jenkins dsl step to scale deployment, if existing pods are not deployed by the latest deployment, jenkins job will fail Version-Release number of selected component (if applicable): brew-pulp.../openshift3/jenkins-1-rhel7 latest 9edb7f9e5157 brew-pulp.../openshift3/jenkins-2-rhel7 latest b5b09fbedfc0 openshift-login 0.9 openshift-pipeline 1.0.36 openshift-sync 0.0.17 openshift v3.4.0.28+dfe3a66 kubernetes v1.4.0+776c994 etcd 3.1.0-rc.0 How reproducible: Always Steps to Reproduce: 1.Setup jenkins server and generate application under project $ oc new-app https://raw.githubusercontent.com/openshift/origin/master/examples/jenkins/pipeline/samplepipeline.json $ oc start-build sample-pipeline 2.wait nodejs-mongodb-example app pod is ready, trigger deployment manually, then cancel the latest deployment 3.create pipeline job, configure pipeline scripts node{ stage 'build' openshiftScale( depCfg: 'nodejs-mongodb-example',replicaCount: '3', verbose: 'true', verifyReplicaCount: 'false') } Actual results: Jenkins job failed, but scale deployment successfully in fact # oc get pod NAME READY STATUS RESTARTS AGE nodejs-mongodb-example-6-6u63e 1/1 Running 0 50m nodejs-mongodb-example-6-kfmpo 1/1 Running 0 33m nodejs-mongodb-example-6-luel5 1/1 Running 0 45m # oc get dc NAME REVISION DESIRED CURRENT TRIGGERED BY nodejs-mongodb-example 7 3 0 config # oc get rc NAME DESIRED CURRENT READY AGE nodejs-mongodb-example-5 0 0 0 37m nodejs-mongodb-example-6 3 3 3 17m nodejs-mongodb-example-7 0 0 0 13m Expected results: Jenkins job success Additional info:
This bug has existed for a while. The canceled build is fooling the plugin when attempting to find the latest version of the replication controller. The logic should check phase/status when determining the RC to monitor.
Note, even if we don't verify the replica count, we still confirm the state of the RC is complete.
Commit https://github.com/openshift/jenkins-plugin/commit/2da6c4b83ea18768a77b2050732b4e6f1565ff58 addresses this issue. I'll move the bug to QA once the plugin version and images are updated.
Jenkins rhel image on brew-pulp now has v1.0.37 of the plugin, which includes the fix for this.
Test with brew-pulp.../openshift3/jenkins-1-rhel7 bdda1c3ed6fd brew-pulp.../openshift3/jenkins-2-rhel7 40ed5bbd7488 openshift-login 0.9 openshift-pipeline 1.0.37 openshift-sync 0.1.5 openshift v3.4.0.30+e10cc28 kubernetes v1.4.0+776c994 etcd 3.1.0-rc.0
This bug was fixed with the latest OCP 3.4.0 that is already released.