You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2022/05/27 12:37:25 UTC

[GitHub] [camel-quarkus] aldettinger opened a new issue, #3816: master: KubernetesClusterService fails in native mode with Lease in version "v1" cannot be handled as a Lease: json: cannot unmarshal number into Go struct field LeaseSpec.spec.acquireTime of type string

aldettinger opened a new issue, #3816:
URL: https://github.com/apache/camel-quarkus/issues/3816

   When using the master extension in native mode, the `KubernetesClusterService` may not work properly and issue some DEBUG logs as below:
   ```
   2022-05-26 11:21:05,985 DEBUG [org.apa.cam.com.kub.clu.loc.KubernetesLeadershipController] (Camel (camel-1) thread #1 - CamelKubernetesLeadershipController) Pod[code-with-quarkus-1-4dt7d] Exception while trying to create the lease resource: io.fabric8.kubernetes.client.KubernetesClientException: Failure executing: POST at: https://172.30.0.1/apis/coordination.k8s.io/v1/namespaces/default/leases. Message: Lease in version "v1" cannot be handled as a Lease: json: cannot unmarshal number into Go struct field LeaseSpec.spec.acquireTime of type string. Received status: Status(apiVersion=v1, code=400, details=null, kind=Status, message=Lease in version "v1" cannot be handled as a Lease: json: cannot unmarshal number into Go struct field LeaseSpec.spec.acquireTime of type string, metadata=ListMeta(_continue=null, remainingItemCount=null, resourceVersion=null, selfLink=null, additionalProperties={}), reason=BadRequest, status=Failure, additionalProperties={}).
   at io.fabric8.kubernetes.client.dsl.base.OperationSupport.requestFailure(OperationSupport.java:682)
   at io.fabric8.kubernetes.client.dsl.base.OperationSupport.requestFailure(OperationSupport.java:661)
   at io.fabric8.kubernetes.client.dsl.base.OperationSupport.assertResponseCode(OperationSupport.java:612)
   at io.fabric8.kubernetes.client.dsl.base.OperationSupport.handleResponse(OperationSupport.java:555)
   at io.fabric8.kubernetes.client.dsl.base.OperationSupport.handleResponse(OperationSupport.java:518)
   at io.fabric8.kubernetes.client.dsl.base.OperationSupport.handleCreate(OperationSupport.java:305)
   at io.fabric8.kubernetes.client.dsl.base.BaseOperation.handleCreate(BaseOperation.java:644)
   at io.fabric8.kubernetes.client.dsl.base.BaseOperation.handleCreate(BaseOperation.java:83)
   at io.fabric8.kubernetes.client.dsl.base.CreateOnlyResourceOperation.create(CreateOnlyResourceOperation.java:61)
   at org.apache.camel.component.kubernetes.cluster.lock.impl.NativeLeaseResourceManager.createNewLeaseResource(NativeLeaseResourceManager.java:95)
   at org.apache.camel.component.kubernetes.cluster.lock.impl.NativeLeaseResourceManager.createNewLeaseResource(NativeLeaseResourceManager.java:29)
   at org.apache.camel.component.kubernetes.cluster.lock.KubernetesLeadershipController.tryAcquireLeadership(KubernetesLeadershipController.java:415)
   at org.apache.camel.component.kubernetes.cluster.lock.KubernetesLeadershipController.refreshStatusNotLeader(KubernetesLeadershipController.java:165)
   at org.apache.camel.component.kubernetes.cluster.lock.KubernetesLeadershipController.refreshStatus(KubernetesLeadershipController.java:130)
   at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
   at java.util.concurrent.FutureTask.run(FutureTask.java:264)
   at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
   at java.lang.Thread.run(Thread.java:829)
   at com.oracle.svm.core.thread.JavaThreads.threadStartRoutine(JavaThreads.java:600)
   at com.oracle.svm.core.posix.thread.PosixJavaThreads.pthreadStartRoutine(PosixJavaThreads.java:192)
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel-quarkus] jamesnetherton closed issue #3816: KubernetesClusterService fails to create Lease resource

Posted by GitBox <gi...@apache.org>.
jamesnetherton closed issue #3816: KubernetesClusterService fails to create Lease resource
URL: https://github.com/apache/camel-quarkus/issues/3816


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel-quarkus] jamesnetherton commented on issue #3816: KubernetesClusterService fails to create Lease resource

Posted by GitBox <gi...@apache.org>.
jamesnetherton commented on issue #3816:
URL: https://github.com/apache/camel-quarkus/issues/3816#issuecomment-1147094383

   Already fixed in Quarkus, thus no need for any workaround.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel-quarkus] aldettinger commented on issue #3816: master: KubernetesClusterService fails in native mode with Lease in version "v1" cannot be handled as a Lease: json: cannot unmarshal number into Go struct field LeaseSpec.spec.acquireTime of type string

Posted by GitBox <gi...@apache.org>.
aldettinger commented on issue #3816:
URL: https://github.com/apache/camel-quarkus/issues/3816#issuecomment-1139581526

   There is quarkus ticket to investigate and fix this: https://github.com/quarkusio/quarkus/issues/25829.
   
   Meanwhile, a possible workaround is to register `LeaseSpec.class` and `Lease.class` to allow field access by reflection manually, e.g:
   ```
   @RegisterForReflection(targets = {
           LeaseSpec.class,
           Lease.class
   })
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org