-
Notifications
You must be signed in to change notification settings - Fork 805
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
fix(JVMChaos): find the correct pid by CommName #2904
Conversation
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by submitting an approval review. |
Welcome @imlonghao! |
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.
rest LGTM, thanks!
Codecov Report
@@ Coverage Diff @@
## master #2904 +/- ##
==========================================
- Coverage 40.72% 40.69% -0.04%
==========================================
Files 147 147
Lines 12033 12047 +14
==========================================
+ Hits 4900 4902 +2
- Misses 6765 6775 +10
- Partials 368 370 +2
Continue to review full report at Codecov.
|
fe3e5ca
to
b57aa81
Compare
Signed-off-by: imlonghao <git@imlonghao.com>
b57aa81
to
ab8032e
Compare
log.Error(err, "ReadCommName") | ||
continue | ||
} | ||
if name == "java\n" { |
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.
Is it possible that there are more than one java process in the container?
log.Error(err, "ReadCommName") | ||
continue | ||
} | ||
if name == "java\n" { |
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.
Is it possible that there are more than one java process in the container?
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.
It may be possible in threading case, but in this case, which process should be injected?
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.
For this pr, I think injecting into the first java process is OK. Maybe we will add a new config like process-name
later, and find a java process containing the process-name
.
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.
LGTM
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.
LGTM
/merge |
This pull request has been accepted and is ready to merge. Commit hash: ab8032e
|
Signed-off-by: imlonghao <git@imlonghao.com> Signed-off-by: mikechengwei <842725815@qq.com>
Signed-off-by: imlonghao <git@imlonghao.com>
Signed-off-by: imlonghao <git@imlonghao.com> Signed-off-by: zhqqqy <zhqqqy@163.com>
cherry pick to release-2.1 in PR #3336 |
* fix(JVMChaos): find the correct pid by CommName Signed-off-by: imlonghao <git@imlonghao.com> * docs: append changelog Signed-off-by: STRRL <str_ruiling@outlook.com> Co-authored-by: imlonghao <git@imlonghao.com> Co-authored-by: STRRL <str_ruiling@outlook.com>
Signed-off-by: imlonghao git@imlonghao.com
What problem does this PR solve?
#2751
What's changed and how it works?
Read all the CommName from container, if the pid's CommName
is
java\n
then it is the correct pid to be injected.Related changes
chaos-mesh/website
Dashboard UI
It is a bug fix so I think it need to be backported.
Checklist
Tests
Side effects
Release note
DCO
If you find the DCO check fails, please run commands like below (Depends on the actual situations. For example, if the failed commit isn't the most recent) to fix it: