[jira] [Created] (FLINK-15251) Fabric8FlinkKubeClient doesn't work if ingress has hostname but no IP

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Created] (FLINK-15251) Fabric8FlinkKubeClient doesn't work if ingress has hostname but no IP

Shang Yuanchun (Jira)
Aljoscha Krettek created FLINK-15251:
----------------------------------------

             Summary: Fabric8FlinkKubeClient doesn't work if ingress has hostname but no IP
                 Key: FLINK-15251
                 URL: https://issues.apache.org/jira/browse/FLINK-15251
             Project: Flink
          Issue Type: Bug
          Components: Deployment / Kubernetes
    Affects Versions: 1.10.0
         Environment: Kubernetes for Docker on MacOS
            Reporter: Aljoscha Krettek
             Fix For: 1.10.0


In my setup the ingress has a hostname but no IP here: https://github.com/apache/flink/blob/f49e632bb290ded45b320f5d00ceaa1543a6bb1c/flink-kubernetes/src/main/java/org/apache/flink/kubernetes/kubeclient/Fabric8FlinkKubeClient.java#L199

This means that when I try to use the Kubernetes Executor I will get
{code}
Exception in thread "main" java.lang.NullPointerException: Address should not be null.
        at org.apache.flink.util.Preconditions.checkNotNull(Preconditions.java:75)
        at org.apache.flink.kubernetes.kubeclient.Endpoint.<init>(Endpoint.java:33)
        at org.apache.flink.kubernetes.kubeclient.Fabric8FlinkKubeClient.getRestEndpoint(Fabric8FlinkKubeClient.java:209)
        at org.apache.flink.kubernetes.KubernetesClusterDescriptor.lambda$createClusterClientProvider$0(KubernetesClusterDescriptor.java:82)
        at org.apache.flink.kubernetes.KubernetesClusterDescriptor.retrieve(KubernetesClusterDescriptor.java:106)
        at org.apache.flink.kubernetes.KubernetesClusterDescriptor.retrieve(KubernetesClusterDescriptor.java:53)
        at org.apache.flink.client.deployment.AbstractSessionClusterExecutor.execute(AbstractSessionClusterExecutor.java:60)
        at org.apache.flink.streaming.api.environment.StreamExecutionEnvironment.executeAsync(StreamExecutionEnvironment.java:1741)
        at org.apache.flink.streaming.api.environment.StreamExecutionEnvironment.executeAsync(StreamExecutionEnvironment.java:1712)
        at org.apache.flink.streaming.examples.statemachine.StateMachineExample.main(StateMachineExample.java:169)
{code}

I think we can just check if a hostname is set and use that if there is no IP.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)