Skip to content
This repository has been archived by the owner on Jul 23, 2020. It is now read-only.

Pipeline build failed with Error during kubernetes apply: java.lang.NullPointerException #4517

Closed
ljelinkova opened this issue Nov 2, 2018 · 32 comments · Fixed by openshiftio/saas-openshiftio#1145

Comments

@ljelinkova
Copy link
Collaborator

ljelinkova commented Nov 2, 2018

Issue Overview

One e2e test failed on cluster 2a when building pipeline with Spring Boot booster with the following error

Error during kubernetes apply: java.lang.NullPointerException
	at io.fabric8.kubernetes.pipeline.devops.ApplyStepExecution.findPluginClass(ApplyStepExecution.java:596)
	at io.fabric8.kubernetes.pipeline.devops.ApplyStepExecution.findOpenShiftBuildConfigName(ApplyStepExecution.java:527)
	at io.fabric8.kubernetes.pipeline.devops.ApplyStepExecution.run(ApplyStepExecution.java:182)
	at io.fabric8.kubernetes.pipeline.devops.ApplyStepExecution.run(ApplyStepExecution.java:90)
	at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousStepExecution.start(AbstractSynchronousStepExecution.java:42)
	at org.jenkinsci.plugins.workflow.cps.DSL.invokeStep(DSL.java:270)
	at org.jenkinsci.plugins.workflow.cps.DSL.invokeMethod(DSL.java:178)
	at org.jenkinsci.plugins.workflow.cps.CpsScript.invokeMethod(CpsScript.java:122)

You can see the whole Jenkins log here:
http://artifacts.ci.centos.org/devtools/e2e/devtools-test-e2e-openshift.io-smoketest-us-east-2a-released/973/05-05-jenkins-log.html

And more artifacts and logs here
http://artifacts.ci.centos.org/devtools/e2e/devtools-test-e2e-openshift.io-smoketest-us-east-2a-released/973/

@ppitonak
Copy link
Collaborator

ppitonak commented Nov 8, 2018

Appeared 5 times today (100% of test failures), most recent one is https://ci.centos.org/job/devtools-test-e2e-openshift.io-smoketest-us-east-2a-released/1010/

@sbose78
Copy link
Collaborator

sbose78 commented Nov 8, 2018

Does it work outside the tests, when tried out manually?

@hrishin
Copy link

hrishin commented Nov 8, 2018

Does it work outside the tests, when tried out manually?

yes. Somehow its intermittent ATM.

@hrishin
Copy link

hrishin commented Nov 8, 2018

@ppitonak I suspect(rare chance though) new Jenkins image could be breaking it.
All builds are failing for jenkins-openshift:v03b76a3 and kubernetesApply get execute on Jenkins node.

Could you try fabric8/jenkins-openshift:va519389 or fabric8/jenkins-openshift:v87522af Jenkins images for e2e test.

@ppitonak
Copy link
Collaborator

ppitonak commented Nov 8, 2018

How can I do that?

@hrishin
Copy link

hrishin commented Nov 8, 2018

@ppitonak

By editing DeploymentConfig

Eaither by OpenShift web console or oc edit dc/jenkins -n <jenkins-namespace>

@sthaha
Copy link
Collaborator

sthaha commented Nov 8, 2018

@hrishin that isn't an option when running e2e tests.

@hrishin hrishin self-assigned this Nov 8, 2018
@hrishin
Copy link

hrishin commented Nov 8, 2018

@ppitonak we can see some failures for va519389. Shall we try v87522af?

@hrishin
Copy link

hrishin commented Nov 9, 2018

@ppitonak @ljelinkova Note : a Jenkins update is available with new tenant deployments.

@ppitonak
Copy link
Collaborator

ppitonak commented Nov 9, 2018

Last failure had these versions:

oc get -o custom-columns=NAME:.metadata.name,LABELS_VERSION:.metadata.labels.version deploymentconfigs
NAME      LABELS_VERSION
jenkins   61661dc
image: fabric8/jenkins-openshift:v541889d

What is the new version?

@hrishin
Copy link

hrishin commented Nov 13, 2018

@ppitonak v541889d is the new version.

@ppitonak
Copy link
Collaborator

OK, we are using the latest version of Jenkins, what's next?

@hrishin
Copy link

hrishin commented Nov 13, 2018

@ppitonak we working on this issue. Appears like the new image might have broken some plugins dependencies which in turn causing this issue.

@ljelinkova
Copy link
Collaborator Author

@piyush-garg
Copy link
Collaborator

piyush-garg commented Nov 19, 2018

@ppitonak @ljelinkova Update on this issue, this is coming from upstream plugin and waiting for this PR jenkinsci/kubernetes-pipeline-plugin#70 to get merged cc @hrishin @sthaha

hrishin added a commit to hrishin/openshift-jenkins-s2i-config that referenced this issue Nov 20, 2018
`apply` step is failing intermediately with
NullPointerException (NPE) in devops-steps
plugin

This patch fixes NPE issue in devops-step plugin

Build:
- jenkinsci/kubernetes-pipeline-plugin@bb6d52b

Fixes
 - openshiftio/openshift.io#4517
hrishin added a commit to hrishin/openshift-jenkins-s2i-config that referenced this issue Nov 21, 2018
`apply` step is failing intermediately with
NullPointerException (NPE) in devops-steps
plugin

This patch fixes NPE issue in devops-step plugin

Devops Step plugin build:
- jenkinsci/kubernetes-pipeline-plugin@bb6d52b

Fixes
 - openshiftio/openshift.io#4517

new build test

test pr-build for plugin

fixes ansicolor dependency

fixes ansicolor dependency
hrishin added a commit to hrishin/openshift-jenkins-s2i-config that referenced this issue Nov 21, 2018
`apply` step is failing intermediately with
NullPointerException (NPE) in devops-steps
plugin

This patch fixes NPE issue in devops-step plugin

Devops Step plugin build:
- jenkinsci/kubernetes-pipeline-plugin@bb6d52b

Fixes
 - openshiftio/openshift.io#4517
@piyush-garg
Copy link
Collaborator

piyush-garg commented Nov 23, 2018

This has been fixed with openshiftio/saas-openshiftio#1145

@hrishin
Copy link

hrishin commented Nov 23, 2018

Update

This issue has been fixed in devops-steps plugin. We have updated the Jenkins image with plugin and we will rollout tenants updates soon.

Meanwhile to test this patch could you do update tenant then reset environment through osio profile and run 2e2 tests? @ljelinkova @ppitonak

Thanks @chmouel @piyush-garg

@hrishin hrishin reopened this Nov 26, 2018
@ljelinkova
Copy link
Collaborator Author

Is the fix already in production? I didn't do any tenant update but we do reset the environment every run. Jenkins version is 9a1fbb4.

E2E tests are unusually green in the last few days and I haven't seen this issue anymore. So if you confirm that the fix is in production we can close this issue.

@piyush-garg
Copy link
Collaborator

@ljelinkova This PR has been moved to prod, but it's still not available for every user. Any user who does reset environment or update tenant, the user will get these changes. Jenkins image tag should be vd38332c and Jenkins version should be 9a1fbb4 to have these changes. These changes have been moved to prod on Friday 23 November. Tenant update is still pending to reflect it for all user. Hope this helps. Thanks

@ppitonak
Copy link
Collaborator

Is mass tenant update done?

@piyush-garg
Copy link
Collaborator

@ppitonak Cluster-wide tenant update is still pending.

@hrishin
Copy link

hrishin commented Dec 3, 2018

Update

Tenant update is scheduled for Monday 3 Dec.

@ljelinkova
Copy link
Collaborator Author

The E2E tests do not encounter this issue any more so I am closing this issue now and not waiting for tenant update.

@piyush-garg
Copy link
Collaborator

@ljelinkova Whenever you do reset environment, then Jenkins comes up with latest tenant properties. This is not the case for all users, we need do that for all user. In e2e test, we reset the environment that's why no error is shown there. Ideally, we should wait for tenant update to reflect the changes for all users. Thanks

@piyush-garg piyush-garg reopened this Dec 4, 2018
@ppitonak
Copy link
Collaborator

ppitonak commented Dec 4, 2018

@piyush-garg makes sense. However, @hrishin wrote earlier that tenant update was scheduled on Dec 3, was it postponed?

@piyush-garg
Copy link
Collaborator

@ppitonak It was scheduled on 3 dec but postponed because of a blocking issue #4568

@chmouel
Copy link

chmouel commented Dec 13, 2018

We are planning to schedule now a tenant update since #4568 is ready to roll, @hrishin is on it,

@ppitonak
Copy link
Collaborator

Any updates?

@hrishin
Copy link

hrishin commented Dec 18, 2018 via email

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants