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-28938][K8S] Move to supported OpenJDK docker image for Kubernetes #26037

Closed
wants to merge 3 commits into from

Conversation

viirya
Copy link
Member

@viirya viirya commented Oct 6, 2019

What changes were proposed in this pull request?

The current docker image used by Kubernetes is openjdk:8-alpine. It was not supported and was removed with the commit docker-library/openjdk@3eb0351#diff-f95ffa3d1377774732c33f7b8368e099.

This PR proposes to move to a supported docker image.

Why are the changes needed?

I think there are at least two reasons:

  1. According to the commit, Alpine/musl is not officially supported by the OpenJDK project.
  2. As no more OpenJDK 8 Alpine images, new JDK updates including security fixes
    , are not applied to it. See below:
docker run -it --rm openjdk:8-alpine java -version
openjdk version "1.8.0_212"
OpenJDK Runtime Environment (IcedTea 3.12.0) (Alpine 8.212.04-r0)
OpenJDK 64-Bit Server VM (build 25.212-b04, mixed mode)
docker run -it --rm openjdk:8-jdk-slim java -version
openjdk version "1.8.0_222"
OpenJDK Runtime Environment (build 1.8.0_222-b10)
OpenJDK 64-Bit Server VM (build 25.222-b10, mixed mode)

Does this PR introduce any user-facing change?

Yes. This changes the base docker image of Spark.

How was this patch tested?

Existing tests.

@SparkQA

This comment has been minimized.

@dongjoon-hyun dongjoon-hyun changed the title [SPARK-28938][Kubernetes] Move to supported OpenJDK docker image for Kubernetes [SPARK-28938][K8S] Move to supported OpenJDK docker image for Kubernetes Oct 6, 2019
@dongjoon-hyun
Copy link
Member

Thank you for making a PR, @viirya . K8s Integration test seems to be not triggered here. Did you test the K8s IT locally?

@dongjoon-hyun
Copy link
Member

Retest this please.

@viirya
Copy link
Member Author

viirya commented Oct 6, 2019

Hmm, I was thinking to run the integration test on Jenkins. At least I remember I saw it in previous PRs.

@dongjoon-hyun
Copy link
Member

Yes. It's weird to me, too.

@dongjoon-hyun
Copy link
Member

I checked the Jenkins. And, found that it's running here.

@SparkQA

This comment has been minimized.

@viirya
Copy link
Member Author

viirya commented Oct 6, 2019

oh, thanks. @dongjoon-hyun. Seems Jenkins also posted the comment of Kubernetes integration test too.

@dongjoon-hyun
Copy link
Member

Let's see the result~ 😄

@SparkQA

This comment has been minimized.

@SparkQA

This comment has been minimized.

@dongjoon-hyun
Copy link
Member

Could you check the K8s IT failure?

Copy link
Member

@dongjoon-hyun dongjoon-hyun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix python/Docker file, too. There might be more dependency images in R.
And, could you run K8s IT locally before updating this PR please?

@viirya
Copy link
Member Author

viirya commented Oct 6, 2019

@dongjoon-hyun Thanks. Updated Python and R Docker files. Let's see K8s IT result with latest change. If it has failure, I will change to a local environment which can run K8s IT. (current local env cannot)

@SparkQA

This comment has been minimized.

Copy link
Member

@dongjoon-hyun dongjoon-hyun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems that there are two failures.

  • R (Please see pandoc error in Jenkins log. It might be irrelevant to this one.)
  • Python (I hit this locally.)
ensurepip is disabled in Debian/Ubuntu for the system python.

Python modules For the system python are usually handled by dpkg and apt-get.

    apt-get install python-<module name>

Install the python-pip package to use pip itself.  Using pip together
with the system python might have unexpected results for any system installed
module, so use it on your own risk, or make sure to only use it in virtual
environments.

The command '/bin/sh -c apt install -y python &&     apt install -y python3 &&     python -m ensurepip &&     python3 -m ensurepip &&     rm -r /usr/lib/python*/ensurepip &&     pip install --upgrade pip setuptools &&     rm -r /root/.cache && rm -rf /var/cache/apt/*' returned a non-zero code: 1
Failed to build PySpark Docker image, please refer to Docker build output for details.

@viirya
Copy link
Member Author

viirya commented Oct 6, 2019

About R (Please see pandoc error in Jenkins log. It might be irrelevant to this one.), I think it is happened before K8s IT stuff, according to the log.

There is another ongoing K8s IT build. Let's see the latest result and do necessary change if it needs.

@SparkQA

This comment has been minimized.

@SparkQA

This comment has been minimized.

@viirya
Copy link
Member Author

viirya commented Oct 6, 2019

And yes, ensurepip is a problem. Let me update and test locally.

@SparkQA
Copy link

SparkQA commented Oct 7, 2019

Test build #111833 has finished for PR 26037 at commit 83584ed.

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

@SparkQA
Copy link

SparkQA commented Oct 7, 2019

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

@SparkQA
Copy link

SparkQA commented Oct 7, 2019

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

Copy link
Member

@dongjoon-hyun dongjoon-hyun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1, LGTM. Thank you, @viirya .
Merged to master.

@dongjoon-hyun
Copy link
Member

dongjoon-hyun commented Oct 7, 2019

Could you make a backport PR to branch-2.4, @viirya ?

@viirya
Copy link
Member Author

viirya commented Oct 7, 2019 via email

raiju pushed a commit to raiju/spark that referenced this pull request Oct 31, 2019
The current docker image used by Kubernetes is `openjdk:8-alpine`. It was not supported and  was removed with the commit docker-library/openjdk@3eb0351#diff-f95ffa3d1377774732c33f7b8368e099.

This PR proposes to move to a supported docker image.

I think there are at least two reasons:

1. According to the commit, Alpine/musl is not officially supported by the OpenJDK project.
2. As no more OpenJDK 8 Alpine images, new JDK updates including security fixes
, are not applied to it. See below:

```
docker run -it --rm openjdk:8-alpine java -version
openjdk version "1.8.0_212"
OpenJDK Runtime Environment (IcedTea 3.12.0) (Alpine 8.212.04-r0)
OpenJDK 64-Bit Server VM (build 25.212-b04, mixed mode)
```
```
docker run -it --rm openjdk:8-jdk-slim java -version
openjdk version "1.8.0_222"
OpenJDK Runtime Environment (build 1.8.0_222-b10)
OpenJDK 64-Bit Server VM (build 25.222-b10, mixed mode)
```

Yes. This changes the base docker image of Spark.

Existing tests.

Closes apache#26037 from viirya/SPARK-28938.

Authored-by: Liang-Chi Hsieh <viirya@gmail.com>
Signed-off-by: Dongjoon Hyun <dhyun@apple.com>
robert3005 pushed a commit to palantir/spark that referenced this pull request Nov 7, 2019
…tes (#616)

[SPARK-28938][K8S] Move to supported OpenJDK docker image for Kubernetes

The current docker image used by Kubernetes is `openjdk:8-alpine`. It was not supported and  was removed with the commit docker-library/openjdk@3eb0351#diff-f95ffa3d1377774732c33f7b8368e099.

This PR proposes to move to a supported docker image.

I think there are at least two reasons:

1. According to the commit, Alpine/musl is not officially supported by the OpenJDK project.
2. As no more OpenJDK 8 Alpine images, new JDK updates including security fixes
, are not applied to it. See below:

```
docker run -it --rm openjdk:8-alpine java -version
openjdk version "1.8.0_212"
OpenJDK Runtime Environment (IcedTea 3.12.0) (Alpine 8.212.04-r0)
OpenJDK 64-Bit Server VM (build 25.212-b04, mixed mode)
```
```
docker run -it --rm openjdk:8-jdk-slim java -version
openjdk version "1.8.0_222"
OpenJDK Runtime Environment (build 1.8.0_222-b10)
OpenJDK 64-Bit Server VM (build 25.222-b10, mixed mode)
```

Yes. This changes the base docker image of Spark.

Existing tests.

Closes apache#26037 from viirya/SPARK-28938.

Authored-by: Liang-Chi Hsieh <viirya@gmail.com>
Signed-off-by: Dongjoon Hyun <dhyun@apple.com>
@viirya viirya deleted the SPARK-28938 branch December 27, 2023 18:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants