Bug 1299709 - Error appears when creating resource(s) in openshift via jenkins
Error appears when creating resource(s) in openshift via jenkins
Status: CLOSED CURRENTRELEASE
Product: OpenShift Origin
Classification: Red Hat
Component: Image (Show other bugs)
3.x
Unspecified Unspecified
low Severity low
: ---
: ---
Assigned To: Gabe Montero
Wang Haoran
:
Depends On:
Blocks: 1311048
  Show dependency treegraph
 
Reported: 2016-01-19 00:24 EST by wewang
Modified: 2016-05-12 13:13 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1311048 (view as bug list)
Environment:
Last Closed: 2016-05-12 13:13:03 EDT
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)

  None (edit)
Description wewang 2016-01-19 00:24:40 EST
Error appears when creating resource(s) in openshift, but  pod is running

openshift/jenkins-1-rhel7 a1405352dba5

steps:
1. Create jenkins
 $ oc new-project test
 $oc policy add-role-to-user admin system:serviceaccount:test:default -n test 
 $oc new-app -f https://raw.githubusercontent.com/openshift/origin/master/examples/jenkins/jenkins-ephemeral-template.json 
2. create job 
$ oc new-project test1
$ oc policy add-role-to-user edit system:serviceaccount:test:default -n test1 
3. create a job and configure
   a. The JSON or YAML that defines the OpenShift resource(s) to create : paste https://raw.githubusercontent.com/openshift/origin/master/examples/hello-openshift/hello-pod.json context here
4. Check the console out page
 
Started by user Jenkins Admin
Building in workspace /var/lib/jenkins/jobs/testplugin/workspace
java.lang.IllegalAccessException: Class com.openshift.jenkins.plugins.pipeline.OpenShiftBaseStep can not access a member of class com.openshift.jenkins.plugins.pipeline.OpenShiftCreator with modifiers "private static final"
	at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:102)
	at java.lang.reflect.AccessibleObject.slowCheckMemberAccess(AccessibleObject.java:296)
	at java.lang.reflect.AccessibleObject.checkAccess(AccessibleObject.java:288)
	at java.lang.reflect.Field.get(Field.java:390)
	at com.openshift.jenkins.plugins.pipeline.OpenShiftBaseStep.setFields(OpenShiftBaseStep.java:49)
	at com.openshift.jenkins.plugins.pipeline.OpenShiftBaseStep.inspectBuildEnvAndOverrideFields(OpenShiftBaseStep.java:76)
	at com.openshift.jenkins.plugins.pipeline.OpenShiftBaseStep.perform(OpenShiftBaseStep.java:141)
	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:785)
	at hudson.model.Build$BuildExecution.build(Build.java:205)
	at hudson.model.Build$BuildExecution.doRun(Build.java:162)
	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:537)
	at hudson.model.Run.execute(Run.java:1741)
	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
	at hudson.model.ResourceController.execute(ResourceController.java:98)
	at hudson.model.Executor.run(Executor.java:408)


BUILD STEP:  OpenShiftCreator in perform on namespace test1


BUILD STEP EXIT:  OpenShiftCreator resources(s) created
Finished: SUCCESS

5. Check the pod 
# oc get pods
NAME              READY     STATUS    RESTARTS   AGE
hello-openshift   1/1       Running   0          45m
Comment 1 wewang 2016-01-19 00:26:26 EST
Refer to comments:https://bugzilla.redhat.com/show_bug.cgi?id=1291630#c10
Comment 2 Gabe Montero 2016-01-19 09:48:24 EST
I have verified a fix locally and pushed the changes to the github src repo.

I'll hold off for a couple of days before creating a new version on the jenkins update center and triggering the jenkins image updates, in case more bugs/fixes emerge.

thanks
Comment 3 Gabe Montero 2016-01-25 10:58:11 EST
OK, I've initiated the process to bump the plugin version.  Waiting on jenkinsci upstream to post the new version on the jenkins update center.

Once complete, I'll initiate the requests to get the centos/rhel jenkins images updated.
Comment 4 Gabe Montero 2016-01-26 13:16:05 EST
Update center now has v1.0.7.

Centos/RHEL jenkins image updates in flight.
Comment 5 Gabe Montero 2016-01-28 17:21:46 EST
Both centos (on docker.io) and rhel (ci.dev.openshift.redhat.com:5000/openshift/jenkins-1-rhel7) images are now available with v1.0.7 of the plugin, which has the fix for this defect.

Sending to QA.
Comment 6 wewang 2016-02-14 03:04:58 EST
verified in 
openshift/jenkins-1-rhel7  6c59e19343d0

1. output of console:
Started by user Jenkins Admin
Building in workspace /var/lib/jenkins/jobs/test/workspace
BUILD STEP:  OpenShiftCreator in perform on namespace test1
BUILD STEP EXIT:  OpenShiftCreator resources(s) created
Finished: SUCCESS

2. Check the pods
[root@dhcp-128-91 backup]# oc get pods
NAME              READY     STATUS    RESTARTS   AGE
hello-openshift   1/1       Running   0          3m

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