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"
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 : nagios/ plugins/ check_vault_ health. py"
juju exec -a vault "sed -i -e 's/-1/-4/' /usr/lib/
[1] https:/ /opendev. org/openstack/ charm-vault/ src/commit/ 8413b3f9eed9cc4 100d744729a04da a028fda035/ src/files/ nagios/ check_vault_ health. py#L40