-
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
httpchaos: chaos-tproxy will be recreate if instance not found #2610
httpchaos: chaos-tproxy will be recreate if instance not found #2610
Conversation
Signed-off-by: xixi <i@hexilee.me>
[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. |
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
pkg/chaosdaemon/httpchaos_server.go
Outdated
@@ -64,15 +64,15 @@ func (s *DaemonServer) ApplyHttpChaos(ctx context.Context, in *pb.ApplyHttpChaos | |||
log := log.WithValues("Request", in) | |||
log.Info("applying http chaos") | |||
|
|||
if in.Instance == 0 { | |||
stdio := s.backgroundProcessManager.Stdio(int(in.Instance), in.StartTime) | |||
for stdio == nil { |
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.
How about adding a times limit? If the instances can never be found, here will block the whole program
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.
+1, it would be stuck in here if chaos-tproxy
failed to start by invalid arguments or other potential bugs.
And the deeper issue is that we do not specify the lifecycle/status of a process managed by bpm
, we always assume that processes controlled by bpm SHOULD work well, but that's out of the scope of this PR.
PTAL @Hexilee
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.
@Hexilee PTAL
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.
How about adding a times limit? If the instances can never be found, here will block the whole program
I think the whole program shouldn't be blocked as this is just a gRPC call, only a goroutine will be blocked. Moreover, this call will timeout if the instances can never be found.
+1, it would be stuck in here if
chaos-tproxy
failed to start by invalid arguments or other potential bugs.And the deeper issue is that we do not specify the lifecycle/status of a process managed by
bpm
, we always assume that processes controlled by bpm SHOULD work well, but that's out of the scope of this PR.PTAL @Hexilee
If chaos-tproxy failed to start by invalid arguments or other potential bugs, this experiment SHOULD fail by gRPC timeout.
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.
Codecov Report
@@ Coverage Diff @@
## master #2610 +/- ##
==========================================
- Coverage 41.16% 40.99% -0.18%
==========================================
Files 144 144
Lines 11713 11719 +6
==========================================
- Hits 4822 4804 -18
- Misses 6529 6552 +23
- Partials 362 363 +1
Continue to review full report at Codecov.
|
Signed-off-by: xixi <i@hexilee.me>
Signed-off-by: xixi <i@hexilee.me>
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: e92c952
|
…-mesh#2610) * httpchaos: chaos-tproxy will be recreate if instance not found Signed-off-by: xixi <i@hexilee.me> * retry only once if tproxy notfound Signed-off-by: xixi <i@hexilee.me> * format Signed-off-by: xixi <i@hexilee.me> Co-authored-by: Andrewmatilde <davis6813585853062@outlook.com> Co-authored-by: STRRL <str_ruiling@outlook.com> Co-authored-by: Ti Chi Robot <ti-community-prow-bot@tidb.io> Signed-off-by: Craig Seeman <cseeman@zendesk.com>
Signed-off-by: xixi i@hexilee.me
What problem does this PR solve?
Close #2536
What's changed and how it works?
Related changes
chaos-mesh/website
Dashboard UI
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: