vendor: github.com/moby/swarmkit/v2 v2.0.0-20230315203717-e28e8ba9bc83
- CSI: Manager PublishVolume verify CSI node ID is not empty
full diff: a745a8755c...e28e8ba9bc
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
b19dbee3f7
commit
72dc7a0f7b
4 changed files with 12 additions and 4 deletions
|
@ -61,7 +61,7 @@ require (
|
|||
github.com/moby/locker v1.0.1
|
||||
github.com/moby/patternmatcher v0.5.0
|
||||
github.com/moby/pubsub v1.0.0
|
||||
github.com/moby/swarmkit/v2 v2.0.0-20230309194213-a745a8755ce3
|
||||
github.com/moby/swarmkit/v2 v2.0.0-20230315203717-e28e8ba9bc83
|
||||
github.com/moby/sys/mount v0.3.3
|
||||
github.com/moby/sys/mountinfo v0.6.2
|
||||
github.com/moby/sys/sequential v0.5.0
|
||||
|
|
|
@ -1052,8 +1052,8 @@ github.com/moby/patternmatcher v0.5.0 h1:YCZgJOeULcxLw1Q+sVR636pmS7sPEn1Qo2iAN6M
|
|||
github.com/moby/patternmatcher v0.5.0/go.mod h1:hDPoyOpDY7OrrMDLaYoY3hf52gNCR/YOUYxkhApJIxc=
|
||||
github.com/moby/pubsub v1.0.0 h1:jkp/imWsmJz2f6LyFsk7EkVeN2HxR/HTTOY8kHrsxfA=
|
||||
github.com/moby/pubsub v1.0.0/go.mod h1:bXSO+3h5MNXXCaEG+6/NlAIk7MMZbySZlnB+cUQhKKc=
|
||||
github.com/moby/swarmkit/v2 v2.0.0-20230309194213-a745a8755ce3 h1:05e6sB9az9OINsgqSy1PiSC9i0ffkpfQd0oJGAigo6k=
|
||||
github.com/moby/swarmkit/v2 v2.0.0-20230309194213-a745a8755ce3/go.mod h1:GvjR7mC8YuUd9Mq44lrrIZPaXyKPAGEUMBpAQzaj3dI=
|
||||
github.com/moby/swarmkit/v2 v2.0.0-20230315203717-e28e8ba9bc83 h1:jUbNDiRMDXd2rYoa4bcI+g3nIb4A1R8HNCe9wdCdh8I=
|
||||
github.com/moby/swarmkit/v2 v2.0.0-20230315203717-e28e8ba9bc83/go.mod h1:GvjR7mC8YuUd9Mq44lrrIZPaXyKPAGEUMBpAQzaj3dI=
|
||||
github.com/moby/sys/mount v0.1.0/go.mod h1:FVQFLDRWwyBjDTBNQXDlWnSFREqOo3OKX9aqhmeoo74=
|
||||
github.com/moby/sys/mount v0.1.1/go.mod h1:FVQFLDRWwyBjDTBNQXDlWnSFREqOo3OKX9aqhmeoo74=
|
||||
github.com/moby/sys/mount v0.3.3 h1:fX1SVkXFJ47XWDoeFW4Sq7PdQJnV2QIDZAqjNqgEjUs=
|
||||
|
|
8
vendor/github.com/moby/swarmkit/v2/manager/csi/plugin.go
generated
vendored
8
vendor/github.com/moby/swarmkit/v2/manager/csi/plugin.go
generated
vendored
|
@ -6,11 +6,14 @@ import (
|
|||
"fmt"
|
||||
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/status"
|
||||
|
||||
"github.com/container-storage-interface/spec/lib/go/csi"
|
||||
"github.com/docker/docker/pkg/plugingetter"
|
||||
"github.com/moby/swarmkit/v2/api"
|
||||
"github.com/moby/swarmkit/v2/internal/csi/capability"
|
||||
"github.com/moby/swarmkit/v2/log"
|
||||
)
|
||||
|
||||
// Plugin is the interface for a CSI controller plugin.
|
||||
|
@ -204,6 +207,11 @@ func (p *plugin) PublishVolume(ctx context.Context, v *api.Volume, nodeID string
|
|||
if !p.publisher {
|
||||
return nil, nil
|
||||
}
|
||||
csiNodeID := p.swarmToCSI[nodeID]
|
||||
if csiNodeID == "" {
|
||||
log.L.Errorf("CSI node ID not found for given Swarm node ID. Plugin: %s , Swarm node ID: %s", p.name, nodeID)
|
||||
return nil, status.Error(codes.FailedPrecondition, "CSI node ID not found for given Swarm node ID")
|
||||
}
|
||||
|
||||
req := p.makeControllerPublishVolumeRequest(v, nodeID)
|
||||
c, err := p.Client(ctx)
|
||||
|
|
2
vendor/modules.txt
vendored
2
vendor/modules.txt
vendored
|
@ -732,7 +732,7 @@ github.com/moby/patternmatcher
|
|||
# github.com/moby/pubsub v1.0.0
|
||||
## explicit; go 1.19
|
||||
github.com/moby/pubsub
|
||||
# github.com/moby/swarmkit/v2 v2.0.0-20230309194213-a745a8755ce3
|
||||
# github.com/moby/swarmkit/v2 v2.0.0-20230315203717-e28e8ba9bc83
|
||||
## explicit; go 1.18
|
||||
github.com/moby/swarmkit/v2/agent
|
||||
github.com/moby/swarmkit/v2/agent/configs
|
||||
|
|
Loading…
Reference in a new issue