-
Notifications
You must be signed in to change notification settings - Fork 801
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
Implement the JVM chaos controller #1264
Conversation
Signed-off-by: Gallardot <tttick@163.com>
Signed-off-by: Gallardot <tttick@163.com>
ba5ac74
to
c8b006c
Compare
Codecov Report
@@ Coverage Diff @@
## master #1264 +/- ##
==========================================
- Coverage 55.78% 51.37% -4.41%
==========================================
Files 68 79 +11
Lines 4383 5014 +631
==========================================
+ Hits 2445 2576 +131
- Misses 1768 2174 +406
- Partials 170 264 +94
Continue to review full report at Codecov.
|
Signed-off-by: Gallardot <tttick@163.com>
8477efe
to
7c7f7b3
Compare
Signed-off-by: Gallardot <tttick@163.com>
1469b34
to
61e46e2
Compare
Hi @Gallardot, is there any documents about the web API |
Sorry, the web API has no documentation. But we can find the implementation code. The docker image |
d1ee870
to
79e1812
Compare
79e1812
to
97857ce
Compare
Hi @Gallardot , sorry for my late reply, as you mentioned before, copy "jvm-sandbox" then attach JVM in the container works well. I think injecting chaos at runtime is better than manually changing workload spec, although the first one is more complex. How about making Multi-container and more than one java process should also be considered, we should enrich out chaos spec. |
As we discussed, executing JVM Chaos by Chaos-daemon is desirable, but difficult to handle all cases. With Sidecar we can handle most cases. We want to merge the current PR first, and then we create other PR to implement the Chaos-daemon way and supplement the E2E use cases and documentation. ps: I will fix the conflicting files later. |
Signed-off-by: Gallardot <tttick@163.com>
…haos-mesh into jvm-chaos-controller
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.
Rest LGTM
controllers/jvmchaos/types.go
Outdated
r.Log.Info("Try to apply jvm chaos", "namespace", | ||
pod.Namespace, "name", pod.Name) | ||
|
||
err := jvm.ActiveSandbox(pod.Status.PodIP, 10086) |
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.
Use a const to defein 10086
?
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.
Done! PTAL!
Signed-off-by: Gallardot <tttick@163.com>
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 |
/run-all-tests |
@Gallardot merge failed. |
/merge |
/run-all-tests |
What problem does this PR solve?
#650
What is changed and how does it work?
We use chaosblade-exec-jvm to implement JVM chaos. We use admission-webhook to inject the required files and associated configurations. We use JAVA_TOOL_OPTIONS to start a java agent with application.
ps: It is currently only a technical preview, and we need to do more for the documentation and E2E test. 😂
Here are the steps to perform JVM chaos. Have fun.🚀
Preparation done
At this point, we need to prepare a Java application pod, adding the following information to the annotations of pod
As an example, you can use our demo program.
JVM Agent injection validation
make a delayed fault injection test
Do a test to modify the method's return value
Checklist
Tests
Side effects
Related changes
Does this PR introduce a user-facing change?