-
Notifications
You must be signed in to change notification settings - Fork 79
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
Scrub will report success (exit 0) when the scrub is cancelled #128
Comments
I checked out the scrub script, and it surely says:
I do see
It will correctly report
The btrfs-scrub status:
Note how the main PID reports |
Oh!.. The entire script is wrapped in a I've altered the
And this works. When I cancel my scrub now, I get an exit code 1 in systemd. |
I've prepared a PR that implements this for the four scripts I found that use this piping-logging method. |
I've edited the scrub task to report to a healthcheck site when it starts and stops. Just now, I stopped the scrub using
btrfs scrub cancel <mount>
and noticed the health site reported the task as having successfully run. This must mean an exit code of 0 is returned.I report like this:
This seems rather unfortunate, so I wanted to report it so that others may know, or it could be fixed. I believe the scrub tasks should actually have continued (run on all filesystems in the loop as it does) but then finally report a non-zero exit if any of the filesystems had an issue.
The text was updated successfully, but these errors were encountered: