mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-12-18 02:50:30 +00:00
cleanup: return error type in GetCryptoPassphrase()
Signed-off-by: Niels de Vos <ndevos@redhat.com>
This commit is contained in:
parent
c8c8176a37
commit
3dfe65d17c
@ -150,11 +150,11 @@ func GetCryptoPassphrase(ctx context.Context, volumeID string, kms EncryptionKMS
|
||||
volumeID)
|
||||
passphrase, err = generateNewEncryptionPassphrase()
|
||||
if err != nil {
|
||||
return "", fmt.Errorf("failed to generate passphrase for %s: %s", volumeID, err)
|
||||
return "", fmt.Errorf("failed to generate passphrase for %s: %w", volumeID, err)
|
||||
}
|
||||
err = kms.SavePassphrase(volumeID, passphrase)
|
||||
if err != nil {
|
||||
return "", fmt.Errorf("failed to save the passphrase for %s: %s", volumeID, err)
|
||||
return "", fmt.Errorf("failed to save the passphrase for %s: %w", volumeID, err)
|
||||
}
|
||||
return passphrase, nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user