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

SIGINT and SIGTERM can leave the storage directory in invalid state #1518

Closed
reidpr opened this issue Dec 22, 2022 · 0 comments · Fixed by #1727
Closed

SIGINT and SIGTERM can leave the storage directory in invalid state #1518

reidpr opened this issue Dec 22, 2022 · 0 comments · Fixed by #1727

Comments

@reidpr
Copy link
Collaborator

reidpr commented Dec 22, 2022

Currently, we do not catch KeyboardInterrupt anywhere, nor install any SIGINT handler ourselves. Thus, control-C exits ch-image immediately (with a traceback) during various phases can leave a broken storage directory. For example:

  • Interrupting RUN prevents roll-back, leaving a broken image. Recovery can be done by deleting the image.
  • Interrupting a download leaves the blob file on disk, and it will be credulously re-used the next time needed. Recovery here is rather tricky, as the right file must be identified and manually deleted.
@reidpr reidpr self-assigned this Dec 22, 2022
@reidpr reidpr changed the title Control-C can leave the storage directory in invalid state SIGINT and SIGTERM can leave the storage directory in invalid state Sep 12, 2023
@reidpr reidpr added this to the 0.35 milestone Sep 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant