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

Fix interactive output #398

Merged
merged 2 commits into from
Jun 6, 2019

Conversation

phreaker0
Copy link
Collaborator

Fixes #396

This PR will only capture the stdout of some replication commands and leave stderr mostly untouched so pv works correctly because it's directly connected to the terminal. The zfs receive command stderr is therefore redirected to stdout for parsing.
The problem arises with zfs send, where stderr can't be redirected to stdout or else the replication stream is contaminated. There is currently only one case where and error check of zfs send is needed (resumed send where the src initial snapshot is missing) but for that case a workaround is used, exploiting that send estimation doesn't work there, we don't need pv output and therefore can capture stderr there. So this PR should fix the interactive output with PV without reverting the error detection stuff, yeah!

…ing of error codes, this way stderr is left alone and pv can work interactively
…cation where the send size can't be estimated (in which case pv is not working anyway, so we can break the interactivitiy)
@jimsalterjrs jimsalterjrs merged commit 4d5feb2 into jimsalterjrs:master Jun 6, 2019
@phreaker0 phreaker0 deleted the fix-interactive-output branch April 26, 2024 06:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

syncoid not showing progress bar
2 participants