Using keyring_vault plugin and Vault is misconfigured or not accessible when doing --prepare, XtraBackup 2.4.15 reports it cannot decrypt tables but still finishes with "completed OK!" and exit code 0.
How to repeat: Back up tables encrypted using keyring_vault, then execute xtrabackup -
prepare without -keyring-vault-config= and without Vault configuration in my.cnf or backup-my.cnf. Same happens if Vault is offline, with a slightly different error message from XtraBackup.
Log excerpt from xtrabackup --prepare:
Plugin keyring_vault reported: 'File '' not found (Errcode: 2 - No such file or directory)'
Plugin keyring_vault reported: 'Could not open file with credentials.'
Plugin keyring_vault reported: 'keyring_vault initialization failure. Please check that the keyring_vault_config_file points to readable keyring_vault configuration file. Please also make sure Vault is running and accessible. The keyring_vault will stay unusable until correct configuration file gets provided.'
InnoDB: Encryption can't find master key, please check the keyring plugin is loaded.
InnoDB: Encryption information in datafile: ./test/sample1.ibd can't be decrypted.
Shutting down plugin 'keyring_vault'
191003 07:52:22 completed OK!
Trying to start MySQL with this backup leads to tables not being accessible.
XtraBackup should exit with an error if it cannot decrypt tables.