From d6fb8f302d282115ed758555f2dbe04c89fcf02e Mon Sep 17 00:00:00 2001 From: Niels de Vos Date: Tue, 8 Dec 2020 15:03:54 +0100 Subject: [PATCH] cleanup: return error type in NodeServer.processEncryptedDevice() Signed-off-by: Niels de Vos --- internal/rbd/nodeserver.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/rbd/nodeserver.go b/internal/rbd/nodeserver.go index a78addb50..967e2edbc 100644 --- a/internal/rbd/nodeserver.go +++ b/internal/rbd/nodeserver.go @@ -796,14 +796,14 @@ func (ns *NodeServer) processEncryptedDevice(ctx context.Context, volOptions *rb var existingFormat string existingFormat, err = diskMounter.GetDiskFormat(devicePath) if err != nil { - return "", fmt.Errorf("failed to get disk format for path %s, error: %v", devicePath, err) + return "", fmt.Errorf("failed to get disk format for path %s: %w", devicePath, err) } switch existingFormat { case "": err = encryptDevice(ctx, volOptions, devicePath) if err != nil { - return "", fmt.Errorf("failed to encrypt rbd image %s: %v", imageSpec, err) + return "", fmt.Errorf("failed to encrypt rbd image %s: %w", imageSpec, err) } case "crypt": util.WarningLog(ctx, "rbd image %s is encrypted, but encryption state was not updated",