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

Add a try_fail_point! macro and use it in more places #4259

Merged
merged 1 commit into from
Jan 12, 2023

Conversation

cgwalters
Copy link
Member

When I was debugging https://issues.redhat.com/browse/OCPBUGS-2866 it would have been quite convenient to have a failpoint set up in the transaction init path, because I could have forcibly injected a sleep there.

Add one there, and in a few other places I semi-randomly chose by skimming through the code. The cost of this is very low, but if we find other bugs in the future it will likely be useful.

Further, we can and should start using failpoints to forcibly inject errors in our CI tests.

Since movement on review of tikv/fail-rs#68 has been slow, we just copy the code into our repo for now.

When I was debugging https://issues.redhat.com/browse/OCPBUGS-2866
it would have been quite convenient to have a failpoint set up
in the transaction init path, because I could have forcibly injected
a sleep there.

Add one there, and in a few other places I semi-randomly
chose by skimming through the code.  The cost of this is very low,
but if we find other bugs in the future it will likely be useful.

Further, we can and should start using failpoints to forcibly
inject errors in our CI tests.

Since movement on review of tikv/fail-rs#68
has been slow, we just copy the code into our repo for now.
@cgwalters
Copy link
Member Author

To use this do e.g.: systemctl edit rpm-ostreed, then inject

[Service]
Environment=FAILPOINTS=transaction::execute=return

Then systemctl restart rpm-ostreed, and all transactions will return an error.

@jmarrero jmarrero enabled auto-merge January 12, 2023 18:44
Copy link
Member

@jmarrero jmarrero left a comment

Choose a reason for hiding this comment

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

lgtm

@jmarrero jmarrero merged commit a083a65 into coreos:main Jan 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants