Unverified Commit 5a44d2cc authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #58226 from lpabon/b58092

Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. csi: Fix versioning error message **What this PR does / why we need it**: Incorrect error message **Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*: Fixes #58092
parents 6ec4cb10 ea31f8f7
...@@ -93,6 +93,7 @@ func (c *csiDriverClient) assertConnection() error { ...@@ -93,6 +93,7 @@ func (c *csiDriverClient) assertConnection() error {
// If version is not supported, the assertion fails with an 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 // This test should be done early during the storage operation flow to avoid
// unnecessary calls later. // unnecessary calls later.
// `ver` argument holds the expected supported version.
func (c *csiDriverClient) AssertSupportedVersion(ctx grpctx.Context, ver *csipb.Version) error { func (c *csiDriverClient) AssertSupportedVersion(ctx grpctx.Context, ver *csipb.Version) error {
if c.versionAsserted { if c.versionAsserted {
if !c.versionSupported { if !c.versionSupported {
...@@ -129,7 +130,10 @@ func (c *csiDriverClient) AssertSupportedVersion(ctx grpctx.Context, ver *csipb. ...@@ -129,7 +130,10 @@ func (c *csiDriverClient) AssertSupportedVersion(ctx grpctx.Context, ver *csipb.
c.versionSupported = supported c.versionSupported = supported
if !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))) glog.V(4).Info(log("version %s supported", verToStr(ver)))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment