mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-12-18 11:00:25 +00:00
util: add logging when OpenEncryptedVolume() encounters an error
Signed-off-by: Niels de Vos <ndevos@redhat.com>
This commit is contained in:
parent
bd1388fb96
commit
151d066938
@ -243,7 +243,10 @@ func EncryptVolume(ctx context.Context, devicePath, passphrase string) error {
|
|||||||
// OpenEncryptedVolume opens volume so that it can be used by the client.
|
// OpenEncryptedVolume opens volume so that it can be used by the client.
|
||||||
func OpenEncryptedVolume(ctx context.Context, devicePath, mapperFile, passphrase string) error {
|
func OpenEncryptedVolume(ctx context.Context, devicePath, mapperFile, passphrase string) error {
|
||||||
DebugLog(ctx, "Opening device %s with LUKS on %s", devicePath, mapperFile)
|
DebugLog(ctx, "Opening device %s with LUKS on %s", devicePath, mapperFile)
|
||||||
_, _, err := LuksOpen(devicePath, mapperFile, passphrase)
|
_, stderr, err := LuksOpen(devicePath, mapperFile, passphrase)
|
||||||
|
if err != nil {
|
||||||
|
WarningLog(ctx, "failed to open LUKS device %q: %s", devicePath, stderr)
|
||||||
|
}
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user