mirror of https://github.com/k3s-io/k3s
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 #58092pull/6/head
commit
5a44d2ccac
|
@ -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.
|
||||||
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)))
|
||||||
|
|
Loading…
Reference in New Issue