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

recovering from Client::update failing to write root metadata #309

Open
erickt opened this issue Oct 28, 2020 · 0 comments
Open

recovering from Client::update failing to write root metadata #309

erickt opened this issue Oct 28, 2020 · 0 comments

Comments

@erickt
Copy link
Collaborator

erickt commented Oct 28, 2020

In #304, I'm changing Client::update() to error out if we fail to write metadata to the local FileSystemRepository. Consider:

  • The trusted root metadata is version 4.
  • We fetch version 5.root.json
  • We validate it, and update tuf::Tuf to trust version 5.
  • We try to write 5.root.json, but fail because the local device ran out of space.
  • Space is cleared.
  • We fetch the new timestamp, which was signed by 5.root.json. This is written to local storage.
  • We do another update, but because we already trust version 5, we next try to fetch version 6, which doesn't exist.

If we restart the client, we no longer can verify the local timestamp metadata without going online.

Instead, we should consider extending the FileSystemRepository to cache metadata if it encounters an error writing metadata to local storage, and periodically trying to flush the metadata to disk. That will increase the odds that we can recover from this situation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant