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

CRIU support: add checkpoint/restore environment variables #486

Merged
merged 1 commit into from Mar 23, 2022

Conversation

JasonFengJ9
Copy link
Member

@JasonFengJ9 JasonFengJ9 commented Mar 11, 2022

Added isCRIUEnabled via CRIUProvider.getOpenJ9CRIU();
Added tracePrunedEnvVarsValue via org.eclipse.openj9.criu.TracePrunedEnvVars;
Added theOriginalUnmodifiableEnvironment to store original theUnmodifiableEnvironment;
Hard-coded immutable list: LANG, LC_ALL and LC_CTYPE;

related eclipse-openj9/openj9#13545
depends on eclipse-openj9/openj9#14730

Signed-off-by: Jason Feng fengj@ca.ibm.com

@JasonFengJ9 JasonFengJ9 requested a review from tajila March 11, 2022 14:04
@JasonFengJ9
Copy link
Member Author

Jenkins test sanity.functional zlinux jdk11

@tajila
Copy link
Member

tajila commented Mar 14, 2022

Were you able to try this patch with Toms docker script?

@JasonFengJ9
Copy link
Member Author

Were you able to try this patch with Toms docker script?

./open-liberty-build.sh -t pingperf-ubuntu:

Launching defaultServer (Open Liberty 22.0.0.3/wlp-1.0.62.cl220320220205-1900) on Eclipse OpenJ9 VM, version 11.0.15-internal+0-adhoc.root.openj9-openjdk-jdk11 (en_US)
[AUDIT   ] CWWKE0001I: The server defaultServer has been launched.
[AUDIT   ] CWWKG0093A: Processing configuration drop-ins resource: /opt/ol/wlp/usr/servers/defaultServer/configDropins/defaults/keystore.xml
[AUDIT   ] CWWKG0093A: Processing configuration drop-ins resource: /opt/ol/wlp/usr/servers/defaultServer/configDropins/defaults/open-default-port.xml
[AUDIT   ] CWWKZ0058I: Monitoring dropins for applications.
[AUDIT   ] CWWKT0016I: Web application available (default_host): http://1aafba4b59be:9080/pingperf/
[AUDIT   ] CWWKZ0001I: Application pingperf started in 1.911 seconds.
0
Committing container pingperf-ubuntu-checkpoint as image pingperf-ubuntu
sha256:e60ae7ed2d039f99128c535cc2ee8412124f18154991a518970adeed57e2d323
Done building image pingperf-ubuntu ... cleaning up
pingperf-ubuntu-checkpoint

./liberty-restore.sh -t pingperf-ubuntu:

Performing checkpoint --at=applications

Launching defaultServer (Open Liberty 22.0.0.3/wlp-1.0.62.cl220320220205-1900) on Eclipse OpenJ9 VM, version 11.0.15-internal+0-adhoc.root.openj9-openjdk-jdk11 (en_US)
[AUDIT   ] CWWKE0001I: The server defaultServer has been launched.
[AUDIT   ] CWWKG0093A: Processing configuration drop-ins resource: /opt/ol/wlp/usr/servers/defaultServer/configDropins/defaults/keystore.xml
[AUDIT   ] CWWKG0093A: Processing configuration drop-ins resource: /opt/ol/wlp/usr/servers/defaultServer/configDropins/defaults/open-default-port.xml
[AUDIT   ] CWWKZ0058I: Monitoring dropins for applications.

@JasonFengJ9
Copy link
Member Author

This PR appears avoid the liberty restore hang problem.

Added -Dorg.eclipse.openj9.criu.TracePrunedEnvVars=1, ./open-liberty-build.sh -t pingperf-ubuntu:

The env var (INVOKED) is not in CRIU immutable list but was set to : /opt/ol/wlp/bin/server
The env var (WLP_USER_DIR) is not in CRIU immutable list but was set to : /opt/ol/wlp/usr
The env var (WLP_OUTPUT_DIR) is not in CRIU immutable list but was set to : /opt/ol/wlp/output
The env var (X_LOG_DIR) is not in CRIU immutable list but was set to : /logs
The env var (X_LOG_FILE) is not in CRIU immutable list but was set to : console.log
The env var (WLP_USER_DIR) is not in CRIU immutable list but was set to : /opt/ol/wlp/usr
Launching defaultServer (Open Liberty 22.0.0.3/wlp-1.0.62.cl220320220205-1900) on Eclipse OpenJ9 VM, version 11.0.15-internal+0-adhoc.root.openj9-openjdk-jdk11 (en_US)
The env var (WLP_USER_DIR) is not in CRIU immutable list but was set to : /opt/ol/wlp/usr
[AUDIT   ] CWWKE0001I: The server defaultServer has been launched.
[err] The env var (WLP_USER_DIR) is not in CRIU immutable list but was set to : /opt/ol/wlp/usr
[err] The env var (WLP_OUTPUT_DIR) is not in CRIU immutable list but was set to : /opt/ol/wlp/output
[err] The env var (WLP_USER_DIR) is not in CRIU immutable list but was set to : /opt/ol/wlp/usr
[AUDIT   ] CWWKG0093A: Processing configuration drop-ins resource: /opt/ol/wlp/usr/servers/defaultServer/configDropins/defaults/keystore.xml
[AUDIT   ] CWWKG0093A: Processing configuration drop-ins resource: /opt/ol/wlp/usr/servers/defaultServer/configDropins/defaults/open-default-port.xml
[AUDIT   ] CWWKZ0058I: Monitoring dropins for applications.
[err] The env var (WLP_USER_DIR) is not in CRIU immutable list but was set to : /opt/ol/wlp/usr
0
Committing container pingperf-ubuntu-checkpoint as image pingperf-ubuntu
sha256:51d3cdb67a392b5a4736327a404fd9ce13518520c64cf448c55f0e84450c1128
Done building image pingperf-ubuntu ... cleaning up
pingperf-ubuntu-checkpoint

./liberty-restore.sh -t pingperf-ubuntu:

Performing checkpoint --at=applications

The env var (INVOKED) is not in CRIU immutable list but was set to : /opt/ol/wlp/bin/server
The env var (WLP_USER_DIR) is not in CRIU immutable list but was set to : /opt/ol/wlp/usr
The env var (WLP_OUTPUT_DIR) is not in CRIU immutable list but was set to : /opt/ol/wlp/output
The env var (X_LOG_DIR) is not in CRIU immutable list but was set to : /logs
The env var (X_LOG_FILE) is not in CRIU immutable list but was set to : console.log
The env var (WLP_USER_DIR) is not in CRIU immutable list but was set to : /opt/ol/wlp/usr
Launching defaultServer (Open Liberty 22.0.0.3/wlp-1.0.62.cl220320220205-1900) on Eclipse OpenJ9 VM, version 11.0.15-internal+0-adhoc.root.openj9-openjdk-jdk11 (en_US)
The env var (WLP_USER_DIR) is not in CRIU immutable list but was set to : /opt/ol/wlp/usr
[AUDIT   ] CWWKE0001I: The server defaultServer has been launched.
[err] The env var (WLP_USER_DIR) is not in CRIU immutable list but was set to : /opt/ol/wlp/usr
[err] The env var (WLP_OUTPUT_DIR) is not in CRIU immutable list but was set to : /opt/ol/wlp/output
[err] The env var (WLP_USER_DIR) is not in CRIU immutable list but was set to : /opt/ol/wlp/usr
[AUDIT   ] CWWKG0093A: Processing configuration drop-ins resource: /opt/ol/wlp/usr/servers/defaultServer/configDropins/defaults/keystore.xml
[AUDIT   ] CWWKG0093A: Processing configuration drop-ins resource: /opt/ol/wlp/usr/servers/defaultServer/configDropins/defaults/open-default-port.xml
[AUDIT   ] CWWKZ0058I: Monitoring dropins for applications.
[err] The env var (WLP_USER_DIR) is not in CRIU immutable list but was set to : /opt/ol/wlp/usr

@tajila
Copy link
Member

tajila commented Mar 15, 2022

to know if it works you need to see CWWKF0011I: The defaultServer server is ready to run a smarter planet. The defaultServer server started in 0.779 seconds.

@JasonFengJ9
Copy link
Member Author

to know if it works you need to see CWWKF0011I: The defaultServer server is ready to run a smarter planet. The defaultServer server started in 0.779 seconds.

There is a message [AUDIT ] CWWKE0001I: The server defaultServer has been launched.

./liberty-restore.sh -t pingperf-ubuntu
Performing checkpoint --at=applications

The env var (INVOKED) is not in CRIU immutable list but was set to : /opt/ol/wlp/bin/server
The env var (WLP_USER_DIR) is not in CRIU immutable list but was set to : /opt/ol/wlp/usr
The env var (WLP_OUTPUT_DIR) is not in CRIU immutable list but was set to : /opt/ol/wlp/output
The env var (X_LOG_DIR) is not in CRIU immutable list but was set to : /logs
The env var (X_LOG_FILE) is not in CRIU immutable list but was set to : console.log
The env var (WLP_USER_DIR) is not in CRIU immutable list but was set to : /opt/ol/wlp/usr
Launching defaultServer (Open Liberty 22.0.0.3/wlp-1.0.62.cl220320220205-1900) on Eclipse OpenJ9 VM, version 11.0.15-internal+0-adhoc.root.openj9-openjdk-jdk11 (en_US)
The env var (WLP_USER_DIR) is not in CRIU immutable list but was set to : /opt/ol/wlp/usr
[AUDIT   ] CWWKE0001I: The server defaultServer has been launched.
[err] The env var (WLP_USER_DIR) is not in CRIU immutable list but was set to : /opt/ol/wlp/usr
[err] The env var (WLP_OUTPUT_DIR) is not in CRIU immutable list but was set to : /opt/ol/wlp/output
[err] The env var (WLP_USER_DIR) is not in CRIU immutable list but was set to : /opt/ol/wlp/usr
[AUDIT   ] CWWKG0093A: Processing configuration drop-ins resource: /opt/ol/wlp/usr/servers/defaultServer/configDropins/defaults/keystore.xml
[AUDIT   ] CWWKG0093A: Processing configuration drop-ins resource: /opt/ol/wlp/usr/servers/defaultServer/configDropins/defaults/open-default-port.xml
[AUDIT   ] CWWKZ0058I: Monitoring dropins for applications.
[err] The env var (WLP_USER_DIR) is not in CRIU immutable list but was set to : /opt/ol/wlp/usr

@tajila
Copy link
Member

tajila commented Mar 16, 2022

you should see

[AUDIT   ] CWWKG0017I: The server configuration was successfully updated in 0.176 seconds.
[AUDIT   ] CWWKF0012I: The server installed the following features: [cdi-2.0, checkpoint-1.0, jaxrs-2.1, jaxrsClient-2.1, jndi-1.0, jsonp-1.1, servlet-4.0].
[AUDIT   ] CWWKF0011I: The defaultServer server is ready to run a smarter planet. The defaultServer server started in 0.789 seconds.

@tajila
Copy link
Member

tajila commented Mar 16, 2022

dont worry, I've confirmed that eclipse-openj9/openj9#14583 fixes it

@JasonFengJ9
Copy link
Member Author

So the restore wasn't successful w/ this PR (probably stopped earlier to avoid the hang), will give it a try w/ eclipse-openj9/openj9#14583

@JasonFengJ9 JasonFengJ9 force-pushed the criuenv branch 2 times, most recently from 2fa868e to a020153 Compare March 16, 2022 17:19
Added isCRIUEnabled via CRIUProvider.getOpenJ9CRIU();
Added tracePrunedEnvVarsValue via
org.eclipse.openj9.criu.TracePrunedEnvVars;
Added theOriginalUnmodifiableEnvironment to store original
theUnmodifiableEnvironment;
Hard-coded immutable list: LANG, LC_ALL and LC_CTYPE;


Signed-off-by: Jason Feng <fengj@ca.ibm.com>
@tajila
Copy link
Member

tajila commented Mar 22, 2022

jenkins compile xlinuxcriu jdk11

@tajila
Copy link
Member

tajila commented Mar 22, 2022

Jenkins test sanity plinux jdk8,jdk11,jdknext

1 similar comment
@tajila
Copy link
Member

tajila commented Mar 22, 2022

Jenkins test sanity plinux jdk8,jdk11,jdknext

@tajila
Copy link
Member

tajila commented Mar 22, 2022

Jenkins test sanity plinux jdk11

@tajila
Copy link
Member

tajila commented Mar 22, 2022

Infra failure on last run

Exception: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException

@tajila tajila merged commit 2e2a51b into ibmruntimes:openj9 Mar 23, 2022
@JasonFengJ9 JasonFengJ9 deleted the criuenv branch March 23, 2022 13:33
@JasonFengJ9
Copy link
Member Author

Assuming there is no immediate need to port this PR to other Java levels.
@tajila is that correct?

@tajila
Copy link
Member

tajila commented Mar 23, 2022

we should port to 17 & next since long term we need to support all jdk levels.

We can wait on jdk8 until we know that we need it for sure

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.

None yet

2 participants