Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jenkins in minishift sample project fails to start and run builds #173

Closed
goraxe opened this issue Sep 22, 2017 · 18 comments
Closed

jenkins in minishift sample project fails to start and run builds #173

goraxe opened this issue Sep 22, 2017 · 18 comments

Comments

@goraxe
Copy link

goraxe commented Sep 22, 2017

The latest version of the openshift-sync plugin, seems to have broken starting and launching builds.

The following error is seen in the jenkins log

SEVERE: Failed to load initial Builds: io.fabric8.kubernetes.client.KubernetesClientException: Failure executing: GET at: https://kubernetes.default/apis/build.openshift.io/v1/namespaces/myproject/builds?fieldSelector=status%3DNew. Message: No field label conversion function found for version: build.openshift.io/v1. Received status: Status(apiVersion=v1, code=400, details=null, kind=Status, message=No field label conversion function found for version: build.openshift.io/v1, metadata=ListMeta(resourceVersion=null, selfLink=null, additionalProperties={}), reason=BadRequest, status=Failure, additionalProperties={}).
--
  | io.fabric8.kubernetes.client.KubernetesClientException: Failure executing: GET at: https://kubernetes.default/apis/build.openshift.io/v1/namespaces/myproject/builds?fieldSelector=status%3DNew. Message: No field label conversion function found for version: build.openshift.io/v1. Received status: Status(apiVersion=v1, code=400, details=null, kind=Status, message=No field label conversion function found for version: build.openshift.io/v1, metadata=ListMeta(resourceVersion=null, selfLink=null, additionalProperties={}), reason=BadRequest, status=Failure, additionalProperties={}).
  | at io.fabric8.kubernetes.client.dsl.base.OperationSupport.requestFailure(OperationSupport.java:470)
  | at io.fabric8.kubernetes.client.dsl.base.OperationSupport.assertResponseCode(OperationSupport.java:409)
  | at io.fabric8.kubernetes.client.dsl.base.OperationSupport.handleResponse(OperationSupport.java:379)
  | at io.fabric8.kubernetes.client.dsl.base.OperationSupport.handleResponse(OperationSupport.java:343)
  | at io.fabric8.kubernetes.client.dsl.base.OperationSupport.handleResponse(OperationSupport.java:327)
  | at io.fabric8.kubernetes.client.dsl.base.BaseOperation.list(BaseOperation.java:605)
  | at io.fabric8.kubernetes.client.dsl.base.BaseOperation.list(BaseOperation.java:70)
  | at io.fabric8.jenkins.openshiftsync.BuildWatcher$1.doRun(BuildWatcher.java:97)
  | at hudson.triggers.SafeTimerTask.run(SafeTimerTask.java:51)
  | at jenkins.security.ImpersonatingScheduledExecutorService$1.run(ImpersonatingScheduledExecutorService.java:58)
  | at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
  | at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
  | at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
  | at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
  | at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
  | at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
  | at java.lang.Thread.run(Thread.java:748)

dropping down to version 0.1.28 resolved the issue.

openshift v3.6.0+c4dd4cf
kubernetes v1.6.1+5115d708d7

related issue -> openshift/origin#16501

@gabemontero
Copy link

Highlighting the crux of the above expcetion for readability:

Failure executing: GET at: https://kubernetes.default/apis/build.openshift.io/v1/namespaces/myproject/builds?fieldSelector=status%3DNew. Message: No field label conversion function found for version: build.openshift.io/v1. Received status: Status(apiVersion=v1, code=400, details=null, kind=Status, message=No field label conversion function found for version: build.openshift.io/v1, metadata=ListMeta(resourceVersion=null, selfLink=null, additionalProperties={}), reason=BadRequest, status=Failure, additionalProperties={}).

The No field label conversion function found at least at various times has been reported by k8s.io/apimachinery/pkg/runtime/scheme.go

And after a refresh rebase/rebuild from openshift/origin:lates, and then performing something analogous via oc with --loglevel=8, the URI is the more familiar form:

oapi/v1/namespaces/myproject/builds

vs.

apis/build.openshift.io/v1/namespaces/myproject/builds

@deads2k @bparees - I know some reorganization has been going on, but don't know the precise status of where we are at / what should be supported. Based on the details, any inferences from the above details?

@jstrachan - we have started seeing this after bumping to 2.6.2 of fabric8, and going back to 2.3.1 seems to have resolved it. Does this look like something you have run into? (Apologies, don't know where to look to scan for any recent fabric8 bugs/fixes, etc.).

@bparees
Copy link

bparees commented Sep 25, 2017

Looks like the client went to the groups api and got a group api object type back and then didn't know what to do with it. I know @jstrachan was adding groups support to the fabric client but i don't know the state of it. As to why it went to that api instead of the legacy api, probably something related to discovery but not sure of the details.

@bparees
Copy link

bparees commented Sep 25, 2017

Also not sure why our extended tests/plugin tests didn't turn up this problem when we moved up to the newer fabric8 client?

@gabemontero
Copy link

gabemontero commented Sep 25, 2017 via email

@bparees
Copy link

bparees commented Sep 25, 2017

I am wondering that as well. I can only speculate something external
changed some time after we bumped fabric.

i haven't seen any pipeline test failures in the nightly builds runs the last couple days.

@gabemontero
Copy link

gabemontero commented Sep 25, 2017 via email

@deads2k
Copy link

deads2k commented Sep 25, 2017

The No field label conversion function found at least at various times has been reported by k8s.io/apimachinery/pkg/runtime/scheme.go

This was broken in 3.6, but was recently (last week), fixed in 3.7.

@bparees
Copy link

bparees commented Sep 25, 2017

This was broken in 3.6, but was recently (last week), fixed in 3.7.

are we going to fix it in 3.6? if not, what are clients supposed to do?

@gabemontero
Copy link

Bookkeeping: this has also been reported in https://issues.jenkins-ci.org/browse/JENKINS-47093

@gabemontero
Copy link

@deads2k - is openshift/origin@82c48ea the fix you are referring to?

@deads2k
Copy link

deads2k commented Sep 25, 2017

@gabemontero
Copy link

Wow - sure is deep.

Not having digested all those different fixes yet, from the perspective of the fabric8 java client to openshift, and how it might manage to support both 3.6(with the bug) and 3.7(without the bug), is there some sort of query they should make prior to choosing between apis/build.openshift.io/v1/namespaces/myproject/builds and oapi/v1/namespaces/myproject/builds?

Or is the only recourse to retry using the old form based on the particulars of the http response to the new form?

@gabemontero
Copy link

@bparees - re: why we did not see this in the PR testing .... to confirm the prior implication, we bumped the fabric8 version after the last of the pulls @deads2k listed got merged

so we tested against a version of openshift with the fix.

But users testing against 3.6 or early 3.7 alphas don't have the fix

@deads2k
Copy link

deads2k commented Sep 25, 2017

are we going to fix it in 3.6? if not, what are clients supposed to do?

opened openshift/origin#16541 for you.

@gabemontero
Copy link

Thanks @deads2k

@gabemontero
Copy link

I've submitted v0.1.30 to jenkins update center ... will update when it is available

@gabemontero
Copy link

v0.1.30 is available .... updating the openshift jenkins centos as I type

@gabemontero
Copy link

openshift/jenkins#387 will update the openshift jenkins centos image with v0.1.30 of the sync plugin

scoheb added a commit to scoheb/ci-pipeline that referenced this issue Jan 18, 2018
Since v3.7 of openshift, there is the possibility for breakage in
backwards compatibilty when using the v3.7 'oc' command with a 'v3.6'
master.

This change forces us to use the v3.6 oc binary

This is a better practice in any event, since we should not be pointing
to a 'latest' tag.

See openshift/jenkins-sync-plugin#173 and openshift/jenkins#477 for details
scoheb added a commit to CentOS-PaaS-SIG/ci-pipeline that referenced this issue Feb 6, 2018
Since v3.7 of openshift, there is the possibility for breakage in
backwards compatibilty when using the v3.7 'oc' command with a 'v3.6'
master.

This change forces us to use the v3.6 oc binary

This is a better practice in any event, since we should not be pointing
to a 'latest' tag.

See openshift/jenkins-sync-plugin#173 and openshift/jenkins#477 for details
waveywaves pushed a commit to waveywaves/jenkins-sync-plugin that referenced this issue Oct 30, 2019
add blue ocean plugin to centos v2 and bump sync plugin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants