Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SPARK-31786][K8S][BUILD][2.4] Upgrade kubernetes-client to 4.9.2 #28625

Closed
wants to merge 1 commit into from
Closed

[SPARK-31786][K8S][BUILD][2.4] Upgrade kubernetes-client to 4.9.2 #28625

wants to merge 1 commit into from

Conversation

dongjoon-hyun
Copy link
Member

What changes were proposed in this pull request?

This PR aims to upgrade kubernetes-client library to bring the JDK8 related fixes. Please note that JDK11 works fine without any problem.

Why are the changes needed?

OkHttp "wrongly" detects the Platform as Jdk9Platform on JDK 8u251.

Although there is a workaround export HTTP2_DISABLE=true and Downgrade JDK or K8s, we had better avoid this problematic situation.

Does this PR introduce any user-facing change?

No. This will recover the failures on JDK 8u252.

How was this patch tested?

  • Pass the Jenkins UT
  • Pass the Jenkins K8S IT with the K8s 1.13
  • Manual testing with K8s 1.17.3.

This PR aims to upgrade `kubernetes-client` library to bring the JDK8 related fixes. Please note that JDK11 works fine without any problem.
- https://github.com/fabric8io/kubernetes-client/releases/tag/v4.9.2
  - JDK8 always uses http/1.1 protocol (Prevent OkHttp from wrongly enabling http/2)

OkHttp "wrongly" detects the Platform as Jdk9Platform on JDK 8u251.
- fabric8io/kubernetes-client#2212
- https://stackoverflow.com/questions/61565751/why-am-i-not-able-to-run-sparkpi-example-on-a-kubernetes-k8s-cluster

Although there is a workaround `export HTTP2_DISABLE=true` and `Downgrade JDK or K8s`, we had better avoid this problematic situation.

No. This will recover the failures on JDK 8u252.

- [x] Pass the Jenkins UT (#28601 (comment))
- [x] Pass the Jenkins K8S IT with the K8s 1.13 (#28601 (comment))
- [x] Manual testing with K8s 1.17.3. (Below)

**v1.17.6 result (on Minikube)**
```
KubernetesSuite:
- Run SparkPi with no resources
- Run SparkPi with a very long application name.
- Use SparkLauncher.NO_RESOURCE
- Run SparkPi with a master URL without a scheme.
- Run SparkPi with an argument.
- Run SparkPi with custom labels, annotations, and environment variables.
- All pods have the same service account by default
- Run extraJVMOptions check on driver
- Run SparkRemoteFileTest using a remote data file
- Run SparkPi with env and mount secrets.
- Run PySpark on simple pi.py example
- Run PySpark with Python2 to test a pyfiles example
- Run PySpark with Python3 to test a pyfiles example
- Run PySpark with memory customization
- Run in client mode.
- Start pod creation from template
- PVs with local storage
- Launcher client dependencies
- Test basic decommissioning
Run completed in 8 minutes, 27 seconds.
Total number of tests run: 19
Suites: completed 2, aborted 0
Tests: succeeded 19, failed 0, canceled 0, ignored 0, pending 0
All tests passed.
```

Closes #28601 from dongjoon-hyun/SPARK-K8S-CLIENT.

Authored-by: Dongjoon Hyun <dongjoon@apache.org>
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
(cherry picked from commit 64ffc66)
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
(cherry picked from commit f05a26a)
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
@SparkQA
Copy link

SparkQA commented May 24, 2020

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/27683/

@SparkQA
Copy link

SparkQA commented May 24, 2020

Kubernetes integration test status failure
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/27683/

@dongjoon-hyun
Copy link
Member Author

We are hitting jackson-core 2.10.0 incompatibility issue.
Since we cannot upgrade Jackson dependency in Apache Spark 2.4, I'll close this PR.

@dongjoon-hyun dongjoon-hyun changed the title [SPARK-31786][K8S][BUILD] Upgrade kubernetes-client to 4.9.2 [SPARK-31786][K8S][BUILD][2.4] Upgrade kubernetes-client to 4.9.2 May 24, 2020
@dongjoon-hyun
Copy link
Member Author

cc @holdenk since this PR is closed.
I removed the Target Version: 2.4.6 from SPARK-31786.

@holdenk
Copy link
Contributor

holdenk commented May 24, 2020

Thanks for working on this, those Jackson issues are painful :(

@SparkQA
Copy link

SparkQA commented May 24, 2020

Test build #123040 has finished for PR 28625 at commit 8bbc46a.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

dongjoon-hyun added a commit that referenced this pull request May 26, 2020
…/K8s 1.17 and update integration test cases

### What changes were proposed in this pull request?

This PR aims to add a workaround `HTTP2_DISABLE=true` to the document and to update the K8s integration test.

### Why are the changes needed?

SPARK-31786 reported fabric8 kubernetes-client library fails to talk K8s 1.17.x client on Java 8u251+ environment. It's fixed at Apache Spark 3.0.0 by upgrading the library, but it turns out that we can not use the same way in `branch-2.4` (#28625)

### Does this PR introduce _any_ user-facing change?

Yes. This will provide a workaround at the document and testing environment.

### How was this patch tested?

This PR is irrelevant to Jenkins UT because it's only updating docs and integration tests. We need to the followings.
- [x] Pass the Jenkins K8s IT with old JDK8 and K8s versions (#28638 (comment))
- [x] Manually run K8s IT on K8s 1.17/Java 8u251+ with `export HTTP2_DISABLE=true`.

**K8s v1.17.6 / JDK 1.8.0_252**
```
KubernetesSuite:
- Run SparkPi with no resources
- Run SparkPi with a very long application name.
- Use SparkLauncher.NO_RESOURCE
- Run SparkPi with a master URL without a scheme.
- Run SparkPi with an argument.
- Run SparkPi with custom labels, annotations, and environment variables.
- Run extraJVMOptions check on driver
- Run SparkRemoteFileTest using a remote data file
- Run SparkPi with env and mount secrets.
- Run PySpark on simple pi.py example
- Run PySpark with Python2 to test a pyfiles example
- Run PySpark with Python3 to test a pyfiles example
- Run PySpark with memory customization
- Run in client mode.
Run completed in 5 minutes, 7 seconds.
Total number of tests run: 14
Suites: completed 2, aborted 0
Tests: succeeded 14, failed 0, canceled 0, ignored 0, pending 0
All tests passed.
```

Closes #28638 from dongjoon-hyun/SPARK-31819.

Authored-by: Dongjoon Hyun <dongjoon@apache.org>
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
@dongjoon-hyun dongjoon-hyun deleted the SPARK-31786-2.4 branch June 4, 2020 22:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants