Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1396022 - The parameter "namespace" is mandatory in "Run OpenShift Exec" dsl step
The parameter "namespace" is mandatory in "Run OpenShift Exec" dsl step
Status: CLOSED ERRATA
Product: OpenShift Container Platform
Classification: Red Hat
Component: Image (Show other bugs)
3.4.0
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Justin Pierce
Wang Haoran
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-11-17 04:22 EST by Dongbo Yan
Modified: 2017-03-08 13 EST (History)
6 users (show)

See Also:
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.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-01-18 07:55:36 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:0066 normal SHIPPED_LIVE Red Hat OpenShift Container Platform 3.4 RPM Release Advisory 2017-01-18 12:23:26 EST

  None (edit)
Description Dongbo Yan 2016-11-17 04:22:23 EST
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 10:06:59 EST
Fix in progress: https://github.com/openshift/jenkins-plugin/pull/115
Comment 2 Troy Dawson 2016-11-18 12:41:08 EST
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 08:26:51 EST
@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-21 21:04:19 EST
I should change to modified, not failedQA.
Due to plugin cannot load in jenkins server with the image
Comment 6 Dongbo Yan 2016-11-22 22:14:20 EST
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 07:55:36 EST
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.