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 keyring file missing after Vault restart #15946

Merged
merged 4 commits into from Jun 15, 2022

Commits on Jun 11, 2022

  1. Fix keyring file missing after Vault restart

    Fix keyring file missing after Vault restart
    
        Vault can be killed by signal SIGTERM in anytime. If Vault is
        doing keyring rotation and the fd is still not closed at that time,
        the size of the keyring file will be zero. The orignal key will be
        lost totally.
        Because the file is opened with os.O_TRUNC, and the fd will be closed
        automatically after Vault exits.
        Then try to unseal Vault after it startup again, the keyring file will
        be deleted in getInternal function due to its size is zero. So that is
        why the keyring file is missing. And the Vault cannot be unsealed
        anymore due to the file missing.
        Write data into a temp file then move it can avoid the file crash.
    
        Fix:hashicorp#15680
    shujun10086 committed Jun 11, 2022
    Configuration menu
    Copy the full SHA
    907d237 View commit details
    Browse the repository at this point in the history
  2. Create 15946.txt

    shujun10086 committed Jun 11, 2022
    Configuration menu
    Copy the full SHA
    a242cba View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    29f71a3 View commit details
    Browse the repository at this point in the history

Commits on Jun 15, 2022

  1. Update 15946.txt

    shujun10086 committed Jun 15, 2022
    Configuration menu
    Copy the full SHA
    9759caa View commit details
    Browse the repository at this point in the history