Search code examples
chef-infrachef-vault

corrupted keys file in chef vault


Today I saw that all my chef-clients fail to run their recipes becaue they can't decrypt our ssh keys vault.

I tried to show my vault and got the following:

knife vault show secrets ssh_keys
ERROR: Chef::Exceptions::JSON::ParseError: parse error: premature EOF
                                   {"id":"ssh_keys_keys","admins":
                 (right here) ------^

then I tried to show the data bag of the vault:

knife data bag show secrets ssh_keys

this command showed my encrypted data but when I tried to show the keys item I got the same error as before:

knife data bag show secrets ssh_keys_keys
ERROR: Chef::Exceptions::JSON::ParseError: parse error: premature EOF
                                   {"id":"ssh_keys_keys","admins":
                 (right here) ------^

Chef Version: 12.14.89
Vault Version: 2.9.0

1) can I see last changes to a vault in chef so I know what cause it?
2) does anyone have a solution how to fix this keys item?

Regards


Solution

  • This was a problem with my chef-server.
    Chef server was out of disk space and after removing some log files the problem solved