Comment 2 for bug 2060173

Revision history for this message
DUFOUR Olivier (odufourc) wrote :

I just faced this issue with an ongoing deployment.

This is not related at all to the snap version of Vault, but solely because of the latest update of snapd itself since 2.61.2+ version

After reusing the code to do a quick reproducer, I noticed the output of snapd's API isn't the same and introduce more elements as indicated in the first comment. (see attachment snapd-api-output-change.txt for more details)

So when doing "snapd.recv(1024 * 1024).decode('utf-8').split('\n')[-1]" (See code in [1])
In previous releases of snapd, it would match the json output from the API
With the latest release of snapd, it matches an empty line.

Another ugly and quick workaround is to do on Vault unit :
juju exec -a vault "sed -i -e 's/-1/-4/' /usr/lib/nagios/plugins/check_vault_health.py"

[1] https://opendev.org/openstack/charm-vault/src/commit/8413b3f9eed9cc4100d744729a04daa028fda035/src/files/nagios/check_vault_health.py#L40