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

tests: further action injector fixes #10491

Merged
merged 3 commits into from
May 2, 2023

Conversation

jcsp
Copy link
Contributor

@jcsp jcsp commented May 2, 2023

The changes in #10196 weren't working properly, and it wasn't obvious because action injector was not propagating exceptions from its main loop when joined.

Fix the status check on teardown, and make it so that exceptions from ActionInjector.run will propagate to callers of join().

Fixes #10364

Backports Required

  • none - not a bug fix
  • none - this is a backport
  • none - issue does not exist in previous branches
  • none - papercut/not impactful enough to backport
  • v23.1.x
  • v22.3.x
  • v22.2.x

Release Notes

  • none

jcsp added 3 commits May 2, 2023 09:58
This is used in action injector in the next commit.
The run() method was calling Admin.ready without handling
connection errors.  This would be an unhandled exception
that caused us to fall out of run() prematurely without
waiting for nodes to be ready.

Fixes redpanda-data#10364
Previously, exceptions thrown from run() would be ignored.

This had two impacts:
- We might not have been injecting the failures we thought we were
- The end-of-run cluster status check could be skipped, leaving
  the cluster in an undefined state.
@jcsp jcsp added kind/bug Something isn't working area/tests labels May 2, 2023
@jcsp jcsp requested review from abhijat and andrwng May 2, 2023 09:03
@jcsp jcsp marked this pull request as ready for review May 2, 2023 09:03
err_msg='Cluster did not recover after failures')

def join(self, *args, **kwargs):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It used to be recommended not to override join (or anything other than init and run really) in threading.Thread. I cannot find any latest references about it though. It seems like this should work okay.

@jcsp jcsp merged commit a9d05c3 into redpanda-data:dev May 2, 2023
@jcsp jcsp deleted the issue-10364-action-injector branch May 2, 2023 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/tests kind/bug Something isn't working
Projects
None yet
2 participants