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

Feature request: Handle I/O errors more gracefully and continue iterating volumes #178

Open
d2x opened this issue Feb 7, 2024 · 1 comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Milestone

Comments

@d2x
Copy link

d2x commented Feb 7, 2024

In the event of an I/O error from a failing disk, the script crashes (v0.8beta2). This could be handled a little better with a try / catch and perhaps throwing a warning that a volume failed to be backed up rather than outright crashing.

Volume 'vm-d8-root': Traceback (most recent call last):
  File "/usr/local/bin/wyng", line 4667, in <module>
    monitor_send(storage, aset, selected_vols, monitor_only=False)
  File "/usr/local/bin/wyng", line 3467, in monitor_send
    send_volume(storage, vol, curtime, ses_tags, send_all=datavol in send_alls)
  File "/usr/local/bin/wyng", line 3158, in send_volume
    vf_seek(addr)    ; buf = vf_read(chunksize)
OSError: [Errno 5] Input/output error
None
None

This may be better to have as a flag to "continue on error" rather than the default. Anyone running this in an unattended manner would likely prefer it to crash to trigger manual review.

Overall, really liking the wyng backup script.

@tasket
Copy link
Owner

tasket commented Feb 9, 2024

Thanks for the report! FWIW, Wyng does have a concept of trying all then reporting errors at the end; this is done mostly for errors that are Wyng-specific. However, as you point out, the catching of system errors is sparse and could be expanded so that more volumes can be processed in an error-bound session.

@tasket tasket added enhancement New feature or request help wanted Extra attention is needed labels Feb 9, 2024
@tasket tasket added this to the ongoing milestone Feb 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants