-
Notifications
You must be signed in to change notification settings - Fork 6.2k
8294402: Add diagnostic logging to VMProps.checkDockerSupport #12239
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
8294402: Add diagnostic logging to VMProps.checkDockerSupport #12239
Conversation
|
👋 Welcome back mseledtsov! A progress list of the required criteria for merging this PR into |
|
@mseledts To determine the appropriate audience for reviewing this pull request, one or more labels corresponding to different subsystems will normally be applied automatically. However, no automatic labelling rule matches the changes in this pull request. In order to have an "RFR" email sent to the correct mailing list, you will need to add one or more applicable labels manually using the /label pull request command. Applicable Labels
|
|
/label |
|
@mseledts Usage:
|
|
/label add hotspot |
|
@mseledts |
Webrevs
|
|
Alternatively we could keep the conditional guard using the property -Djtreg.log.vmprops. The users will enable this property in the test execution scripts for a test set of interest, such as container testing. |
|
Okay I'm struggling with the best way to handle this. I think the problem is that the code currently contains logging output of different levels (ref unified logging in the VM) but we only have a binary on/off selection mechanism. I don't want to see all the logging all the time - too noisy. But I do want to see the logging of the stdout/stderr from the exec'd process any time it fails. But I guess we could keep it all conditional on the property and have the task definition for the container tests set the property as suggested. |
|
I will then makes the logging conditional on the property mentioned above. Any test run who wishes additional logging could add/enable this property by the launching script. |
dholmes-ora
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks okay to me. Thanks.
|
@mseledts This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be: You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 392 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. ➡️ To integrate this PR with the above commit message to the |
test/jtreg-ext/requires/VMProps.java
Outdated
|
|
||
| // Returns comma-separated file names for stdout and stderr. | ||
| private String redirectOutputToLogFile(String msg, ProcessBuilder pb, String fileNameBase) { | ||
| if (!Boolean.getBoolean("jtreg.log.vmprops")) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not dump output always? It is printed only if exitcode is not zero anyway and doesn't add noise.
However not having it in the case of failure require reproducing the bug.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have to be consistent. Since we agreed in earlier discussion to use property jtreg.log.vmprops as a guard for logging we should also use it for writing into a file. The user who runs the tests can always specify this property in the test execution script.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we take the approach of always logging to vmprops.log then this makes sense. If no objections I will always redirect output into a file.
test/jtreg-ext/requires/VMProps.java
Outdated
| */ | ||
| protected static void log(String msg) { | ||
| if (!Boolean.getBoolean("jtreg.log.vmprops")) { | ||
| return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not always log in to the file like vmprops.log? Also, add try/catch into the call() and redirect file to stderr if something is wrong. And redirect if the property is set for passed tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had a discussion with Leonid in person, and I am OK with such approach. To summarize:
- always log to a file (vmprops.log or similar)
- this way we always have information to base investigation on if things go wrong
- conditionally log into stderr to avoid polluting the output and being too verbose
If I do not hear any objections I will proceed with implementation tomorrow.
lmesnik
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just refresh my approval
|
Thank you David, Leonid and Dan. /integrate |
|
Going to push as commit 03d613b.
Your commit was automatically rebased without conflicts. |
Add log() and logToFile() methods to VMProps for diagnostic purposes.
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk pull/12239/head:pull/12239$ git checkout pull/12239Update a local copy of the PR:
$ git checkout pull/12239$ git pull https://git.openjdk.org/jdk pull/12239/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 12239View PR using the GUI difftool:
$ git pr show -t 12239Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/12239.diff