[
https://issues.apache.org/jira/browse/FLINK-22933?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17360276#comment-17360276
]
Fuyao Li commented on FLINK-22933:
----------------------------------
[~fly_in_gis] Thanks for the reply. I have tried to use 5.4.0 in the kubernetes
operator. The error stack trace is printed under such condition. As you can see
in the stacktrace, the error is thrown from a Flink implementation for
ApplicationClusterDeployer
{code:java}
org.apache.flink.client.deployment.application.cli.ApplicationClusterDeployer.run(ApplicationClusterDeployer.java:67)
{code}
The 5.x API seems to require some additional method implementation and Flink
internally doesn't implement that. I can compile the code and this
java.lang.AbstractMethodError
error happens during run time.
According to the java doc below.
[https://docs.oracle.com/javase/7/docs/api/java/lang/AbstractMethodError.html|https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/AbstractMethodError.html]
It is caused by APIs changes and that causes incompatible issues.
I am not sure if such problem is possible to be solved by shading? Even I use
shading, the Flink code is stilling trying to call the 4.x API version and I
guess it could still run into the same issue. I am not very sure about the
exact shade strategy you want to take, If I use maven, how should I draft the
pom.xml to get it shaded correctly from your perspective?
I have attached my current maven [^pom.xml], could you edit it and send me a
version you think that should work? Really appreciate it. Thanks.
> Upgrade the Flink Fabric8io/kubernetes-client version to >=5.4.0 to be FIPS
> compliant
> -------------------------------------------------------------------------------------
>
> Key: FLINK-22933
> URL: https://issues.apache.org/jira/browse/FLINK-22933
> Project: Flink
> Issue Type: Improvement
> Components: Deployment / Kubernetes
> Affects Versions: 1.13.0, 1.13.1
> Reporter: Fuyao Li
> Priority: Critical
> Fix For: 1.14.0
>
> Attachments: pom.xml
>
>
> The current Fabric8io version in Flink is 4.9.2
> See link:
> [https://github.com/apache/flink/blob/master/flink-kubernetes/pom.xml#L35]
> This version of Fabric8io library is not FIPS compliant
> ([https://www.sdxcentral.com/security/definitions/what-does-mean-fips-compliant/).]
> Such function is added in Fabric8io recently. See links below.
> [https://github.com/fabric8io/kubernetes-client/pull/2788]
> [https://github.com/fabric8io/kubernetes-client/issues/2732]
>
> I am trying to write a native kubernetes operator leveraging APIs and
> interfaces provided by Flink source code. For example, ApplicationDeployer.
> I am writing my own implementation based on Yang's example code:
> [https://github.com/wangyang0918/flink-native-k8s-operator]
>
> Using version 4.9.2 for my operator will be working perfectly, but it could
> cause FIPS compliant issues.
>
> Using version 5.4.0 will run into issues since Fabric8io version 4 and
> version 5 API is not that compatible. I saw errors below.
> {code:java}
> Exception in thread "main" java.lang.AbstractMethodError: Receiver class
> io.fabric8.kubernetes.client.handlers.ServiceHandler does not define or
> inherit an implementation of the resolved method 'abstract java.lang.Object
> create(okhttp3.OkHttpClient, io.fabric8.kubernetes.client.Config,
> java.lang.String, java.lang.Object, boolean)' of interface
> io.fabric8.kubernetes.client.ResourceHandler.Exception in thread "main"
> java.lang.AbstractMethodError: Receiver class
> io.fabric8.kubernetes.client.handlers.ServiceHandler does not define or
> inherit an implementation of the resolved method 'abstract java.lang.Object
> create(okhttp3.OkHttpClient, io.fabric8.kubernetes.client.Config,
> java.lang.String, java.lang.Object, boolean)' of interface
> io.fabric8.kubernetes.client.ResourceHandler. at
> io.fabric8.kubernetes.client.utils.CreateOrReplaceHelper.lambda$createOrReplaceItem$0(CreateOrReplaceHelper.java:77)
> at
> io.fabric8.kubernetes.client.utils.CreateOrReplaceHelper.createOrReplace(CreateOrReplaceHelper.java:56)
> at
> io.fabric8.kubernetes.client.utils.CreateOrReplaceHelper.createOrReplaceItem(CreateOrReplaceHelper.java:91)
> at
> io.fabric8.kubernetes.client.dsl.internal.NamespaceVisitFromServerGetWatchDeleteRecreateWaitApplicableListImpl.createOrReplaceOrDeleteExisting(NamespaceVisitFromServerGetWatchDeleteRecreateWaitApplicableListImpl.java:454)
> at
> io.fabric8.kubernetes.client.dsl.internal.NamespaceVisitFromServerGetWatchDeleteRecreateWaitApplicableListImpl.createOrReplace(NamespaceVisitFromServerGetWatchDeleteRecreateWaitApplicableListImpl.java:297)
> at
> io.fabric8.kubernetes.client.dsl.internal.NamespaceVisitFromServerGetWatchDeleteRecreateWaitApplicableListImpl.createOrReplace(NamespaceVisitFromServerGetWatchDeleteRecreateWaitApplicableListImpl.java:66)
> at
> org.apache.flink.kubernetes.kubeclient.Fabric8FlinkKubeClient.createJobManagerComponent(Fabric8FlinkKubeClient.java:113)
> at
> org.apache.flink.kubernetes.KubernetesClusterDescriptor.deployClusterInternal(KubernetesClusterDescriptor.java:274)
> at
> org.apache.flink.kubernetes.KubernetesClusterDescriptor.deployApplicationCluster(KubernetesClusterDescriptor.java:208)
> at
> org.apache.flink.client.deployment.application.cli.ApplicationClusterDeployer.run(ApplicationClusterDeployer.java:67)
> at
> org.apache.flink.kubernetes.operator.controller.FlinkApplicationController.reconcile(FlinkApplicationController.java:207)
> at
> org.apache.flink.kubernetes.operator.controller.FlinkApplicationController.run(FlinkApplicationController.java:172)
> at
> org.apache.flink.kubernetes.operator.KubernetesOperatorEntrypoint.main(KubernetesOperatorEntrypoint.java:74)2021-06-08
> 19:53:57,726 WARN
> io.fabric8.kubernetes.client.dsl.internal.WatcherWebSocketListener [] - Exec
> Failure
> {code}
> Since Fabric8io has fixed this issue, maybe we can bump the version in Flink
> to 5.4.0 or 5.4.1 that is released recently? I think this might require some
> code changes since version 4 and version 5 is not that compatible.
>
> This will also bring additional benefits since users will be able to leverage
> new APIs provided in >=5.4.0 version if anyone need to build operators upon
> this.
> See changelog:
> [https://github.com/fabric8io/kubernetes-client/blob/master/CHANGELOG.md]
>
> cc [~fly_in_gis] [~rmetzger]
>
>
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)