Chao Sun created SPARK-58748:
--------------------------------
Summary: Preserve the advertised driver host when the Kubernetes
driver bind address is a wildcard
Key: SPARK-58748
URL: https://issues.apache.org/jira/browse/SPARK-58748
Project: Spark
Issue Type: Bug
Components: Kubernetes, Spark Core, Connect
Affects Versions: 4.1.0, 4.2.0, 4.3.0, 5.0.0
Reporter: Chao Sun
Assignee: Chao Sun
Fix For: 4.3.0, 5.0.0
SPARK-53944 added {{spark.kubernetes.executor.useDriverPodIP}} to let
Kubernetes executors connect directly to the driver Pod IP. SPARK-57350 enabled
this behavior by default in Spark 4.3.\n\nSome valid Kubernetes deployments,
including Spark Connect servers and other client-mode drivers, bind their RPC
server to all local interfaces while explicitly advertising a separate routable
driver
address:\n\n{code}\nspark.master=k8s://https://kubernetes.example:6443\nspark.driver.bindAddress=0.0.0.0\nspark.driver.host=10.129.36.37\nspark.kubernetes.executor.useDriverPodIP=true\n{code}\n\nBoth
{{SparkContext}} and {{BasicExecutorFeatureStep}} currently substitute
{{spark.driver.bindAddress}} for the advertised {{spark.driver.host}} when
{{useDriverPodIP}} is enabled. This overwrites the routable advertised address
with {{0.0.0.0}} and constructs executor RPC URLs such
as:\n\n{code}\nspark://[email protected]:7078\n{code}\n\nExecutors
cannot register with that unspecified address, so they repeatedly fail and the
application cannot make progress. The same problem applies to IPv6 wildcard
forms such as {{::}}, {{[::]}}, and {{0:0:0:0:0:0:0:0}}.\n\nSpark already
documents {{spark.driver.bindAddress}} and {{spark.driver.host}} as separate
bind and advertised addresses. The driver Pod IP optimization should continue
to use concrete IPv4 and IPv6 bind addresses, including the IPv6 normalization
fixed by SPARK-58719, but should preserve the configured advertised driver host
whenever the bind address is an unspecified/wildcard address. Both driver
address selection sites must agree.\n\nSpark 4.3 is affected by default; Spark
4.1 and 4.2 are affected when users explicitly enable the option.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]