Bug 1396022 - The parameter "namespace" is mandatory in "Run OpenShift Exec" dsl step
Summary: The parameter "namespace" is mandatory in "Run OpenShift Exec" dsl step
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: Justin Pierce
QA Contact: Wang Haoran
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-11-17 09:22 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: Failure to use overrides methods in one area of Jenkins plugin exec implementation. Consequence: Fix: https://github.com/openshift/jenkins-plugin/pull/115 Result: Namespace is now an optional parameter.
Clone Of:
Environment:
Last Closed: 2017-01-18 12:55:36 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


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-17 09:22:23 UTC
Description of problem:
When use "Run OpenShift Exec" dsl step to execute command in running pod, the parameter "namespace" is mandatory.

Version-Release number of selected component (if applicable):
brew-pulp.../openshift3/jenkins-2-rhel7     9697e3752b3f  
brew-pulp.../openshift3/jenkins-1-rhel7     5730acae8c1c
openshift-login	0.9	
openshift-pipeline	1.0.34	
openshift-sync	0.0.17

openshift v3.4.0.26+f7e109e
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, create pipeline job, configure pipeline scripts
node{
    openshiftExec apiURL: '', authToken: '', command: 'true', container: '', namespace: '', pod: 'nodejs-mongodb-example-1-hl5dj', verbose: 'false', waitTime: '', waitUnit: 'sec'
}
3.build jenkins job

Actual results:
jenkins job failed, jenkins log
Exiting "OpenShift Exec" unsuccessfully: Unable to find pod: nodejs-mongodb-example-1-hl5dj
com.openshift.restclient.OpenShiftException: The api endpoint for kind 'Pod' requires a namespace
	at com.openshift.internal.restclient.URLBuilder.buildWithNamespaceInPath(URLBuilder.java:152)
	at com.openshift.internal.restclient.URLBuilder.build(URLBuilder.java:132)
	at com.openshift.internal.restclient.DefaultClient.execute(DefaultClient.java:210)
	at com.openshift.internal.restclient.DefaultClient.execute(DefaultClient.java:194)
	at com.openshift.internal.restclient.DefaultClient.execute(DefaultClient.java:183)
	at com.openshift.internal.restclient.DefaultClient.get(DefaultClient.java:291)
	at com.openshift.jenkins.plugins.pipeline.model.IOpenShiftExec.coreLogic(IOpenShiftExec.java:72)
	at com.openshift.jenkins.plugins.pipeline.model.IOpenShiftPlugin.doItCore(IOpenShiftPlugin.java:305)
	at com.openshift.jenkins.plugins.pipeline.dsl.OpenShiftExecExecution.run(OpenShiftExecExecution.java:43)
	at com.openshift.jenkins.plugins.pipeline.dsl.OpenShiftExecExecution.run(OpenShiftExecExecution.java:19)
	at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1$1.call(AbstractSynchronousNonBlockingStepExecution.java:52)
	at hudson.security.ACL.impersonate(ACL.java:213)
	at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1.run(AbstractSynchronousNonBlockingStepExecution.java:49)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
ERROR: "OpenShift Exec" failed
Finished: FAILURE

Expected results:
Job success

Additional info:
the same with freestyle job

Comment 1 Justin Pierce 2016-11-17 15:06:59 UTC
Fix in progress: https://github.com/openshift/jenkins-plugin/pull/115

Comment 2 Troy Dawson 2016-11-18 17:41:08 UTC
Should be fixed in rpm
  jenkins-plugin-openshift-pipeline-1.0.35-1.el7
and images:
  openshift3/jenkins-1-rhel7:1.651.2-35
  openshift3/jenkins-2-rhel7:2.7-20

Comment 4 Ben Parees 2016-11-21 13:26:51 UTC
@Dongbo it's not clear why this failedqa?

Was it because of https://bugzilla.redhat.com/show_bug.cgi?id=1396918 preventing things from working?

Comment 5 Dongbo Yan 2016-11-22 02:04:19 UTC
I should change to modified, not failedQA.
Due to plugin cannot load in jenkins server with the image

Comment 6 Dongbo Yan 2016-11-23 03:14:20 UTC
Test with 
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

jenkins job success

Comment 8 errata-xmlrpc 2017-01-18 12:55:36 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.