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

Prefer Liberty SCC to OpenJ9 SCC #204

Merged
merged 1 commit into from
Oct 6, 2020

Conversation

ymanton
Copy link
Contributor

@ymanton ymanton commented Sep 25, 2020

OpenJ9 images now ship with an SCC that we can use as a base SCC layer.

Fixes #203

FYI @jdmcclur, can you give this patch a try?

@ymanton
Copy link
Contributor Author

ymanton commented Sep 25, 2020

This patch assumes that we want to use the SCC in the OpenJ9 container as the base SCC layer and add OpenLiberty SCC layers on top. The IBM JDK does not (currently) ship with an SCC so for that case we'll maintain the old behaviour of building the OL SCC layers in the old /output/.classCache directory.

@ymanton
Copy link
Contributor Author

ymanton commented Sep 25, 2020

Also, I left the older 20.0.0.x releases alone. Do we want to change those? Are they meant to be forward compatible with later OpenJ9 images?

@ymanton
Copy link
Contributor Author

ymanton commented Oct 1, 2020

Added a workaround for the problem mentioned in #203 (comment) (FYI @jdmcclur). Details are in the patch, smells like a Linux and/or Docker bug, but root cause is not yet clear.

@ymanton
Copy link
Contributor Author

ymanton commented Oct 2, 2020

Workaround is insufficient. Subsequent Docker layers hit the same issue. It's possible that applying workarounds at each Docker layer would "fix" it, but at this point it's not worth compounding a less than ideal fix just to get it working so we're going to ignore the OpenJ9 SCC for the time being and continue to build Liberty SCC layers. We can revisit once the root cause of the problem is found. The new patch ignores the incoming SCC settings from the OpenJ9 image and overrides them with the existing Liberty options.

I've also back-ported the changes to the 20.0.0.x releases after getting feedback offline to #204 (comment).

@jdmcclur
Copy link
Member

jdmcclur commented Oct 2, 2020

LGTM, also will need a PR for the WebSphere Liberty images, right?

On some systems trying to use the OpenJ9 SCC leads to
permission denied errors, despite file permissions being
observably correct.

For the time being we'll ignore the OpenJ9 SCC and
continue to build our own SCC layers. In order to do this
we switch to setting/using the OPENJ9_JAVA_OPTIONS
env var in order to override the OpenJ9 image and move
away from IBM_JAVA_OPTIONS, which is deprecated anyway.

Signed-off-by: Younes Manton <[email protected]>
@ymanton
Copy link
Contributor Author

ymanton commented Oct 2, 2020

Missed updating populate_scc.sh in the 20.0.0.x directories; fixed and re-pushed.

LGTM, also will need a PR for the WebSphere Liberty images, right?

Yes, I have a PR for that which I'll open once this patch starts looking final.

@ymanton ymanton changed the title Use OpenJ9's system SCC Prefer Liberty SCC to OpenJ9 SCC Oct 2, 2020
@KokinSSJ
Copy link

KokinSSJ commented Oct 2, 2020

Hi, I'm new to Liberty but I've found this SCC layer problem when running latest ubi and also found problem #203.
I agree with @ymanton changes, adoptopenjdk image is setting OPENJ9_JAVA_OPTIONS variable which is used by liberty in bin/server startup but IBM_JAVA_OPTIONS is ignored.

@mpirvu
Copy link
Contributor

mpirvu commented Oct 2, 2020

What happens if the user wants to set his/her own options when running the container with -e OPENJ9_JAVA_OPTIONS="..." ? Does this overwrite the options for SCC?

@ymanton
Copy link
Contributor Author

ymanton commented Oct 2, 2020

Yes, it will overwrite the existing env vars. If the user wants to only add to the existing options they'll have to retrieve the existing ones and append theirs. This is true for the OpenJ9 images as well.

@mpirvu
Copy link
Contributor

mpirvu commented Oct 2, 2020

This is true for the OpenJ9 images as well.

Which is why I opened AdoptOpenJDK/openjdk-docker#402

If the user wants to only add to the existing options they'll have to retrieve the existing ones and append theirs.

This is far from ideal. As soon as all the usability fixes get delivered at adopt we need to revert this PR.

@mpirvu
Copy link
Contributor

mpirvu commented Oct 2, 2020

@arthurdm This PR is ready for your review. Thanks

Copy link
Contributor

@arthurdm arthurdm left a comment

Choose a reason for hiding this comment

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

LGTM, thanks everyone

@arthurdm arthurdm merged commit f2b0fe7 into OpenLiberty:master Oct 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

New Java SCC causing problems.
5 participants