spark icon indicating copy to clipboard operation
spark copied to clipboard

[SPARK-39399] [CORE] [K8S]: Fix proxy-user authentication for Spark on k8s in cluster deploy mode

Open shrprasa opened this issue 2 years ago • 2 comments

What changes were proposed in this pull request?

The PR fixes the authentication failure of the proxy user on driver side while accessing kerberized hdfs through spark on k8s job. It follows the similar approach as it was done for Mesos: https://github.com/mesosphere/spark/pull/26

Why are the changes needed?

When we try to access the kerberized HDFS through a proxy user in Spark Job running in cluster deploy mode with Kubernetes resource manager, we encounter AccessControlException. This is because authentication in driver is done using tokens of the proxy user and since proxy user doesn't have any delegation tokens on driver, auth fails.

Further details: https://issues.apache.org/jira/browse/SPARK-25355?focusedCommentId=17532063&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-17532063

https://issues.apache.org/jira/browse/SPARK-25355?focusedCommentId=17532135&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-17532135

Does this PR introduce any user-facing change?

Yes, user will now be able to use proxy-user to access kerberized hdfs with Spark on K8s.

How was this patch tested?

The patch was tested by:

  1. Running job which accesses kerberized hdfs with proxy user in cluster mode and client mode with kubernetes resource manager.

  2. Running job which accesses kerberized hdfs without proxy user in cluster mode and client mode with kubernetes resource manager.

  3. Build and run test github action : https://github.com/shrprasa/spark/actions/runs/3051203625

shrprasa avatar Sep 14 '22 15:09 shrprasa

Can one of the admins verify this patch?

AmplabJenkins avatar Sep 15 '22 04:09 AmplabJenkins

ping @yaooqinn

pan3793 avatar Sep 29 '22 05:09 pan3793

+CC @squito, @HyukjinKwon

mridulm avatar Sep 29 '22 06:09 mridulm

ping @gaborgsomogyi @dongjoon-hyun @HyukjinKwon @squito

shrprasa avatar Oct 28 '22 10:10 shrprasa

+CC @Ngone51 , @HyukjinKwon

mridulm avatar Feb 17 '23 14:02 mridulm

ping @holdenk

shrprasa avatar Feb 27 '23 18:02 shrprasa

Gentle ping @holdenk @dongjoon-hyun @Ngone51 , @HyukjinKwon

shrprasa avatar Mar 03 '23 18:03 shrprasa

Gentle ping @holdenk @dongjoon-hyun @Ngone51 , @HyukjinKwon

shrprasa avatar Mar 07 '23 05:03 shrprasa

@holdenk Thanks for approving the PR. Can you please merge this PR or tag someone who can do it?

shrprasa avatar Mar 07 '23 13:03 shrprasa

thanks @shrprasa @holdenk, merged to master and brand-3.4/3.3/3.2

yaooqinn avatar Mar 08 '23 03:03 yaooqinn

Thanks @yaooqinn for merging the PR.

shrprasa avatar Mar 08 '23 05:03 shrprasa

Thank you, @shrprasa and all!

dongjoon-hyun avatar Mar 08 '23 22:03 dongjoon-hyun

cc @kazuyukitanimura , too

dongjoon-hyun avatar Mar 08 '23 22:03 dongjoon-hyun