From ea31f8f7ec4ebf3360e3dc4f3e4b792c52c75b20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20Pab=C3=B3n?= Date: Thu, 11 Jan 2018 13:56:08 -0500 Subject: [PATCH] csi: Fix versioning error message Closes #58092 --- pkg/volume/csi/csi_client.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkg/volume/csi/csi_client.go b/pkg/volume/csi/csi_client.go index c8b8ad0f28..aa8a6f58c6 100644 --- a/pkg/volume/csi/csi_client.go +++ b/pkg/volume/csi/csi_client.go @@ -93,6 +93,7 @@ func (c *csiDriverClient) assertConnection() error { // If version is not supported, the assertion fails with an error. // This test should be done early during the storage operation flow to avoid // unnecessary calls later. +// `ver` argument holds the expected supported version. func (c *csiDriverClient) AssertSupportedVersion(ctx grpctx.Context, ver *csipb.Version) error { if c.versionAsserted { if !c.versionSupported { @@ -129,7 +130,10 @@ func (c *csiDriverClient) AssertSupportedVersion(ctx grpctx.Context, ver *csipb. c.versionSupported = supported if !supported { - return fmt.Errorf("version %s not supported", verToStr(ver)) + return fmt.Errorf( + "CSI Driver does not support version %s. Instead it supports versions %s", + verToStr(ver), + versToStr(vers)) } glog.V(4).Info(log("version %s supported", verToStr(ver)))