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

Writing of state file(s) should be atomic #89

Open
mbartosch opened this issue Nov 17, 2014 · 0 comments
Open

Writing of state file(s) should be atomic #89

mbartosch opened this issue Nov 17, 2014 · 0 comments
Labels

Comments

@mbartosch
Copy link
Contributor

If CertNanny is interrupted while writing the state file this may lead to a non-recoverable error. On next invocation CertNanny will try to re-instantiate the state file and will fail due to a defective state file.

Suggested remedy.

  1. Do not fail if a read error on the state file is encountered. Instead delete state and all corresponding files (key, request)
  2. When writing the state file first write the data to a temporary file. After successful completion atomically rename the temp file to the target state file, overwriting this file.
@mbartosch mbartosch added the bug label Nov 17, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant