Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
ea31f8f7
Commit
ea31f8f7
authored
Jan 11, 2018
by
Luis Pabón
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
csi: Fix versioning error message
Closes #58092
parent
d047218f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
csi_client.go
pkg/volume/csi/csi_client.go
+5
-1
No files found.
pkg/volume/csi/csi_client.go
View file @
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
)))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment