mirror of https://github.com/docker/cli.git
vendor: github.com/docker/swarmkit 616e8db4c3b0
full diff: 3629f50980...616e8db4c3
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
02a06cf9aa
commit
4f118c7636
|
@ -10,17 +10,15 @@ require (
|
|||
github.com/Microsoft/go-winio v0.5.1 // indirect
|
||||
github.com/cespare/xxhash/v2 v2.1.2 // indirect
|
||||
github.com/containerd/containerd v1.5.10
|
||||
github.com/coreos/etcd v3.3.27+incompatible // indirect
|
||||
github.com/creack/pty v1.1.11
|
||||
github.com/docker/distribution v2.8.1+incompatible
|
||||
github.com/docker/docker v20.10.7+incompatible // see "replace" for the actual version
|
||||
github.com/docker/docker-credential-helpers v0.6.4
|
||||
github.com/docker/go-connections v0.4.0
|
||||
github.com/docker/go-units v0.4.0
|
||||
github.com/docker/swarmkit v1.12.1-0.20210726173615-3629f50980f6
|
||||
github.com/docker/swarmkit v1.12.1-0.20220307221335-616e8db4c3b0
|
||||
github.com/fvbommel/sortorder v1.0.2
|
||||
github.com/gogo/protobuf v1.3.2
|
||||
github.com/golang/protobuf v1.5.2 // indirect
|
||||
github.com/google/go-cmp v0.5.7
|
||||
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510
|
||||
github.com/imdario/mergo v0.3.12
|
||||
|
@ -42,6 +40,7 @@ require (
|
|||
github.com/tonistiigi/go-rosetta v0.0.0-20200727161949-f79598599c5d
|
||||
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect
|
||||
github.com/xeipuuv/gojsonschema v1.2.0
|
||||
go.etcd.io/etcd/raft/v3 v3.5.2 // indirect
|
||||
golang.org/x/crypto v0.0.0-20211202192323-5770296d904e // indirect
|
||||
golang.org/x/net v0.0.0-20211216030914-fe4d6282115f // indirect
|
||||
golang.org/x/sys v0.0.0-20220114195835-da31bd327af9
|
||||
|
|
22
vendor.sum
22
vendor.sum
|
@ -97,6 +97,8 @@ github.com/bugsnag/panicwrap v0.0.0-20151223152923-e2c28503fcd0 h1:nvj0OLI3YqYXe
|
|||
github.com/bugsnag/panicwrap v0.0.0-20151223152923-e2c28503fcd0/go.mod h1:D/8v3kj0zr8ZAKg1AQ6crr+5VwKN5eIywRkfhyM/+dE=
|
||||
github.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw=
|
||||
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
|
||||
github.com/certifi/gocertifi v0.0.0-20191021191039-0944d244cd40/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA=
|
||||
github.com/certifi/gocertifi v0.0.0-20200922220541-2c3bb06c6054/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA=
|
||||
github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
||||
github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE=
|
||||
github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
||||
|
@ -118,6 +120,9 @@ github.com/cloudflare/cfssl v0.0.0-20180223231731-4e2dcbde5004/go.mod h1:yMWuSON
|
|||
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
|
||||
github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
|
||||
github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8=
|
||||
github.com/cockroachdb/datadriven v0.0.0-20200714090401-bf6692d28da5/go.mod h1:h6jFvWxBdQXxjopDMZyH2UVceIRfR84bdzbkoKrsWNo=
|
||||
github.com/cockroachdb/errors v1.2.4/go.mod h1:rQD95gz6FARkaKkQXUksEje/d9a6wBJoCr5oaCLELYA=
|
||||
github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f/go.mod h1:i/u985jwjWRlyHXQbwatDASoW0RMlZ/3i9yJHE2xLkI=
|
||||
github.com/codahale/hdrhistogram v0.0.0-20160425231609-f8ad88b59a58/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI=
|
||||
github.com/containerd/aufs v0.0.0-20200908144142-dab0cbea06f4/go.mod h1:nukgQABAEopAHvB6j7cnP5zJ+/3aVcE7hCYqvIwAHyE=
|
||||
github.com/containerd/aufs v0.0.0-20201003224125-76a6863f2989/go.mod h1:AkGGQs9NM2vtYHaUen+NljV0/baGCAPELGm2q9ZXpWU=
|
||||
|
@ -212,8 +217,6 @@ github.com/containers/ocicrypt v1.1.1/go.mod h1:Dm55fwWm1YZAjYRaJ94z2mfZikIyIN4B
|
|||
github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk=
|
||||
github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
|
||||
github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
|
||||
github.com/coreos/etcd v3.3.27+incompatible h1:QIudLb9KeBsE5zyYxd1mjzRSkzLg9Wf9QlRwFgd6oTA=
|
||||
github.com/coreos/etcd v3.3.27+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
|
||||
github.com/coreos/go-iptables v0.4.5/go.mod h1:/mVI274lEDI2ns62jHCDnCyBF9Iwsmekav8Dbxlm1MU=
|
||||
github.com/coreos/go-iptables v0.5.0/go.mod h1:/mVI274lEDI2ns62jHCDnCyBF9Iwsmekav8Dbxlm1MU=
|
||||
github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc=
|
||||
|
@ -276,8 +279,8 @@ github.com/docker/libtrust v0.0.0-20150114040149-fa567046d9b1/go.mod h1:cyGadeNE
|
|||
github.com/docker/libtrust v0.0.0-20160708172513-aabc10ec26b7 h1:UhxFibDNY/bfvqU5CAUmr9zpesgbU6SWc8/B4mflAE4=
|
||||
github.com/docker/libtrust v0.0.0-20160708172513-aabc10ec26b7/go.mod h1:cyGadeNEkKy96OOhEzfZl+yxihPEzKnqJwvfuSUqbZE=
|
||||
github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM=
|
||||
github.com/docker/swarmkit v1.12.1-0.20210726173615-3629f50980f6 h1:mFQcXSzzNXVKAnl0KltjSQ7rbgipTYcXJns4sucurKA=
|
||||
github.com/docker/swarmkit v1.12.1-0.20210726173615-3629f50980f6/go.mod h1:n3Z4lIEl7g261ptkGDBcYi/3qBMDl9csaAhwi2MPejs=
|
||||
github.com/docker/swarmkit v1.12.1-0.20220307221335-616e8db4c3b0 h1:YehAv2BPLfTm58HW04wRnNy8Oo/CAzWji7mjJ6UJWgM=
|
||||
github.com/docker/swarmkit v1.12.1-0.20220307221335-616e8db4c3b0/go.mod h1:n3Z4lIEl7g261ptkGDBcYi/3qBMDl9csaAhwi2MPejs=
|
||||
github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE=
|
||||
github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
|
||||
github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
|
||||
|
@ -303,6 +306,7 @@ github.com/fullsailor/pkcs7 v0.0.0-20190404230743-d7302db945fa/go.mod h1:KnogPXt
|
|||
github.com/fvbommel/sortorder v1.0.2 h1:mV4o8B2hKboCdkJm+a7uX/SIpZob4JzUpc5GGnM45eo=
|
||||
github.com/fvbommel/sortorder v1.0.2/go.mod h1:uk88iVf1ovNn1iLfgUVU2F9o5eO30ui720w+kxuqRs0=
|
||||
github.com/garyburd/redigo v0.0.0-20150301180006-535138d7bcd7/go.mod h1:NR3MbYisc3/PwhQ00EMzDiPmrwpPxAn5GI05/YaO1SY=
|
||||
github.com/getsentry/raven-go v0.2.0/go.mod h1:KungGk8q33+aIAZUIVWZDr2OfAEBsO49PX4NzFV5kcQ=
|
||||
github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
|
||||
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
|
||||
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
|
||||
|
@ -751,7 +755,11 @@ github.com/yvasiyarov/newrelic_platform_go v0.0.0-20140908184405-b21fdbd4370f/go
|
|||
go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
|
||||
go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
|
||||
go.etcd.io/bbolt v1.3.5/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ=
|
||||
go.etcd.io/etcd v0.5.0-alpha.5.0.20200910180754-dd1b699fc489 h1:1JFLBqwIgdyHN1ZtgjTBwO+blA6gVOmZurpiMEsETKo=
|
||||
go.etcd.io/etcd v0.5.0-alpha.5.0.20200910180754-dd1b699fc489/go.mod h1:yVHk9ub3CSBatqGNg7GRmsnfLWtoW60w4eDYfh7vHDg=
|
||||
go.etcd.io/etcd/client/pkg/v3 v3.5.2/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g=
|
||||
go.etcd.io/etcd/raft/v3 v3.5.2 h1:uCC37qOXqBvKqTGHGyhASsaCsnTuJugl1GvneJNwHWo=
|
||||
go.etcd.io/etcd/raft/v3 v3.5.2/go.mod h1:G6pCP1sFgbjod7/KnEHY0vHUViqxjkdt6AiKsD0GRr8=
|
||||
go.mozilla.org/pkcs7 v0.0.0-20200128120323-432b2356ecb1/go.mod h1:SNgMg+EgDFwmvSmLRTNKC5fegJjB7v23qTQ0XLGUNHk=
|
||||
go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=
|
||||
go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8=
|
||||
|
@ -759,8 +767,11 @@ go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
|
|||
go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
|
||||
go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
|
||||
go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
|
||||
go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
|
||||
go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0=
|
||||
go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU=
|
||||
go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
|
||||
go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo=
|
||||
golang.org/x/crypto v0.0.0-20171113213409-9f005a07e0d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
golang.org/x/crypto v0.0.0-20181009213950-7c1a557ab941/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
|
@ -1104,8 +1115,9 @@ gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
|||
gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
|
||||
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
|
||||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
|
||||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo=
|
||||
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo=
|
||||
gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw=
|
||||
gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk=
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
CoreOS Project
|
||||
Copyright 2014 CoreOS, Inc
|
||||
|
||||
This product includes software developed at CoreOS, Inc.
|
||||
(http://www.coreos.com/).
|
|
@ -1,95 +0,0 @@
|
|||
syntax = "proto2";
|
||||
package raftpb;
|
||||
|
||||
import "gogoproto/gogo.proto";
|
||||
|
||||
option (gogoproto.marshaler_all) = true;
|
||||
option (gogoproto.sizer_all) = true;
|
||||
option (gogoproto.unmarshaler_all) = true;
|
||||
option (gogoproto.goproto_getters_all) = false;
|
||||
option (gogoproto.goproto_enum_prefix_all) = false;
|
||||
|
||||
enum EntryType {
|
||||
EntryNormal = 0;
|
||||
EntryConfChange = 1;
|
||||
}
|
||||
|
||||
message Entry {
|
||||
optional uint64 Term = 2 [(gogoproto.nullable) = false]; // must be 64-bit aligned for atomic operations
|
||||
optional uint64 Index = 3 [(gogoproto.nullable) = false]; // must be 64-bit aligned for atomic operations
|
||||
optional EntryType Type = 1 [(gogoproto.nullable) = false];
|
||||
optional bytes Data = 4;
|
||||
}
|
||||
|
||||
message SnapshotMetadata {
|
||||
optional ConfState conf_state = 1 [(gogoproto.nullable) = false];
|
||||
optional uint64 index = 2 [(gogoproto.nullable) = false];
|
||||
optional uint64 term = 3 [(gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
message Snapshot {
|
||||
optional bytes data = 1;
|
||||
optional SnapshotMetadata metadata = 2 [(gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
enum MessageType {
|
||||
MsgHup = 0;
|
||||
MsgBeat = 1;
|
||||
MsgProp = 2;
|
||||
MsgApp = 3;
|
||||
MsgAppResp = 4;
|
||||
MsgVote = 5;
|
||||
MsgVoteResp = 6;
|
||||
MsgSnap = 7;
|
||||
MsgHeartbeat = 8;
|
||||
MsgHeartbeatResp = 9;
|
||||
MsgUnreachable = 10;
|
||||
MsgSnapStatus = 11;
|
||||
MsgCheckQuorum = 12;
|
||||
MsgTransferLeader = 13;
|
||||
MsgTimeoutNow = 14;
|
||||
MsgReadIndex = 15;
|
||||
MsgReadIndexResp = 16;
|
||||
MsgPreVote = 17;
|
||||
MsgPreVoteResp = 18;
|
||||
}
|
||||
|
||||
message Message {
|
||||
optional MessageType type = 1 [(gogoproto.nullable) = false];
|
||||
optional uint64 to = 2 [(gogoproto.nullable) = false];
|
||||
optional uint64 from = 3 [(gogoproto.nullable) = false];
|
||||
optional uint64 term = 4 [(gogoproto.nullable) = false];
|
||||
optional uint64 logTerm = 5 [(gogoproto.nullable) = false];
|
||||
optional uint64 index = 6 [(gogoproto.nullable) = false];
|
||||
repeated Entry entries = 7 [(gogoproto.nullable) = false];
|
||||
optional uint64 commit = 8 [(gogoproto.nullable) = false];
|
||||
optional Snapshot snapshot = 9 [(gogoproto.nullable) = false];
|
||||
optional bool reject = 10 [(gogoproto.nullable) = false];
|
||||
optional uint64 rejectHint = 11 [(gogoproto.nullable) = false];
|
||||
optional bytes context = 12;
|
||||
}
|
||||
|
||||
message HardState {
|
||||
optional uint64 term = 1 [(gogoproto.nullable) = false];
|
||||
optional uint64 vote = 2 [(gogoproto.nullable) = false];
|
||||
optional uint64 commit = 3 [(gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
message ConfState {
|
||||
repeated uint64 nodes = 1;
|
||||
repeated uint64 learners = 2;
|
||||
}
|
||||
|
||||
enum ConfChangeType {
|
||||
ConfChangeAddNode = 0;
|
||||
ConfChangeRemoveNode = 1;
|
||||
ConfChangeUpdateNode = 2;
|
||||
ConfChangeAddLearnerNode = 3;
|
||||
}
|
||||
|
||||
message ConfChange {
|
||||
optional uint64 ID = 1 [(gogoproto.nullable) = false];
|
||||
optional ConfChangeType Type = 2 [(gogoproto.nullable) = false];
|
||||
optional uint64 NodeID = 3 [(gogoproto.nullable) = false];
|
||||
optional bytes Context = 4;
|
||||
}
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -246,6 +246,34 @@ service Control {
|
|||
rpc RemoveResource(RemoveResourceRequest) returns (RemoveResourceResponse) {
|
||||
option (docker.protobuf.plugin.tls_authorization) = { roles: "swarm-manager" };
|
||||
}
|
||||
|
||||
// --- volumes APIs ---
|
||||
|
||||
// CreateVolume returns a `CreateVolumeResponse` with a `Volume` based on the
|
||||
// provided `CreateVolumeRequest.VolumeSpec`.
|
||||
// - Returns `InvalidArgument` if the `CreateVolumeRequest.VolumeSpec` is
|
||||
// malformed.
|
||||
rpc CreateVolume(CreateVolumeRequest) returns (CreateVolumeResponse) {
|
||||
option (docker.protobuf.plugin.tls_authorization) = { roles: "swarm-manager" };
|
||||
}
|
||||
|
||||
// GetVolume returns a `GetVolumeResponse` with a Volume with the same ID
|
||||
// as `GetVolumeRequest.ID`
|
||||
rpc GetVolume(GetVolumeRequest) returns (GetVolumeResponse) {
|
||||
option (docker.protobuf.plugin.tls_authorization) = { roles: "swarm-manager" };
|
||||
}
|
||||
|
||||
rpc UpdateVolume(UpdateVolumeRequest) returns (UpdateVolumeResponse) {
|
||||
option (docker.protobuf.plugin.tls_authorization) = { roles: "swarm-manager" };
|
||||
}
|
||||
|
||||
rpc ListVolumes(ListVolumesRequest) returns (ListVolumesResponse) {
|
||||
option (docker.protobuf.plugin.tls_authorization) = { roles: "swarm-manager" };
|
||||
}
|
||||
|
||||
rpc RemoveVolume(RemoveVolumeRequest) returns (RemoveVolumeResponse) {
|
||||
option (docker.protobuf.plugin.tls_authorization) = { roles: "swarm-manager" };
|
||||
}
|
||||
}
|
||||
|
||||
message GetNodeRequest {
|
||||
|
@ -787,3 +815,57 @@ message ListResourcesRequest {
|
|||
message ListResourcesResponse {
|
||||
repeated Resource resources = 1;
|
||||
}
|
||||
|
||||
message CreateVolumeRequest {
|
||||
VolumeSpec spec = 1;
|
||||
}
|
||||
|
||||
message CreateVolumeResponse {
|
||||
Volume volume = 1;
|
||||
}
|
||||
|
||||
message GetVolumeRequest {
|
||||
string volume_id = 1;
|
||||
}
|
||||
|
||||
message GetVolumeResponse {
|
||||
Volume volume = 1;
|
||||
}
|
||||
|
||||
message UpdateVolumeRequest {
|
||||
string volume_id = 1;
|
||||
|
||||
Version volume_version = 2;
|
||||
|
||||
VolumeSpec spec = 3;
|
||||
}
|
||||
|
||||
message UpdateVolumeResponse {
|
||||
Volume volume = 1;
|
||||
}
|
||||
|
||||
message ListVolumesRequest {
|
||||
message Filters {
|
||||
repeated string names = 1;
|
||||
repeated string id_prefixes = 2;
|
||||
map<string, string> labels = 3;
|
||||
repeated string name_prefixes = 4;
|
||||
repeated string groups = 5;
|
||||
repeated string drivers = 6;
|
||||
}
|
||||
|
||||
Filters filters = 1;
|
||||
}
|
||||
|
||||
message ListVolumesResponse {
|
||||
repeated Volume volumes = 1;
|
||||
}
|
||||
|
||||
message RemoveVolumeRequest {
|
||||
string volume_id = 1;
|
||||
// Force forces the volume to be deleted from swarmkit, regardless of
|
||||
// whether its current state would permit such an action.
|
||||
bool force = 2;
|
||||
}
|
||||
|
||||
message RemoveVolumeResponse {}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -42,6 +42,13 @@ service Dispatcher { // maybe dispatch, al likes this
|
|||
option (docker.protobuf.plugin.tls_authorization) = { roles: "swarm-worker" roles: "swarm-manager" };
|
||||
};
|
||||
|
||||
// UpdateVolumeStatus updates the status of a Volume. Like
|
||||
// UpdateTaskStatus, the node should send such updates on every status
|
||||
// change of its volumes.
|
||||
rpc UpdateVolumeStatus(UpdateVolumeStatusRequest) returns (UpdateVolumeStatusResponse) {
|
||||
option (docker.protobuf.plugin.tls_authorization) = { roles: "swarm-worker" roles: "swarm-manager" };
|
||||
};
|
||||
|
||||
// Tasks is a stream of tasks state for node. Each message contains full list
|
||||
// of tasks which should be run on node, if task is not present in that list,
|
||||
// it should be terminated.
|
||||
|
@ -155,10 +162,35 @@ message UpdateTaskStatusRequest {
|
|||
repeated TaskStatusUpdate updates = 3;
|
||||
}
|
||||
|
||||
message UpdateTaskStatusResponse{
|
||||
message UpdateTaskStatusResponse{
|
||||
// void
|
||||
}
|
||||
|
||||
message UpdateVolumeStatusRequest {
|
||||
string session_id = 1;
|
||||
|
||||
message VolumeStatusUpdate {
|
||||
// ID is the ID of the volume being updated. This is the Swarmkit ID,
|
||||
// not the CSI VolumeID.
|
||||
string id = 1;
|
||||
// Unpublished is set to true when the volume is affirmatively
|
||||
// unpublished on the Node side. We don't need to report that a Volume
|
||||
// is published on the the node; as soon as the Volume is assigned to
|
||||
// the Node, we must assume that it has been published until informed
|
||||
// otherwise.
|
||||
//
|
||||
// Further, the Node must not send unpublished = true unless it will
|
||||
// definitely no longer attempt to call NodePublishVolume.
|
||||
bool unpublished = 2;
|
||||
}
|
||||
|
||||
repeated VolumeStatusUpdate updates = 2;
|
||||
}
|
||||
|
||||
message UpdateVolumeStatusResponse {
|
||||
// empty on purpose
|
||||
}
|
||||
|
||||
message TasksRequest {
|
||||
string session_id = 1;
|
||||
}
|
||||
|
@ -178,6 +210,7 @@ message Assignment {
|
|||
Task task = 1;
|
||||
Secret secret = 2;
|
||||
Config config = 3;
|
||||
VolumeAssignment volume = 4;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -269,6 +269,10 @@ message Task {
|
|||
// JobIteration is the iteration number of the Job-mode Service that this
|
||||
// task belongs to.
|
||||
Version job_iteration = 16;
|
||||
|
||||
// Volumes is a list of VolumeAttachments for this task. It specifies which
|
||||
// volumes this task is allocated.
|
||||
repeated VolumeAttachment volumes = 17;
|
||||
}
|
||||
|
||||
// NetworkAttachment specifies the network parameters of attachment to
|
||||
|
@ -510,3 +514,43 @@ message Extension {
|
|||
// // Indices, with values expressed as Go templates.
|
||||
//repeated IndexEntry index_templates = 6;
|
||||
}
|
||||
|
||||
// Volume is the top-level object describing a volume usable by Swarmkit. The
|
||||
// Volume contains the user's VolumeSpec, the Volume's status, and the Volume
|
||||
// object that was returned by the CSI Plugin when the volume was created.
|
||||
message Volume {
|
||||
option (docker.protobuf.plugin.store_object) = {
|
||||
watch_selectors: {
|
||||
id: true
|
||||
id_prefix: true
|
||||
name: true
|
||||
name_prefix: true
|
||||
custom: true
|
||||
custom_prefix: true
|
||||
}
|
||||
};
|
||||
|
||||
// ID is the swarmkit-internal ID for this volume object. This has no
|
||||
// relation to the CSI volume identifier provided by the CSI Plugin.
|
||||
string id = 1;
|
||||
Meta meta = 2 [(gogoproto.nullable) = false];
|
||||
|
||||
// Spec is the desired state of the Volume, as provided by the user.
|
||||
VolumeSpec spec = 3 [(gogoproto.nullable) = false];
|
||||
|
||||
// PublishStatus is the status of the volume as it pertains to the various
|
||||
// nodes it is in use on.
|
||||
repeated VolumePublishStatus publish_status = 4;
|
||||
|
||||
// VolumeInfo contains information about the volume originating from the
|
||||
// CSI plugin when the volume is created.
|
||||
VolumeInfo volume_info = 5;
|
||||
|
||||
// PendingDelete indicates that this Volume is being removed from Swarm.
|
||||
// Before a Volume can be removed, we must call the DeleteVolume on the
|
||||
// Controller. Because of this, we cannot immediately remove the Volume
|
||||
// when a user wishes to delete it. Instead, we will mark a Volume with
|
||||
// PendingDelete = true, which instructs Swarm to go through the work of
|
||||
// removing the volume and then delete it when finished.
|
||||
bool pending_delete = 6;
|
||||
}
|
||||
|
|
|
@ -6,10 +6,10 @@ package api
|
|||
import (
|
||||
context "context"
|
||||
fmt "fmt"
|
||||
raftpb "github.com/coreos/etcd/raft/raftpb"
|
||||
github_com_docker_swarmkit_api_deepcopy "github.com/docker/swarmkit/api/deepcopy"
|
||||
raftselector "github.com/docker/swarmkit/manager/raftselector"
|
||||
proto "github.com/gogo/protobuf/proto"
|
||||
raftpb "go.etcd.io/etcd/raft/v3/raftpb"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
metadata "google.golang.org/grpc/metadata"
|
||||
|
@ -532,6 +532,7 @@ type StoreAction struct {
|
|||
// *StoreAction_Resource
|
||||
// *StoreAction_Extension
|
||||
// *StoreAction_Config
|
||||
// *StoreAction_Volume
|
||||
Target isStoreAction_Target `protobuf_oneof:"target"`
|
||||
}
|
||||
|
||||
|
@ -600,6 +601,9 @@ type StoreAction_Extension struct {
|
|||
type StoreAction_Config struct {
|
||||
Config *Config `protobuf:"bytes,10,opt,name=config,proto3,oneof" json:"config,omitempty"`
|
||||
}
|
||||
type StoreAction_Volume struct {
|
||||
Volume *Volume `protobuf:"bytes,11,opt,name=volume,proto3,oneof" json:"volume,omitempty"`
|
||||
}
|
||||
|
||||
func (*StoreAction_Node) isStoreAction_Target() {}
|
||||
func (*StoreAction_Service) isStoreAction_Target() {}
|
||||
|
@ -610,6 +614,7 @@ func (*StoreAction_Secret) isStoreAction_Target() {}
|
|||
func (*StoreAction_Resource) isStoreAction_Target() {}
|
||||
func (*StoreAction_Extension) isStoreAction_Target() {}
|
||||
func (*StoreAction_Config) isStoreAction_Target() {}
|
||||
func (*StoreAction_Volume) isStoreAction_Target() {}
|
||||
|
||||
func (m *StoreAction) GetTarget() isStoreAction_Target {
|
||||
if m != nil {
|
||||
|
@ -681,6 +686,13 @@ func (m *StoreAction) GetConfig() *Config {
|
|||
return nil
|
||||
}
|
||||
|
||||
func (m *StoreAction) GetVolume() *Volume {
|
||||
if x, ok := m.GetTarget().(*StoreAction_Volume); ok {
|
||||
return x.Volume
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// XXX_OneofWrappers is for the internal use of the proto package.
|
||||
func (*StoreAction) XXX_OneofWrappers() []interface{} {
|
||||
return []interface{}{
|
||||
|
@ -693,6 +705,7 @@ func (*StoreAction) XXX_OneofWrappers() []interface{} {
|
|||
(*StoreAction_Resource)(nil),
|
||||
(*StoreAction_Extension)(nil),
|
||||
(*StoreAction_Config)(nil),
|
||||
(*StoreAction_Volume)(nil),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -718,72 +731,73 @@ func init() {
|
|||
}
|
||||
|
||||
var fileDescriptor_d2c32e1e3c930c15 = []byte{
|
||||
// 1028 bytes of a gzipped FileDescriptorProto
|
||||
// 1046 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x96, 0x41, 0x73, 0xdb, 0x44,
|
||||
0x14, 0xc7, 0x25, 0x5b, 0x75, 0x9a, 0x97, 0x36, 0x09, 0x5b, 0x12, 0x14, 0xb5, 0x28, 0xae, 0xda,
|
||||
0x19, 0x9c, 0x90, 0xc8, 0x83, 0x61, 0xa6, 0x4c, 0xa1, 0x87, 0x38, 0xf1, 0x4c, 0x4c, 0x5a, 0xa7,
|
||||
0xa3, 0x24, 0xd0, 0x5b, 0x90, 0xa5, 0x8d, 0x2b, 0x1c, 0x6b, 0xcd, 0xee, 0x3a, 0x81, 0x0b, 0xd3,
|
||||
0x23, 0xe4, 0xc4, 0x0d, 0x86, 0x99, 0x0e, 0x07, 0x38, 0xf7, 0x03, 0xf0, 0x01, 0x98, 0x0c, 0xa7,
|
||||
0xde, 0xe8, 0x29, 0x43, 0x9d, 0x3b, 0x7c, 0x05, 0x66, 0x57, 0x52, 0x12, 0x6c, 0xd9, 0xf1, 0x81,
|
||||
0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4, 0xfc, 0x90, 0xd0,
|
||||
0xa6, 0x7e, 0x65, 0xb0, 0x51, 0x2d, 0x42, 0x84, 0x51, 0x4c, 0x0b, 0xa1, 0xb7, 0xdf, 0x61, 0x1c,
|
||||
0x53, 0x3d, 0x37, 0x58, 0xb8, 0x1a, 0x21, 0x42, 0x18, 0xd3, 0xe8, 0x03, 0xc8, 0x31, 0xec, 0x51,
|
||||
0xcc, 0xf5, 0x31, 0xa9, 0x33, 0xd2, 0x57, 0x26, 0x88, 0x75, 0xd1, 0x52, 0xe4, 0x08, 0xdd, 0x87,
|
||||
0xab, 0x14, 0x33, 0xd2, 0xa1, 0x1e, 0xd6, 0xaf, 0x4a, 0xdd, 0xad, 0xd4, 0x6b, 0x18, 0x33, 0xeb,
|
||||
0x8a, 0x73, 0xc6, 0xa3, 0x07, 0x30, 0x8e, 0xbf, 0xe2, 0x38, 0x64, 0xe2, 0xf0, 0xc6, 0xa5, 0xf8,
|
||||
0xed, 0x34, 0x71, 0x25, 0x81, 0xd6, 0x15, 0xe7, 0x5c, 0x21, 0x12, 0xf6, 0x48, 0xb8, 0x17, 0x34,
|
||||
0x74, 0x18, 0x9c, 0xf0, 0xaa, 0x24, 0x44, 0xc2, 0x11, 0x5b, 0xbe, 0x0a, 0x39, 0xee, 0xd2, 0x06,
|
||||
0xe6, 0x8b, 0xff, 0xa8, 0x30, 0xd5, 0x53, 0x17, 0xe8, 0x1d, 0x18, 0xdb, 0xa9, 0x6d, 0xd4, 0x36,
|
||||
0x3f, 0xab, 0x4d, 0x2b, 0x86, 0x71, 0xf4, 0x3c, 0x3f, 0xdb, 0x43, 0xec, 0x84, 0xcd, 0x90, 0x1c,
|
||||
0x86, 0xa8, 0x04, 0x37, 0xb6, 0xb6, 0x37, 0x9d, 0xca, 0xee, 0xca, 0xea, 0x76, 0x75, 0xb3, 0xb6,
|
||||
0xbb, 0xea, 0x54, 0x56, 0xb6, 0x2b, 0xd3, 0xaa, 0x31, 0x77, 0xf4, 0x3c, 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x1d, 0xbf, 0x48, 0x9d, 0x3d, 0x6e, 0x75, 0x28, 0xe1, 0x04, 0xa1, 0x70, 0xde,
|
||||
0x8a, 0xe7, 0xad, 0xde, 0x07, 0xc6, 0xd2, 0x25, 0x72, 0x52, 0xff, 0x02, 0xbb, 0x9c, 0x85, 0x11,
|
||||
0x8c, 0xc5, 0x4b, 0x68, 0xfe, 0x75, 0x07, 0xc7, 0xec, 0x42, 0x83, 0x58, 0x98, 0xbb, 0x9e, 0xe5,
|
||||
0x93, 0xa2, 0xf8, 0xca, 0x4c, 0x8a, 0xbd, 0xbb, 0xf2, 0xdb, 0xa9, 0x9f, 0x49, 0xcc, 0x78, 0xbb,
|
||||
0x41, 0x1a, 0x44, 0x0e, 0x8b, 0x62, 0x14, 0xfd, 0x7a, 0x6f, 0x88, 0x99, 0x24, 0xea, 0xdd, 0xbd,
|
||||
0x62, 0xa7, 0xd5, 0x6d, 0xf8, 0x41, 0xf4, 0x09, 0x85, 0xf9, 0x97, 0x2a, 0x80, 0xed, 0xec, 0xf1,
|
||||
0x47, 0xb8, 0x5d, 0xc7, 0x14, 0xdd, 0x86, 0x31, 0xe1, 0xb5, 0xeb, 0x7b, 0xba, 0x9a, 0x53, 0x0b,
|
||||
0x5a, 0x19, 0xfa, 0x47, 0xf3, 0x19, 0x01, 0x54, 0xd7, 0xec, 0x8c, 0x98, 0xaa, 0x7a, 0x02, 0x0a,
|
||||
0x88, 0x87, 0x05, 0x94, 0xca, 0xa9, 0x85, 0x89, 0x10, 0xaa, 0x11, 0x0f, 0x0b, 0x48, 0x4c, 0x55,
|
||||
0x3d, 0x84, 0x40, 0x73, 0x3c, 0x8f, 0xea, 0x69, 0x41, 0xd8, 0x72, 0x8c, 0xca, 0x90, 0x61, 0xdc,
|
||||
0xe1, 0x5d, 0xa6, 0x6b, 0x39, 0xb5, 0x90, 0x2d, 0xdd, 0xb1, 0x2e, 0xee, 0xb2, 0x75, 0x9a, 0xcd,
|
||||
0x96, 0x64, 0xcb,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0x54, 0xa4, 0x13, 0xd9, 0x8c, 0x72, 0x9e, 0xf9, 0x25, 0x98, 0x3d, 0xaf, 0x8e, 0xca, 0x21,
|
||||
0xa9, 0x66, 0x5a, 0x70, 0xbd, 0x1a, 0x70, 0x4c, 0x03, 0xa7, 0x25, 0xe2, 0xc4, 0x4e, 0xb3, 0x90,
|
||||
0x3a, 0x31, 0xc9, 0xf4, 0x8f, 0xe6, 0x53, 0xd5, 0x35, 0x3b, 0xe5, 0x7b, 0xe8, 0x01, 0x64, 0x1c,
|
||||
0x97, 0xfb, 0x24, 0x88, 0x6a, 0x65, 0x3e, 0xe9, 0xdc, 0xb6, 0x38, 0xa1, 0x78, 0x45, 0x62, 0x71,
|
||||
0x11, 0x87, 0xa2, 0xfc, 0x3f, 0x1a, 0x64, 0xcf, 0xcc, 0xa2, 0x8f, 0x4f, 0xc2, 0x09, 0xab, 0xc9,
|
||||
0xd2, 0xed, 0x4b, 0xc2, 0x6d, 0xf8, 0x81, 0x17, 0x07, 0x43, 0x56, 0x54, 0x41, 0x29, 0xb9, 0xe3,
|
||||
0x7a, 0x92, 0x54, 0xdc, 0xcd, 0x75, 0x25, 0xac, 0x1e, 0x74, 0x0f, 0xc6, 0x18, 0xa6, 0x3d, 0xdf,
|
||||
0xc5, 0xf2, 0x72, 0x66, 0x4b, 0x37, 0x12, 0xdd, 0x42, 0x64, 0x5d, 0xb1, 0x63, 0x5a, 0x18, 0x71,
|
||||
0x87, 0x35, 0xa3, 0xcb, 0x9b, 0x68, 0xb4, 0xed, 0xb0, 0xa6, 0x30, 0x12, 0x9c, 0x30, 0x0a, 0x30,
|
||||
0xdf, 0x27, 0xb4, 0xa9, 0x5f, 0x19, 0x6c, 0x54, 0x0b, 0x11, 0x61, 0x14, 0xd1, 0x42, 0xe8, 0xb6,
|
||||
0xba, 0x8c, 0x63, 0xaa, 0x67, 0x06, 0x0b, 0x57, 0x43, 0x44, 0x08, 0x23, 0x1a, 0x7d, 0x08, 0x19,
|
||||
0x86, 0x5d, 0x8a, 0xb9, 0x3e, 0x26, 0x75, 0x46, 0xf2, 0xca, 0x04, 0xb1, 0x2e, 0x5a, 0x8a, 0x1c,
|
||||
0xa1, 0xfb, 0x30, 0x4e, 0x31, 0x23, 0x5d, 0xea, 0x62, 0x7d, 0x5c, 0xea, 0x6e, 0x26, 0x5e, 0xc3,
|
||||
0x88, 0x59, 0x57, 0xec, 0x13, 0x1e, 0x3d, 0x80, 0x09, 0xfc, 0x15, 0xc7, 0x01, 0x13, 0x87, 0x37,
|
||||
0x21, 0xc5, 0xef, 0x26, 0x89, 0x2b, 0x31, 0xb4, 0xae, 0xd8, 0xa7, 0x0a, 0x91, 0xb0, 0x4b, 0x82,
|
||||
0x3d, 0xbf, 0xa1, 0xc3, 0xe0, 0x84, 0x57, 0x25, 0x21, 0x12, 0x0e, 0x59, 0xa1, 0xea, 0x91, 0x56,
|
||||
0xb7, 0x8d, 0xf5, 0xec, 0x60, 0xd5, 0x13, 0x49, 0x08, 0x55, 0xc8, 0x96, 0xc7, 0x21, 0xc3, 0x1d,
|
||||
0xda, 0xc0, 0x7c, 0xf1, 0x6f, 0x15, 0xa6, 0xce, 0x55, 0x13, 0x7a, 0x0f, 0xc6, 0x76, 0x6a, 0x1b,
|
||||
0xb5, 0xcd, 0xcf, 0x6a, 0xd3, 0x8a, 0x61, 0x1c, 0xbc, 0xc8, 0xcd, 0x9e, 0x23, 0x76, 0x82, 0x66,
|
||||
0x40, 0xf6, 0x03, 0x54, 0x82, 0xeb, 0x5b, 0xdb, 0x9b, 0x76, 0x65, 0x77, 0x65, 0x75, 0xbb, 0xba,
|
||||
0x59, 0xdb, 0x5d, 0xb5, 0x2b, 0x2b, 0xdb, 0x95, 0x69, 0xd5, 0x98, 0x3b, 0x78, 0x91, 0x9b, 0x39,
|
||||
0x27, 0x5a, 0xa5, 0xd8, 0xe1, 0xf8, 0x82, 0x66, 0xe7, 0xf1, 0x9a, 0xd0, 0xa4, 0x12, 0x35, 0x3b,
|
||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0xbe, 0xa9,
|
||||
0xfe, 0xd9, 0x37, 0xd5, 0xef, 0x8f, 0x4d, 0xe5, 0xd5, 0xb1, 0xa9, 0xbc, 0x3e, 0x36, 0x95, 0xa7,
|
||||
0xe9, 0xa7, 0x5a, 0x3d, 0x23, 0xff, 0x93, 0xdd, 0xfd, 0x37, 0x00, 0x00, 0xff, 0xff, 0x4a, 0x56,
|
||||
0x23, 0xf6, 0xa8, 0x0a, 0x00, 0x00,
|
||||
}
|
||||
|
||||
type authenticatedWrapperRaftServer struct {
|
||||
|
@ -1079,6 +1093,12 @@ func (m *StoreAction) CopyFrom(src interface{}) {
|
|||
}
|
||||
github_com_docker_swarmkit_api_deepcopy.Copy(v.Config, o.GetConfig())
|
||||
m.Target = &v
|
||||
case *StoreAction_Volume:
|
||||
v := StoreAction_Volume{
|
||||
Volume: &Volume{},
|
||||
}
|
||||
github_com_docker_swarmkit_api_deepcopy.Copy(v.Volume, o.GetVolume())
|
||||
m.Target = &v
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2030,6 +2050,27 @@ func (m *StoreAction_Config) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|||
}
|
||||
return len(dAtA) - i, nil
|
||||
}
|
||||
func (m *StoreAction_Volume) MarshalTo(dAtA []byte) (int, error) {
|
||||
size := m.Size()
|
||||
return m.MarshalToSizedBuffer(dAtA[:size])
|
||||
}
|
||||
|
||||
func (m *StoreAction_Volume) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
i := len(dAtA)
|
||||
if m.Volume != nil {
|
||||
{
|
||||
size, err := m.Volume.MarshalToSizedBuffer(dAtA[:i])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
i -= size
|
||||
i = encodeVarintRaft(dAtA, i, uint64(size))
|
||||
}
|
||||
i--
|
||||
dAtA[i] = 0x5a
|
||||
}
|
||||
return len(dAtA) - i, nil
|
||||
}
|
||||
func encodeVarintRaft(dAtA []byte, offset int, v uint64) int {
|
||||
offset -= sovRaft(v)
|
||||
base := offset
|
||||
|
@ -2673,6 +2714,18 @@ func (m *StoreAction_Config) Size() (n int) {
|
|||
}
|
||||
return n
|
||||
}
|
||||
func (m *StoreAction_Volume) Size() (n int) {
|
||||
if m == nil {
|
||||
return 0
|
||||
}
|
||||
var l int
|
||||
_ = l
|
||||
if m.Volume != nil {
|
||||
l = m.Volume.Size()
|
||||
n += 1 + l + sovRaft(uint64(l))
|
||||
}
|
||||
return n
|
||||
}
|
||||
|
||||
func sovRaft(x uint64) (n int) {
|
||||
return (math_bits.Len64(x|1) + 6) / 7
|
||||
|
@ -2914,6 +2967,16 @@ func (this *StoreAction_Config) String() string {
|
|||
}, "")
|
||||
return s
|
||||
}
|
||||
func (this *StoreAction_Volume) String() string {
|
||||
if this == nil {
|
||||
return "nil"
|
||||
}
|
||||
s := strings.Join([]string{`&StoreAction_Volume{`,
|
||||
`Volume:` + strings.Replace(fmt.Sprintf("%v", this.Volume), "Volume", "Volume", 1) + `,`,
|
||||
`}`,
|
||||
}, "")
|
||||
return s
|
||||
}
|
||||
func valueToStringRaft(v interface{}) string {
|
||||
rv := reflect.ValueOf(v)
|
||||
if rv.IsNil() {
|
||||
|
@ -4374,6 +4437,41 @@ func (m *StoreAction) Unmarshal(dAtA []byte) error {
|
|||
}
|
||||
m.Target = &StoreAction_Config{v}
|
||||
iNdEx = postIndex
|
||||
case 11:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Volume", wireType)
|
||||
}
|
||||
var msglen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowRaft
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
msglen |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if msglen < 0 {
|
||||
return ErrInvalidLengthRaft
|
||||
}
|
||||
postIndex := iNdEx + msglen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthRaft
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
v := &Volume{}
|
||||
if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
m.Target = &StoreAction_Volume{v}
|
||||
iNdEx = postIndex
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := skipRaft(dAtA[iNdEx:])
|
||||
|
|
|
@ -4,7 +4,7 @@ package docker.swarmkit.v1;
|
|||
|
||||
import "github.com/docker/swarmkit/api/objects.proto";
|
||||
import "github.com/docker/swarmkit/api/types.proto";
|
||||
import "github.com/coreos/etcd/raft/raftpb/raft.proto";
|
||||
import "go.etcd.io/etcd/raft/v3/raftpb/raft.proto";
|
||||
import weak "gogoproto/gogo.proto";
|
||||
import weak "github.com/docker/swarmkit/protobuf/plugin/plugin.proto";
|
||||
|
||||
|
@ -146,5 +146,6 @@ message StoreAction {
|
|||
Resource resource = 8;
|
||||
Extension extension = 9;
|
||||
Config config = 10;
|
||||
Volume volume = 11;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -59,6 +59,7 @@ type StoreSnapshot struct {
|
|||
Resources []*Resource `protobuf:"bytes,7,rep,name=resources,proto3" json:"resources,omitempty"`
|
||||
Extensions []*Extension `protobuf:"bytes,8,rep,name=extensions,proto3" json:"extensions,omitempty"`
|
||||
Configs []*Config `protobuf:"bytes,9,rep,name=configs,proto3" json:"configs,omitempty"`
|
||||
Volumes []*Volume `protobuf:"bytes,10,rep,name=volumes,proto3" json:"volumes,omitempty"`
|
||||
}
|
||||
|
||||
func (m *StoreSnapshot) Reset() { *m = StoreSnapshot{} }
|
||||
|
@ -181,39 +182,40 @@ func init() {
|
|||
}
|
||||
|
||||
var fileDescriptor_c5cad0b62cecd9af = []byte{
|
||||
// 507 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x93, 0xcf, 0x6f, 0xd3, 0x30,
|
||||
0x14, 0xc7, 0x93, 0xfe, 0x4a, 0xe7, 0x09, 0x18, 0x16, 0x07, 0xab, 0x0c, 0x53, 0xca, 0x0e, 0x45,
|
||||
0x82, 0x14, 0x0a, 0x12, 0x08, 0x69, 0x1c, 0x3a, 0x71, 0xe0, 0xc0, 0x0e, 0x2e, 0x9a, 0xb8, 0xa6,
|
||||
0xa9, 0xdb, 0x86, 0x90, 0xb8, 0xf2, 0x73, 0x3b, 0x8e, 0xf0, 0x1f, 0xf0, 0x67, 0xf5, 0xb8, 0xe3,
|
||||
0x4e, 0x88, 0xb5, 0x07, 0xfe, 0x0d, 0x64, 0x3b, 0x09, 0x95, 0x48, 0xb7, 0x5b, 0x64, 0x7d, 0x3e,
|
||||
0xef, 0x7d, 0xed, 0xbc, 0x87, 0x9e, 0x4d, 0x23, 0x35, 0x5b, 0x8c, 0xfc, 0x50, 0x24, 0xbd, 0xb1,
|
||||
0x08, 0x63, 0x2e, 0x7b, 0x70, 0x1e, 0xc8, 0x24, 0x8e, 0x54, 0x2f, 0x98, 0x47, 0x3d, 0x48, 0x83,
|
||||
0x39, 0xcc, 0x84, 0xf2, 0xe7, 0x52, 0x28, 0x81, 0xb1, 0x65, 0xfc, 0x9c, 0xf1, 0x97, 0x2f, 0x5a,
|
||||
0x4f, 0x6f, 0x28, 0x21, 0x46, 0x5f, 0x78, 0xa8, 0xc0, 0x56, 0x68, 0x3d, 0xb9, 0x81, 0x96, 0xc1,
|
||||
0x24, 0x6b, 0xd6, 0xba, 0x37, 0x15, 0x53, 0x61, 0x3e, 0x7b, 0xfa, 0xcb, 0x9e, 0x76, 0x7e, 0xd4,
|
||||
0xd0, 0xad, 0xa1, 0x12, 0x92, 0x0f, 0xb3, 0x68, 0xd8, 0x47, 0xf5, 0x54, 0x8c, 0x39, 0x10, 0xb7,
|
||||
0x5d, 0xed, 0xee, 0xf7, 0x89, 0xff, 0x7f, 0x48, 0xff, 0x54, 0x8c, 0x39, 0xb3, 0x18, 0x7e, 0x8d,
|
||||
0x9a, 0xc0, 0xe5, 0x32, 0x0a, 0x39, 0x90, 0x8a, 0x51, 0xee, 0x97, 0x29, 0x43, 0xcb, 0xb0, 0x02,
|
||||
0xd6, 0x62, 0xca, 0xd5, 0xb9, 0x90, 0x31, 0x90, 0xea, 0x6e, 0xf1, 0xd4, 0x32, 0xac, 0x80, 0x75,
|
||||
0x42, 0x15, 0x40, 0x0c, 0xa4, 0xb6, 0x3b, 0xe1, 0xa7, 0x00, 0x62, 0x66, 0x31, 0xdd, 0x28, 0xfc,
|
||||
0xba, 0x00, 0xc5, 0x25, 0x90, 0xfa, 0xee, 0x46, 0x27, 0x96, 0x61, 0x05, 0x8c, 0x5f, 0x21, 0x0f,
|
||||
0x78, 0x28, 0xb9, 0x02, 0xd2, 0x30, 0x5e, 0xab, 0xfc, 0x66, 0x1a, 0x61, 0x39, 0x8a, 0xdf, 0xa2,
|
||||
0x3d, 0xc9, 0x41, 0x2c, 0xa4, 0x7e, 0x11, 0xcf, 0x78, 0x87, 0x65, 0x1e, 0xcb, 0x20, 0xf6, 0x0f,
|
||||
0xc7, 0xc7, 0x08, 0xf1, 0x6f, 0x8a, 0xa7, 0x10, 0x89, 0x14, 0x48, 0xd3, 0xc8, 0x0f, 0xca, 0xe4,
|
||||
0xf7, 0x39, 0xc5, 0xb6, 0x04, 0x1d, 0x38, 0x14, 0xe9, 0x24, 0x9a, 0x02, 0xd9, 0xdb, 0x1d, 0xf8,
|
||||
0xc4, 0x20, 0x2c, 0x47, 0x3b, 0x11, 0xba, 0x93, 0xdd, 0xbd, 0x18, 0x82, 0x37, 0xc8, 0x4b, 0x78,
|
||||
0x32, 0xd2, 0x2f, 0x66, 0xc7, 0x80, 0x96, 0xde, 0x20, 0x98, 0xa8, 0x8f, 0x06, 0x63, 0x39, 0x8e,
|
||||
0x0f, 0x91, 0x27, 0x79, 0x22, 0x96, 0x7c, 0x6c, 0xa6, 0xa1, 0x36, 0xa8, 0x1c, 0x38, 0x2c, 0x3f,
|
||||
0xea, 0xfc, 0x71, 0x51, 0xb3, 0x68, 0xf2, 0x0e, 0x79, 0x4b, 0x2e, 0x75, 0x72, 0xe2, 0xb6, 0xdd,
|
||||
0xee, 0xed, 0xfe, 0x51, 0xe9, 0xf3, 0xe6, 0x3b, 0x73, 0x66, 0x59, 0x96, 0x4b, 0xf8, 0x03, 0x42,
|
||||
0x59, 0xd7, 0x59, 0x34, 0x27, 0x95, 0xb6, 0xdb, 0xdd, 0xef, 0x3f, 0xbe, 0xe6, 0xcf, 0xe6, 0x95,
|
||||
0x06, 0xb5, 0xd5, 0xaf, 0x87, 0x0e, 0xdb, 0x92, 0xf1, 0x31, 0xaa, 0x83, 0xde, 0x02, 0x52, 0x35,
|
||||
0x55, 0x1e, 0x95, 0x06, 0xd9, 0x5e, 0x93, 0xac, 0x86, 0xb5, 0x3a, 0x77, 0x91, 0x97, 0xa5, 0xc3,
|
||||
0x0d, 0x54, 0x39, 0x7b, 0x7e, 0xe0, 0x0c, 0x8e, 0x56, 0x57, 0xd4, 0xb9, 0xbc, 0xa2, 0xce, 0xf7,
|
||||
0x35, 0x75, 0x57, 0x6b, 0xea, 0x5e, 0xac, 0xa9, 0xfb, 0x7b, 0x4d, 0xdd, 0x9f, 0x1b, 0xea, 0x5c,
|
||||
0x6c, 0xa8, 0x73, 0xb9, 0xa1, 0xce, 0xe7, 0xca, 0xa8, 0x61, 0xf6, 0xf0, 0xe5, 0xdf, 0x00, 0x00,
|
||||
0x00, 0xff, 0xff, 0x97, 0x4e, 0xfd, 0x2a, 0x3b, 0x04, 0x00, 0x00,
|
||||
// 523 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x93, 0x41, 0x8f, 0x12, 0x31,
|
||||
0x14, 0xc7, 0x67,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f, 0xa3, 0x1a, 0x70, 0xb9, 0x48, 0x62, 0x0e, 0xa4, 0x64, 0x94, 0xfb, 0x45, 0x4a, 0xcf, 0x32,
|
||||
0x6c, 0x03, 0x6b, 0x31, 0xe3, 0xea, 0x42, 0xc8, 0x29, 0x90, 0xbd, 0xdd, 0xe2, 0x99, 0x65, 0xd8,
|
||||
0x06, 0xd6, 0x09, 0x55, 0x04, 0x53, 0x20, 0xe5, 0xdd, 0x09, 0x3f, 0x45, 0x30, 0x65, 0x16, 0xd3,
|
||||
0x8d, 0xe2, 0xf3, 0x39, 0x28, 0x2e, 0x81, 0x54, 0x76, 0x37, 0x3a, 0xb5, 0x0c, 0xdb, 0xc0, 0xf8,
|
||||
0x15, 0x0a, 0x80, 0xc7, 0x92, 0x2b, 0x20, 0x55, 0xe3, 0xd5, 0x8b, 0x6f, 0xa6, 0x11, 0xe6, 0x50,
|
||||
0xfc, 0x16, 0xed, 0x4b, 0x0e, 0x62, 0x2e, 0xf5, 0x8b, 0x04, 0xc6, 0x3b, 0x2a, 0xf2, 0x58, 0x0e,
|
||||
0xb1, 0xbf, 0x38, 0x3e, 0x41, 0x88, 0x7f, 0x55, 0x3c, 0x83, 0x44, 0x64, 0x40, 0x6a, 0x46, 0x7e,
|
||||
0x50, 0x24, 0xbf, 0x77, 0x14, 0xdb, 0x12, 0x74, 0xe0, 0x58, 0x64, 0xa3, 0x64, 0x0c, 0x64, 0x7f,
|
||||
0x77, 0xe0, 0x53, 0x83, 0x30, 0x87, 0x6a, 0x6b, 0x21, 0xce, 0xe7, 0x29, 0x07, 0x82, 0x76, 0x5b,
|
||||
0x7d, 0x83, 0x30, 0x87, 0x36, 0x13, 0x74, 0x27, 0x7f, 0xb1, 0xcd, 0xe8, 0xbc, 0x41, 0x41, 0xca,
|
||||
0xd3, 0x81, 0x7e, 0x67, 0x3b, 0x3c, 0xb4, 0xf0, 0xde, 0xd1, 0x48, 0x7d, 0x34, 0x18, 0x73, 0x38,
|
||||
0x3e, 0x42, 0x81, 0xe4, 0xa9, 0x58, 0xf0, 0xa1, 0x99, 0xa1, 0x72, 0xb7, 0x74, 0xe8, 0x31, 0x77,
|
||||
0xd4, 0xfc, 0xed, 0xa3, 0xda, 0xa6, 0xc9, 0x3b, 0x14, 0x2c, 0xb8, 0xd4, 0xf7, 0x25, 0x7e, 0xc3,
|
||||
0x6f, 0xdd, 0xee, 0x1c, 0x17, 0xfe, 0x14, 0xb7, 0x69, 0x7d, 0xcb, 0x32, 0x27, 0xe1, 0x0f, 0x08,
|
||||
0xe5, 0x5d, 0x27, 0xc9, 0x8c, 0x94, 0x1a, 0x7e, 0xeb, 0xa0, 0xf3, 0xf8, 0x3f, 0xf3, 0xe0, 0x2a,
|
||||
0x75, 0xcb, 0xcb, 0x9f, 0x0f, 0x3d, 0xb6, 0x25, 0xe3, 0x13, 0x54, 0x01, 0xbd, 0x3b, 0x64, 0xcf,
|
||||
0x54, 0x79, 0x54, 0x18, 0x64, 0x7b, 0xb9, 0xf2, 0x1a, 0xd6, 0x6a, 0xde, 0x45, 0x41, 0x9e, 0x0e,
|
||||
0x57, 0x51, 0xa9, 0xff, 0xfc, 0xd0, 0xeb, 0x1e, 0x2f, 0xaf, 0xa9, 0x77, 0x75, 0x4d, 0xbd, 0x6f,
|
||||
0x2b, 0xea, 0x2f, 0x57, 0xd4, 0xbf, 0x5c, 0x51, 0xff, 0xd7, 0x8a, 0xfa, 0xdf, 0xd7, 0xd4, 0xbb,
|
||||
0x5c, 0x53, 0xef, 0x6a, 0x4d, 0xbd, 0xcf, 0xa5, 0x41, 0xd5, 0x6c, 0xef, 0xcb, 0x3f, 0x01, 0x00,
|
||||
0x00, 0xff, 0xff, 0x27, 0xb3, 0xad, 0x75, 0x71, 0x04, 0x00, 0x00,
|
||||
}
|
||||
|
||||
func (m *StoreSnapshot) Copy() *StoreSnapshot {
|
||||
|
@ -301,6 +303,14 @@ func (m *StoreSnapshot) CopyFrom(src interface{}) {
|
|||
}
|
||||
}
|
||||
|
||||
if o.Volumes != nil {
|
||||
m.Volumes = make([]*Volume, len(o.Volumes))
|
||||
for i := range m.Volumes {
|
||||
m.Volumes[i] = &Volume{}
|
||||
github_com_docker_swarmkit_api_deepcopy.Copy(m.Volumes[i], o.Volumes[i])
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func (m *ClusterSnapshot) Copy() *ClusterSnapshot {
|
||||
|
@ -368,6 +378,20 @@ func (m *StoreSnapshot) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if len(m.Volumes) > 0 {
|
||||
for iNdEx := len(m.Volumes) - 1; iNdEx >= 0; iNdEx-- {
|
||||
{
|
||||
size, err := m.Volumes[iNdEx].MarshalToSizedBuffer(dAtA[:i])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
i -= size
|
||||
i = encodeVarintSnapshot(dAtA, i, uint64(size))
|
||||
}
|
||||
i--
|
||||
dAtA[i] = 0x52
|
||||
}
|
||||
}
|
||||
if len(m.Configs) > 0 {
|
||||
for iNdEx := len(m.Configs) - 1; iNdEx >= 0; iNdEx-- {
|
||||
{
|
||||
|
@ -660,6 +684,12 @@ func (m *StoreSnapshot) Size() (n int) {
|
|||
n += 1 + l + sovSnapshot(uint64(l))
|
||||
}
|
||||
}
|
||||
if len(m.Volumes) > 0 {
|
||||
for _, e := range m.Volumes {
|
||||
l = e.Size()
|
||||
n += 1 + l + sovSnapshot(uint64(l))
|
||||
}
|
||||
}
|
||||
return n
|
||||
}
|
||||
|
||||
|
@ -754,6 +784,11 @@ func (this *StoreSnapshot) String() string {
|
|||
repeatedStringForConfigs += strings.Replace(fmt.Sprintf("%v", f), "Config", "Config", 1) + ","
|
||||
}
|
||||
repeatedStringForConfigs += "}"
|
||||
repeatedStringForVolumes := "[]*Volume{"
|
||||
for _, f := range this.Volumes {
|
||||
repeatedStringForVolumes += strings.Replace(fmt.Sprintf("%v", f), "Volume", "Volume", 1) + ","
|
||||
}
|
||||
repeatedStringForVolumes += "}"
|
||||
s := strings.Join([]string{`&StoreSnapshot{`,
|
||||
`Nodes:` + repeatedStringForNodes + `,`,
|
||||
`Services:` + repeatedStringForServices + `,`,
|
||||
|
@ -764,6 +799,7 @@ func (this *StoreSnapshot) String() string {
|
|||
`Resources:` + repeatedStringForResources + `,`,
|
||||
`Extensions:` + repeatedStringForExtensions + `,`,
|
||||
`Configs:` + repeatedStringForConfigs + `,`,
|
||||
`Volumes:` + repeatedStringForVolumes + `,`,
|
||||
`}`,
|
||||
}, "")
|
||||
return s
|
||||
|
@ -1139,6 +1175,40 @@ func (m *StoreSnapshot) Unmarshal(dAtA []byte) error {
|
|||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
case 10:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Volumes", wireType)
|
||||
}
|
||||
var msglen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowSnapshot
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
msglen |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if msglen < 0 {
|
||||
return ErrInvalidLengthSnapshot
|
||||
}
|
||||
postIndex := iNdEx + msglen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthSnapshot
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.Volumes = append(m.Volumes, &Volume{})
|
||||
if err := m.Volumes[len(m.Volumes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := skipSnapshot(dAtA[iNdEx:])
|
||||
|
|
|
@ -23,6 +23,7 @@ message StoreSnapshot {
|
|||
repeated Resource resources = 7;
|
||||
repeated Extension extensions = 8;
|
||||
repeated Config configs = 9;
|
||||
repeated Volume volumes = 10;
|
||||
}
|
||||
|
||||
// ClusterSnapshot stores cluster membership information in snapshots.
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -506,3 +506,71 @@ message ConfigSpec {
|
|||
// - golang: Go templating
|
||||
Driver templating = 3;
|
||||
}
|
||||
|
||||
message VolumeSpec {
|
||||
// Annotations includes the name and labels of a volume. The name used in the
|
||||
// spec's Annotations will be passed to the Plugin as the "Name" in the
|
||||
// CreateVolume request.
|
||||
Annotations annotations = 1 [(gogoproto.nullable) = false];
|
||||
|
||||
// Group defines the volume group this particular volume belongs to. When
|
||||
// requesting volumes for a workload, the group name can be used instead of
|
||||
// the volume's name, which tells swarmkit to pick one from the many volumes
|
||||
// belonging to that group.
|
||||
string group = 2;
|
||||
|
||||
// Driver represents the CSI Plugin object and its configuration parameters.
|
||||
// The "options" field of the Driver object is passed in the CSI
|
||||
// CreateVolumeRequest as the "parameters" field. The Driver must be
|
||||
// specified; there is no default CSI Plugin.
|
||||
Driver driver = 3;
|
||||
|
||||
// AccessMode is similar to, and used to determine, the volume access mode as
|
||||
// defined in the CSI spec, as well as the volume type (block vs mount). In
|
||||
// this way, it is more similar to the VolumeCapability message in the CSI
|
||||
// spec.
|
||||
VolumeAccessMode access_mode = 4;
|
||||
|
||||
// Secrets represents a set of key/value pairs to pass to the CSI plugin. The
|
||||
// keys of the secrets can be anything, but the values refer to swarmkit
|
||||
// Secret objects. See the "Secrets Requirements" section of the CSI Plugin
|
||||
// Spec for more information.
|
||||
repeated VolumeSecret secrets = 5;
|
||||
|
||||
// AccessibilityRequirements specifies where a volume must be accessible
|
||||
// from.
|
||||
//
|
||||
// This field must be empty if the plugin does not support
|
||||
// VOLUME_ACCESSIBILITY_CONSTRAINTS capabilities. If it is present but the
|
||||
// plugin does not support it, volume will not be created.
|
||||
//
|
||||
// If AccessibilityRequirements is empty, but the plugin does support
|
||||
// VOLUME_ACCESSIBILITY_CONSTRAINTS, then Swarmkit will assume the entire
|
||||
// cluster is a valid target for the volume.
|
||||
TopologyRequirement AccessibilityRequirements = 6;
|
||||
|
||||
// CapacityRange is the capacity this volume should be created with. If nil,
|
||||
// the plugin will decide the capacity.
|
||||
CapacityRange capacity_range = 7;
|
||||
|
||||
enum VolumeAvailability {
|
||||
option (gogoproto.goproto_enum_prefix) = false;
|
||||
|
||||
// Active allows a volume to be used and scheduled to. This is the
|
||||
// default state.
|
||||
ACTIVE = 0 [(gogoproto.enumvalue_customname) = "VolumeAvailabilityActive"];
|
||||
|
||||
// Pause prevents volumes from having new workloads scheduled to use
|
||||
// them, even if they're already published on a Node.
|
||||
PAUSE = 1 [(gogoproto.enumvalue_customname) = "VolumeAvailabilityPause"];
|
||||
|
||||
// Drain causes existing workloads using this volume to be rescheduled,
|
||||
// causing the volume to be unpublished and removed from nodes.
|
||||
DRAIN = 2 [(gogoproto.enumvalue_customname) = "VolumeAvailabilityDrain"];
|
||||
}
|
||||
|
||||
// Availability is the Volume's desired availability. Analogous to Node
|
||||
// Availability, this allows the user to take volumes offline in order to
|
||||
// update or delete them.
|
||||
VolumeAvailability availability = 8;
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -62,6 +62,7 @@ enum ResourceType {
|
|||
TASK = 0;
|
||||
SECRET = 1;
|
||||
CONFIG = 2;
|
||||
VOLUME = 3;
|
||||
}
|
||||
|
||||
message Resources {
|
||||
|
@ -140,6 +141,8 @@ message NodeDescription {
|
|||
|
||||
// FIPS indicates whether the node has FIPS-enabled
|
||||
bool fips = 6 [(gogoproto.customname) = "FIPS"];
|
||||
|
||||
repeated NodeCSIInfo csi_info = 7 [(gogoproto.customname) = "CSIInfo"];
|
||||
}
|
||||
|
||||
message NodeTLSInfo {
|
||||
|
@ -151,6 +154,27 @@ message NodeTLSInfo {
|
|||
bytes cert_issuer_public_key = 3;
|
||||
}
|
||||
|
||||
// NodeCSIInfo represents information about a Node returned by calling the
|
||||
// NodeGetInfo RPC on the CSI plugin present on the node. There is a separate
|
||||
// NodeCSIInfo object for each CSI plugin present.
|
||||
message NodeCSIInfo {
|
||||
|
||||
// PluginName is the name of the CSI plugin.
|
||||
string plugin_name = 1;
|
||||
|
||||
// NodeID is the ID of the node as reported by the CSI plugin. This will be
|
||||
// different from the swarmkit node ID.
|
||||
string node_id = 2;
|
||||
|
||||
// MaxVolumesPerNode is the maximum number of volumes that may be published
|
||||
// to this node.
|
||||
int64 max_volumes_per_node = 3;
|
||||
|
||||
// AccessibleTopology indicates the location of this node in the CSI plugin's
|
||||
// topology
|
||||
Topology accessible_topology = 4;
|
||||
}
|
||||
|
||||
message RaftMemberStatus {
|
||||
bool leader = 1;
|
||||
|
||||
|
@ -215,6 +239,7 @@ message Mount {
|
|||
VOLUME = 1 [(gogoproto.enumvalue_customname) = "MountTypeVolume"]; // Remote storage volumes
|
||||
TMPFS = 2 [(gogoproto.enumvalue_customname) = "MountTypeTmpfs"]; // Mount a tmpfs
|
||||
NPIPE = 3 [(gogoproto.enumvalue_customname) = "MountTypeNamedPipe"]; // Windows named pipes
|
||||
CSI = 4 [(gogoproto.enumvalue_customname) = "MountTypeCSI"]; // CSI volume
|
||||
}
|
||||
|
||||
// Type defines the nature of the mount.
|
||||
|
@ -222,6 +247,10 @@ message Mount {
|
|||
|
||||
// Source specifies the name of the mount. Depending on mount type, this
|
||||
// may be a volume name or a host path, or even ignored.
|
||||
//
|
||||
// For CSI type mounts, the source is either the name of the volume or the
|
||||
// name of the volume group. To specify a volume group, the source should be
|
||||
// prefixed with "group:", as in "group:groupname"
|
||||
string source = 2;
|
||||
|
||||
// Target path in container
|
||||
|
@ -1131,3 +1160,481 @@ message JobStatus {
|
|||
// newly added nodes executing long-forgotten jobs.
|
||||
google.protobuf.Timestamp last_execution = 2;
|
||||
}
|
||||
|
||||
// VolumeAccessMode is the access mode of the volume, and is used to determine
|
||||
// the CSI AccessMode value, as well as the volume access type (block vs
|
||||
// mount). In this way, it is more similar to the CSI VolumeCapability message.
|
||||
//
|
||||
// This defines how and where a volume can be accessed by more than
|
||||
// one Task, but does not imply anything about the accessible topology of the
|
||||
// volume.
|
||||
//
|
||||
// For analogy, a flash drive can be used on many computers, but only one of
|
||||
// them at a time, and so would have a scope of "Single". But, it can be used
|
||||
// by any number of programs simultaneously, so would have a sharing of "All".
|
||||
message VolumeAccessMode {
|
||||
// Scope enumerates the possible volume access scopes.
|
||||
enum Scope {
|
||||
option (gogoproto.goproto_enum_prefix) = false;
|
||||
// VolumeScopeSingleNode indicates that only one node at a time may have
|
||||
// access to the volume.
|
||||
SINGLE_NODE = 0 [(gogoproto.enumvalue_customname) = "VolumeScopeSingleNode"];
|
||||
// VolumeScopeMultiNode indicates that multiple nodes may access the volume
|
||||
// at the same time.
|
||||
MULTI_NODE = 1 [(gogoproto.enumvalue_customname) = "VolumeScopeMultiNode"];
|
||||
}
|
||||
|
||||
// Sharing enumerates the possible volume sharing modes.
|
||||
enum Sharing {
|
||||
option (gogoproto.goproto_enum_prefix) = false;
|
||||
// VolumeSharingNone indicates that the volume may only be used by a single
|
||||
// Task at any given time.
|
||||
NONE = 0 [(gogoproto.enumvalue_customname) = "VolumeSharingNone"];
|
||||
// VolumeSharingReadOnly indicates that the volume may be accessed by
|
||||
// multiple Tasks, but all Tasks only have have read access.
|
||||
READ_ONLY = 1 [(gogoproto.enumvalue_customname) = "VolumeSharingReadOnly"];
|
||||
// VolumeSharingOneWriter indicates that the Volume may be accessed by
|
||||
// multiple Tasks, but only the one Task may have write permission for the
|
||||
// Volume.
|
||||
ONE_WRITER = 2 [(gogoproto.enumvalue_customname) = "VolumeSharingOneWriter"];
|
||||
// VolumeSharingAll indicates that any number of Tasks may have read and
|
||||
// write access to the volume.
|
||||
ALL = 3 [(gogoproto.enumvalue_customname) = "VolumeSharingAll"];
|
||||
}
|
||||
|
||||
// BlockVolume indicates the volume will be accessed with the block device
|
||||
// API.
|
||||
message BlockVolume {
|
||||
// intentionally empty
|
||||
}
|
||||
|
||||
// MountVolume indicates the volume will be access with the filesystem API.
|
||||
message MountVolume {
|
||||
// FsType is the filesystem type. This field is optional, and an empty
|
||||
// string is equal to an unspecified value.
|
||||
string fs_type = 1;
|
||||
|
||||
// MountFlags indicates mount options to be used for the volume. This
|
||||
// field is optional, and may contain sensitive data.
|
||||
repeated string mount_flags = 2;
|
||||
}
|
||||
|
||||
// Scope defines on how many nodes this volume can be accessed
|
||||
// simultaneously. If unset, will default to the zero-value of SINGLE_NODE.
|
||||
Scope scope = 1;
|
||||
|
||||
// Sharing defines how many tasks can use this volume at the same time, and
|
||||
// in what way. If unset, will default to the zero-value of NONE.
|
||||
Sharing sharing = 2;
|
||||
|
||||
// AccessType defines the access type of the volume. Unlike Sharing and
|
||||
// Scope, Swarmkit itself doesn't define either of these as a default, but
|
||||
// but the upstream is free to do so. However, one of these MUST be set.
|
||||
oneof access_type {
|
||||
BlockVolume block = 3;
|
||||
MountVolume mount = 4;
|
||||
}
|
||||
}
|
||||
|
||||
// VolumeSecret indicates a secret value that must be passed to CSI plugin
|
||||
// operations.
|
||||
message VolumeSecret {
|
||||
// Key represents the key that will be passed as a controller secret to the
|
||||
// CSI plugin.
|
||||
string key = 1;
|
||||
|
||||
// Secret represents the swarmkit Secret object from which to read data to
|
||||
// use as the value to pass to the CSI plugin. This can be either a secret
|
||||
// name or ID.
|
||||
//
|
||||
// TODO(dperny): should this be a SecretReference instead?
|
||||
string secret = 2;
|
||||
}
|
||||
|
||||
// VolumePublishStatus contains information about the volume's publishing to a
|
||||
// specific node.
|
||||
//
|
||||
// Publishing or unpublishing a volume to a node is a two-step process.
|
||||
//
|
||||
// When a Volume is needed on a Node, a VolumePublishStatus with state
|
||||
// PendingPublish is added. This indicates that the volume should be published,
|
||||
// but the RPCs have not been executed.
|
||||
//
|
||||
// Then, afterward, ControllerPublishVolume is called for the Volume, and the
|
||||
// State is changed to Published, indicating that the call was a success.
|
||||
//
|
||||
// When a Volume is no longer needed, the process is similar, with the State
|
||||
// being changed to PendingUnpublish. When ControllerUnpublishVolume succeeds,
|
||||
// the PublishStatus for that Node is simply removed.
|
||||
//
|
||||
// Without this two-step process, the following could happen:
|
||||
//
|
||||
// 1. ControllerPublishVolume is called and the Volume is successfully
|
||||
// published.
|
||||
// 2. A crash or leadership change disrupts the cluster before
|
||||
// the Volume with the updated VolumePublishStatus can be added to the
|
||||
// store.
|
||||
// 3. The Task that required the Volume to be published is deleted.
|
||||
//
|
||||
// In this case, the Volume would be published to the Node, but Swarm would be
|
||||
// unaware of this, and would additionally be unaware that the Volume _should_
|
||||
// be published to the Node.
|
||||
//
|
||||
// By first committing our intention to publish a Volume, we guarantee that the
|
||||
// Volume itself is sufficient to know which Nodes it may have been published
|
||||
// to.
|
||||
message VolumePublishStatus {
|
||||
// State is the state of the volume in the publish/unpublish
|
||||
// lifecycle, on a particular node.
|
||||
enum State {
|
||||
// PendingPublish indicates that the volume should be published on this
|
||||
// node, but the call to ControllerPublishVolume has not been
|
||||
// successfully completed yet and the result recorded by swarmkit.
|
||||
PENDING_PUBLISH = 0;
|
||||
|
||||
// Published means the volume is published successfully to the node.
|
||||
PUBLISHED = 1;
|
||||
|
||||
// PendingNodeUnpublish indicates that the Volume should be unpublished
|
||||
// on the Node, and we're waiting for confirmation that it has done so.
|
||||
// After the Node has confirmed that the Volume has been unpublished,
|
||||
// the state will move to PendingUnpublish.
|
||||
PENDING_NODE_UNPUBLISH = 2;
|
||||
|
||||
// PendingUnpublish means the volume is published to the node, and
|
||||
// needs to not be, but the call to ControllerUnpublishVolume has not
|
||||
// verifiably succeeded yet. There is no Unpublished state, because
|
||||
// after the volume has been verifiably unpublished, the
|
||||
// VolumePublishStatus for the node is removed.
|
||||
PENDING_UNPUBLISH = 3;
|
||||
}
|
||||
|
||||
// NodeID is the swarm (not CSI plugin) node ID that this volume is
|
||||
// published to.
|
||||
string node_id = 1;
|
||||
|
||||
// State is the publish state of the volume.
|
||||
State state = 2;
|
||||
|
||||
// PublishContext is the same PublishContext returned by a call to
|
||||
// ControllerPublishVolume.
|
||||
map<string, string> publish_context = 3;
|
||||
|
||||
// Message is a human-readable message explaining the state of the volume.
|
||||
// It exists to convey the current situation with the volume to the user,
|
||||
// allowing, for example, the user to see error messages why a volume might
|
||||
// not be published yet.
|
||||
string message = 5;
|
||||
}
|
||||
|
||||
// VolumeInfo contains information about the volume originating from the CSI
|
||||
// plugin.
|
||||
message VolumeInfo {
|
||||
// CapacityBytes is the capacity of this volume in bytes. A value of 0
|
||||
// indicates that the capcity is unknown.
|
||||
int64 capacity_bytes = 1;
|
||||
|
||||
// VolumeContext includes fields that are opaque to Swarmkit.
|
||||
map<string, string> volume_context = 2;
|
||||
|
||||
// VolumeID is the ID of the volume as reported by the CSI plugin.
|
||||
// Information about the volume is not cached in swarmkit's object store;
|
||||
// instead, it is retrieved on-demand as needed. If the VolumeID field is an
|
||||
// empty string, and the plugin advertises CREATE_DELETE_VOLUME capability,
|
||||
// then Swarmkit has not yet called CreateVolume.
|
||||
string volume_id = 3;
|
||||
|
||||
// AccessibleTopology is the topology this volume is actually accessible
|
||||
// from.
|
||||
repeated Topology accessible_topology = 4;
|
||||
}
|
||||
|
||||
// CapacityRange describes the minimum and maximum capacity a volume should be
|
||||
// created with.
|
||||
message CapacityRange {
|
||||
// RequiredBytes specifies that a volume must be at least this big. The value
|
||||
// of 0 indicates an unspecified minimum. Must not be negative.
|
||||
int64 required_bytes = 1;
|
||||
|
||||
// LimitBytes specifies that a volume must not be bigger than this. The value
|
||||
// of 0 indicates an unspecified maximum. Must not be negative.
|
||||
int64 limit_bytes = 2;
|
||||
}
|
||||
|
||||
// VolumeAssignment contains the information needed by a Node to use a CSI
|
||||
// volume. This includes the information need to Stage and Publish the volume
|
||||
// on the node, but never the full Volume object.
|
||||
message VolumeAssignment {
|
||||
// ID is the swarmkit ID for the volume. This is used by swarmkit components
|
||||
// to identify the volume.
|
||||
string id = 1;
|
||||
|
||||
// VolumeID is the CSI volume ID as returned from CreateVolume. This is used
|
||||
// by the CSI driver to identify the volume.
|
||||
string volume_id = 2;
|
||||
|
||||
// Driver is the CSI Driver that this volume is managed by.
|
||||
Driver driver = 3;
|
||||
|
||||
// VolumeContext is a map returned from the CSI Controller service when a
|
||||
// Volume is created. It is optional for the driver to provide, but if it is
|
||||
// provided, it must be passed to subsequent calls.
|
||||
map<string,string> volume_context = 4;
|
||||
|
||||
// PublishContext is a map returned from the Controller service when
|
||||
// ControllerPublishVolume is called. Again, it is optional, but if provided,
|
||||
// must be passed.
|
||||
map<string,string> publish_context = 5;
|
||||
|
||||
// AccessMode specifies the access mode of the volume.
|
||||
VolumeAccessMode access_mode = 6;
|
||||
|
||||
// Secrets is the set of secrets required by the CSI plugin. These refer to
|
||||
// swarmkit Secrets that will be distributed separately to the node.
|
||||
repeated VolumeSecret secrets = 7;
|
||||
}
|
||||
|
||||
// VolumeAttachment is the information associating a Volume with a Task.
|
||||
message VolumeAttachment {
|
||||
// ID is the swarmkit ID of the volume assigned to this task, not the CSI
|
||||
// volume ID.
|
||||
string id = 1;
|
||||
|
||||
// Source indicates the Mount source that this volume is assigned for.
|
||||
string source = 2;
|
||||
|
||||
// Target indicates the Mount target that this volume is assigned for.
|
||||
string target = 3;
|
||||
}
|
||||
|
||||
|
||||
// These types are copied from the CSI spec. They are copied because there is
|
||||
// difficulty in compatibility between the CSI protos and the swarmkit protos,
|
||||
// and straight importing them is difficult.
|
||||
|
||||
// TopologyRequirement expresses the user's requirements for a volume's
|
||||
// accessible topology.
|
||||
message TopologyRequirement {
|
||||
// Specifies the list of topologies the provisioned volume MUST be
|
||||
// accessible from.
|
||||
// This field is OPTIONAL. If TopologyRequirement is specified either
|
||||
// requisite or preferred or both MUST be specified.
|
||||
//
|
||||
// If requisite is specified, the provisioned volume MUST be
|
||||
// accessible from at least one of the requisite topologies.
|
||||
//
|
||||
// Given
|
||||
// x = number of topologies provisioned volume is accessible from
|
||||
// n = number of requisite topologies
|
||||
// The CO MUST ensure n >= 1. The SP MUST ensure x >= 1
|
||||
// If x==n, then the SP MUST make the provisioned volume available to
|
||||
// all topologies from the list of requisite topologies. If it is
|
||||
// unable to do so, the SP MUST fail the CreateVolume call.
|
||||
// For example, if a volume should be accessible from a single zone,
|
||||
// and requisite =
|
||||
// {"region": "R1", "zone": "Z2"}
|
||||
// then the provisioned volume MUST be accessible from the "region"
|
||||
// "R1" and the "zone" "Z2".
|
||||
// Similarly, if a volume should be accessible from two zones, and
|
||||
// requisite =
|
||||
// {"region": "R1", "zone": "Z2"},
|
||||
// {"region": "R1", "zone": "Z3"}
|
||||
// then the provisioned volume MUST be accessible from the "region"
|
||||
// "R1" and both "zone" "Z2" and "zone" "Z3".
|
||||
//
|
||||
// If x<n, then the SP SHALL choose x unique topologies from the list
|
||||
// of requisite topologies. If it is unable to do so, the SP MUST fail
|
||||
// the CreateVolume call.
|
||||
// For example, if a volume should be accessible from a single zone,
|
||||
// and requisite =
|
||||
// {"region": "R1", "zone": "Z2"},
|
||||
// {"region": "R1", "zone": "Z3"}
|
||||
// then the SP may choose to make the provisioned volume available in
|
||||
// either the "zone" "Z2" or the "zone" "Z3" in the "region" "R1".
|
||||
// Similarly, if a volume should be accessible from two zones, and
|
||||
// requisite =
|
||||
// {"region": "R1", "zone": "Z2"},
|
||||
// {"region": "R1", "zone": "Z3"},
|
||||
// {"region": "R1", "zone": "Z4"}
|
||||
// then the provisioned volume MUST be accessible from any combination
|
||||
// of two unique topologies: e.g. "R1/Z2" and "R1/Z3", or "R1/Z2" and
|
||||
// "R1/Z4", or "R1/Z3" and "R1/Z4".
|
||||
//
|
||||
// If x>n, then the SP MUST make the provisioned volume available from
|
||||
// all topologies from the list of requisite topologies and MAY choose
|
||||
// the remaining x-n unique topologies from the list of all possible
|
||||
// topologies. If it is unable to do so, the SP MUST fail the
|
||||
// CreateVolume call.
|
||||
// For example, if a volume should be accessible from two zones, and
|
||||
// requisite =
|
||||
// {"region": "R1", "zone": "Z2"}
|
||||
// then the provisioned volume MUST be accessible from the "region"
|
||||
// "R1" and the "zone" "Z2" and the SP may select the second zone
|
||||
// independently, e.g. "R1/Z4".
|
||||
repeated Topology requisite = 1;
|
||||
|
||||
// Specifies the list of topologies the CO would prefer the volume to
|
||||
// be provisioned in.
|
||||
//
|
||||
// This field is OPTIONAL. If TopologyRequirement is specified either
|
||||
// requisite or preferred or both MUST be specified.
|
||||
//
|
||||
// An SP MUST attempt to make the provisioned volume available using
|
||||
// the preferred topologies in order from first to last.
|
||||
//
|
||||
// If requisite is specified, all topologies in preferred list MUST
|
||||
// also be present in the list of requisite topologies.
|
||||
//
|
||||
// If the SP is unable to to make the provisioned volume available
|
||||
// from any of the preferred topologies, the SP MAY choose a topology
|
||||
// from the list of requisite topologies.
|
||||
// If the list of requisite topologies is not specified, then the SP
|
||||
// MAY choose from the list of all possible topologies.
|
||||
// If the list of requisite topologies is specified and the SP is
|
||||
// unable to to make the provisioned volume available from any of the
|
||||
// requisite topologies it MUST fail the CreateVolume call.
|
||||
//
|
||||
// Example 1:
|
||||
// Given a volume should be accessible from a single zone, and
|
||||
// requisite =
|
||||
// {"region": "R1", "zone": "Z2"},
|
||||
// {"region": "R1", "zone": "Z3"}
|
||||
// preferred =
|
||||
// {"region": "R1", "zone": "Z3"}
|
||||
// then the the SP SHOULD first attempt to make the provisioned volume
|
||||
// available from "zone" "Z3" in the "region" "R1" and fall back to
|
||||
// "zone" "Z2" in the "region" "R1" if that is not possible.
|
||||
//
|
||||
// Example 2:
|
||||
// Given a volume should be accessible from a single zone, and
|
||||
// requisite =
|
||||
// {"region": "R1", "zone": "Z2"},
|
||||
// {"region": "R1", "zone": "Z3"},
|
||||
// {"region": "R1", "zone": "Z4"},
|
||||
// {"region": "R1", "zone": "Z5"}
|
||||
// preferred =
|
||||
// {"region": "R1", "zone": "Z4"},
|
||||
// {"region": "R1", "zone": "Z2"}
|
||||
// then the the SP SHOULD first attempt to make the provisioned volume
|
||||
// accessible from "zone" "Z4" in the "region" "R1" and fall back to
|
||||
// "zone" "Z2" in the "region" "R1" if that is not possible. If that
|
||||
// is not possible, the SP may choose between either the "zone"
|
||||
// "Z3" or "Z5" in the "region" "R1".
|
||||
//
|
||||
// Example 3:
|
||||
// Given a volume should be accessible from TWO zones (because an
|
||||
// opaque parameter in CreateVolumeRequest, for example, specifies
|
||||
// the volume is accessible from two zones, aka synchronously
|
||||
// replicated), and
|
||||
// requisite =
|
||||
// {"region": "R1", "zone": "Z2"},
|
||||
// {"region": "R1", "zone": "Z3"},
|
||||
// {"region": "R1", "zone": "Z4"},
|
||||
// {"region": "R1", "zone": "Z5"}
|
||||
// preferred =
|
||||
// {"region": "R1", "zone": "Z5"},
|
||||
// {"region": "R1", "zone": "Z3"}
|
||||
// then the the SP SHOULD first attempt to make the provisioned volume
|
||||
// accessible from the combination of the two "zones" "Z5" and "Z3" in
|
||||
// the "region" "R1". If that's not possible, it should fall back to
|
||||
// a combination of "Z5" and other possibilities from the list of
|
||||
// requisite. If that's not possible, it should fall back to a
|
||||
// combination of "Z3" and other possibilities from the list of
|
||||
// requisite. If that's not possible, it should fall back to a
|
||||
// combination of other possibilities from the list of requisite.
|
||||
repeated Topology preferred = 2;
|
||||
}
|
||||
|
||||
// Topology is a map of topological domains to topological segments.
|
||||
// A topological domain is a sub-division of a cluster, like "region",
|
||||
// "zone", "rack", etc.
|
||||
// A topological segment is a specific instance of a topological domain,
|
||||
// like "zone3", "rack3", etc.
|
||||
// For example {"com.company/zone": "Z1", "com.company/rack": "R3"}
|
||||
// Valid keys have two segments: an OPTIONAL prefix and name, separated
|
||||
// by a slash (/), for example: "com.company.example/zone".
|
||||
// The key name segment is REQUIRED. The prefix is OPTIONAL.
|
||||
// The key name MUST be 63 characters or less, begin and end with an
|
||||
// alphanumeric character ([a-z0-9A-Z]), and contain only dashes (-),
|
||||
// underscores (_), dots (.), or alphanumerics in between, for example
|
||||
// "zone".
|
||||
// The key prefix MUST be 63 characters or less, begin and end with a
|
||||
// lower-case alphanumeric character ([a-z0-9]), contain only
|
||||
// dashes (-), dots (.), or lower-case alphanumerics in between, and
|
||||
// follow domain name notation format
|
||||
// (https://tools.ietf.org/html/rfc1035#section-2.3.1).
|
||||
// The key prefix SHOULD include the plugin's host company name and/or
|
||||
// the plugin name, to minimize the possibility of collisions with keys
|
||||
// from other plugins.
|
||||
// If a key prefix is specified, it MUST be identical across all
|
||||
// topology keys returned by the SP (across all RPCs).
|
||||
// Keys MUST be case-insensitive. Meaning the keys "Zone" and "zone"
|
||||
// MUST not both exist.
|
||||
// Each value (topological segment) MUST contain 1 or more strings.
|
||||
// Each string MUST be 63 characters or less and begin and end with an
|
||||
// alphanumeric character with '-', '_', '.', or alphanumerics in
|
||||
// between.
|
||||
message Topology {
|
||||
map<string, string> segments = 1;
|
||||
}
|
||||
|
||||
// VolumeCapability specifies a capability of a volume.
|
||||
message VolumeCapability {
|
||||
// Indicate that the volume will be accessed via the block device API.
|
||||
message BlockVolume {
|
||||
// Intentionally empty, for now.
|
||||
}
|
||||
|
||||
// Indicate that the volume will be accessed via the filesystem API.
|
||||
message MountVolume {
|
||||
// The filesystem type. This field is OPTIONAL.
|
||||
// An empty string is equal to an unspecified field value.
|
||||
string fs_type = 1;
|
||||
|
||||
// The mount options that can be used for the volume. This field is
|
||||
// OPTIONAL. `mount_flags` MAY contain sensitive information.
|
||||
// Therefore, the CO and the Plugin MUST NOT leak this information
|
||||
// to untrusted entities. The total size of this repeated field
|
||||
// SHALL NOT exceed 4 KiB.
|
||||
repeated string mount_flags = 2;
|
||||
}
|
||||
|
||||
// Specify how a volume can be accessed.
|
||||
message AccessMode {
|
||||
enum Mode {
|
||||
UNKNOWN = 0;
|
||||
|
||||
// Can only be published once as read/write on a single node, at
|
||||
// any given time.
|
||||
SINGLE_NODE_WRITER = 1;
|
||||
|
||||
// Can only be published once as readonly on a single node, at
|
||||
// any given time.
|
||||
SINGLE_NODE_READER_ONLY = 2;
|
||||
|
||||
// Can be published as readonly at multiple nodes simultaneously.
|
||||
MULTI_NODE_READER_ONLY = 3;
|
||||
|
||||
// Can be published at multiple nodes simultaneously. Only one of
|
||||
// the node can be used as read/write. The rest will be readonly.
|
||||
MULTI_NODE_SINGLE_WRITER = 4;
|
||||
|
||||
// Can be published as read/write at multiple nodes
|
||||
// simultaneously.
|
||||
MULTI_NODE_MULTI_WRITER = 5;
|
||||
}
|
||||
|
||||
// This field is REQUIRED.
|
||||
Mode mode = 1;
|
||||
}
|
||||
|
||||
// Specifies what API the volume will be accessed using. One of the
|
||||
// following fields MUST be specified.
|
||||
oneof access_type {
|
||||
BlockVolume block = 1;
|
||||
MountVolume mount = 2;
|
||||
}
|
||||
|
||||
// This is a REQUIRED field.
|
||||
AccessMode access_mode = 3;
|
||||
}
|
||||
|
|
|
@ -80,6 +80,7 @@ type Object struct {
|
|||
// *Object_Resource
|
||||
// *Object_Extension
|
||||
// *Object_Config
|
||||
// *Object_Volume
|
||||
Object isObject_Object `protobuf_oneof:"Object"`
|
||||
}
|
||||
|
||||
|
@ -148,6 +149,9 @@ type Object_Extension struct {
|
|||
type Object_Config struct {
|
||||
Config *Config `protobuf:"bytes,9,opt,name=config,proto3,oneof" json:"config,omitempty"`
|
||||
}
|
||||
type Object_Volume struct {
|
||||
Volume *Volume `protobuf:"bytes,10,opt,name=volume,proto3,oneof" json:"volume,omitempty"`
|
||||
}
|
||||
|
||||
func (*Object_Node) isObject_Object() {}
|
||||
func (*Object_Service) isObject_Object() {}
|
||||
|
@ -158,6 +162,7 @@ func (*Object_Secret) isObject_Object() {}
|
|||
func (*Object_Resource) isObject_Object() {}
|
||||
func (*Object_Extension) isObject_Object() {}
|
||||
func (*Object_Config) isObject_Object() {}
|
||||
func (*Object_Volume) isObject_Object() {}
|
||||
|
||||
func (m *Object) GetObject() isObject_Object {
|
||||
if m != nil {
|
||||
|
@ -229,6 +234,13 @@ func (m *Object) GetConfig() *Config {
|
|||
return nil
|
||||
}
|
||||
|
||||
func (m *Object) GetVolume() *Volume {
|
||||
if x, ok := m.GetObject().(*Object_Volume); ok {
|
||||
return x.Volume
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// XXX_OneofWrappers is for the internal use of the proto package.
|
||||
func (*Object) XXX_OneofWrappers() []interface{} {
|
||||
return []interface{}{
|
||||
|
@ -241,6 +253,7 @@ func (*Object) XXX_OneofWrappers() []interface{} {
|
|||
(*Object_Resource)(nil),
|
||||
(*Object_Extension)(nil),
|
||||
(*Object_Config)(nil),
|
||||
(*Object_Volume)(nil),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -789,82 +802,83 @@ func init() {
|
|||
}
|
||||
|
||||
var fileDescriptor_da25266013800cd9 = []byte{
|
||||
// 1199 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x96, 0xbd, 0x73, 0x1b, 0xc5,
|
||||
0x1b, 0xc7, 0xef, 0x14, 0xf9, 0x24, 0x3d, 0xb6, 0x13, 0xcf, 0xc6, 0x49, 0xee, 0xa7, 0x5f, 0x90,
|
||||
0x85, 0x78, 0xcb, 0x24, 0x41, 0x06, 0x13, 0x92, 0x01, 0x02, 0x33, 0x96, 0x2c, 0x46, 0x22, 0xe3,
|
||||
0x97, 0x59, 0xdb, 0x49, 0xa9, 0x39, 0xdf, 0x3d, 0x56, 0x0e, 0xdf, 0xdd, 0x8a, 0xbd, 0x93, 0x1d,
|
||||
0x77, 0x14, 0x14, 0x4c, 0x2a, 0x1a, 0x66, 0x68, 0x52, 0x41, 0x4d, 0x43, 0x07, 0xff, 0x40, 0x86,
|
||||
0x2a, 0x65, 0x68, 0x3c, 0x44, 0xe9, 0x28, 0xf8, 0x0b, 0x28, 0x98, 0x7d, 0x39, 0xdb, 0x51, 0x4e,
|
||||
0x36, 0xa9, 0xb4, 0xb7, 0xf7, 0xf9, 0x3e, 0xfb, 0xec, 0xf3, 0x76, 0x82, 0xab, 0x3d, 0x3f, 0xb9,
|
||||
0x3f, 0xd8, 0xaa, 0xbb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c, 0x27, 0xc3, 0x8a, 0xf9, 0xe7, 0xb0, 0x62, 0x7e,
|
||||
0xf7, 0xbc, 0x62, 0x3c, 0x79, 0x5e, 0x31, 0x9e, 0x3e, 0xaf, 0x18, 0x5b, 0x96, 0xfc, 0x33, 0xf9,
|
||||
0xc1, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x96, 0x4e, 0x58, 0x61, 0x63, 0x0b, 0x00, 0x00,
|
||||
// 1210 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x96, 0xcd, 0x73, 0xdb, 0xc4,
|
||||
0x1b, 0xc7, 0x25, 0xd7, 0x51, 0xec, 0x27, 0x49, 0x9b, 0xd9, 0xa6, 0xad, 0x7e, 0xfe, 0x15, 0xc7,
|
||||
0x98, 0xb7, 0x4e, 0x5b, 0x1c, 0x08, 0xa5, 0x1d, 0xa0, 0x30, 0x13, 0x3b, 0x66, 0x6c, 0x3a, 0x79,
|
||||
0x99, 0x4d, 0xd2, 0x1e, 0x3d, 0x8a, 0xf4, 0xc4, 0x15, 0x91, 0xb4, 0x66, 0x25, 0x3b, 0xcd, 0x8d,
|
||||
0x23, 0xd3, 0x13, 0x17, 0x66, 0xb8, 0xf4, 0x04, 0x67, 0x2e, 0xdc, 0xca, 0x3f, 0xd0, 0xe1, 0xd4,
|
||||
0x63, 0xb9, 0x64, 0xa8, 0x7b, 0xe3, 0xc0, 0x5f, 0xc0, 0x81, 0xd9, 0x17, 0x25, 0xa9, 0x2b, 0x27,
|
||||
0xf4, 0xe4, 0xd5, 0xea, 0xf3, 0x7d, 0xf6, 0xd9, 0xe7, 0x4d, 0x86, 0xab, 0x5d, 0x3f, 0xb9, 0xdf,
|
||||
0xdf, 0xae, 0xb9, 0x2c, 0x5c, 0xf0, 0x98, 0xbb, 0x8b, 0x7c, 0x21, 0xde, 0x73, 0x78, 0xb8, 0xeb,
|
||||
0x27, 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c, 0x9b, 0x7f, 0x0e, 0xcb, 0xe6, 0xf7, 0x2f, 0xca, 0xc6, 0xd3,
|
||||
0x17, 0x65, 0xe3, 0xd9, 0x8b, 0xb2, 0xb1, 0x6d, 0xc9, 0xbf, 0xa0, 0x1f, 0xfd, 0x1b, 0x00, 0x00,
|
||||
0xff, 0xff, 0x36, 0x4b, 0xa7, 0x78, 0x99, 0x0b, 0x00, 0x00,
|
||||
}
|
||||
|
||||
type authenticatedWrapperWatchServer struct {
|
||||
|
@ -956,6 +970,12 @@ func (m *Object) CopyFrom(src interface{}) {
|
|||
}
|
||||
github_com_docker_swarmkit_api_deepcopy.Copy(v.Config, o.GetConfig())
|
||||
m.Object = &v
|
||||
case *Object_Volume:
|
||||
v := Object_Volume{
|
||||
Volume: &Volume{},
|
||||
}
|
||||
github_com_docker_swarmkit_api_deepcopy.Copy(v.Volume, o.GetVolume())
|
||||
m.Object = &v
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1532,6 +1552,27 @@ func (m *Object_Config) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|||
}
|
||||
return len(dAtA) - i, nil
|
||||
}
|
||||
func (m *Object_Volume) MarshalTo(dAtA []byte) (int, error) {
|
||||
size := m.Size()
|
||||
return m.MarshalToSizedBuffer(dAtA[:size])
|
||||
}
|
||||
|
||||
func (m *Object_Volume) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
i := len(dAtA)
|
||||
if m.Volume != nil {
|
||||
{
|
||||
size, err := m.Volume.MarshalToSizedBuffer(dAtA[:i])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
i -= size
|
||||
i = encodeVarintWatch(dAtA, i, uint64(size))
|
||||
}
|
||||
i--
|
||||
dAtA[i] = 0x52
|
||||
}
|
||||
return len(dAtA) - i, nil
|
||||
}
|
||||
func (m *SelectBySlot) Marshal() (dAtA []byte, err error) {
|
||||
size := m.Size()
|
||||
dAtA = make([]byte, size)
|
||||
|
@ -2348,6 +2389,18 @@ func (m *Object_Config) Size() (n int) {
|
|||
}
|
||||
return n
|
||||
}
|
||||
func (m *Object_Volume) Size() (n int) {
|
||||
if m == nil {
|
||||
return 0
|
||||
}
|
||||
var l int
|
||||
_ = l
|
||||
if m.Volume != nil {
|
||||
l = m.Volume.Size()
|
||||
n += 1 + l + sovWatch(uint64(l))
|
||||
}
|
||||
return n
|
||||
}
|
||||
func (m *SelectBySlot) Size() (n int) {
|
||||
if m == nil {
|
||||
return 0
|
||||
|
@ -2749,6 +2802,16 @@ func (this *Object_Config) String() string {
|
|||
}, "")
|
||||
return s
|
||||
}
|
||||
func (this *Object_Volume) String() string {
|
||||
if this == nil {
|
||||
return "nil"
|
||||
}
|
||||
s := strings.Join([]string{`&Object_Volume{`,
|
||||
`Volume:` + strings.Replace(fmt.Sprintf("%v", this.Volume), "Volume", "Volume", 1) + `,`,
|
||||
`}`,
|
||||
}, "")
|
||||
return s
|
||||
}
|
||||
func (this *SelectBySlot) String() string {
|
||||
if this == nil {
|
||||
return "nil"
|
||||
|
@ -3356,6 +3419,41 @@ func (m *Object) Unmarshal(dAtA []byte) error {
|
|||
}
|
||||
m.Object = &Object_Config{v}
|
||||
iNdEx = postIndex
|
||||
case 10:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Volume", wireType)
|
||||
}
|
||||
var msglen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowWatch
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
msglen |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if msglen < 0 {
|
||||
return ErrInvalidLengthWatch
|
||||
}
|
||||
postIndex := iNdEx + msglen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthWatch
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
v := &Volume{}
|
||||
if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
m.Object = &Object_Volume{v}
|
||||
iNdEx = postIndex
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := skipWatch(dAtA[iNdEx:])
|
||||
|
|
|
@ -19,6 +19,7 @@ message Object {
|
|||
Resource resource = 7;
|
||||
Extension extension = 8;
|
||||
Config config = 9;
|
||||
Volume volume = 10;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,170 @@
|
|||
// Copyright 2019 The etcd Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package raftpb
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/gogo/protobuf/proto"
|
||||
)
|
||||
|
||||
// ConfChangeI abstracts over ConfChangeV2 and (legacy) ConfChange to allow
|
||||
// treating them in a unified manner.
|
||||
type ConfChangeI interface {
|
||||
AsV2() ConfChangeV2
|
||||
AsV1() (ConfChange, bool)
|
||||
}
|
||||
|
||||
// MarshalConfChange calls Marshal on the underlying ConfChange or ConfChangeV2
|
||||
// and returns the result along with the corresponding EntryType.
|
||||
func MarshalConfChange(c ConfChangeI) (EntryType, []byte, error) {
|
||||
var typ EntryType
|
||||
var ccdata []byte
|
||||
var err error
|
||||
if ccv1, ok := c.AsV1(); ok {
|
||||
typ = EntryConfChange
|
||||
ccdata, err = ccv1.Marshal()
|
||||
} else {
|
||||
ccv2 := c.AsV2()
|
||||
typ = EntryConfChangeV2
|
||||
ccdata, err = ccv2.Marshal()
|
||||
}
|
||||
return typ, ccdata, err
|
||||
}
|
||||
|
||||
// AsV2 returns a V2 configuration change carrying out the same operation.
|
||||
func (c ConfChange) AsV2() ConfChangeV2 {
|
||||
return ConfChangeV2{
|
||||
Changes: []ConfChangeSingle{{
|
||||
Type: c.Type,
|
||||
NodeID: c.NodeID,
|
||||
}},
|
||||
Context: c.Context,
|
||||
}
|
||||
}
|
||||
|
||||
// AsV1 returns the ConfChange and true.
|
||||
func (c ConfChange) AsV1() (ConfChange, bool) {
|
||||
return c, true
|
||||
}
|
||||
|
||||
// AsV2 is the identity.
|
||||
func (c ConfChangeV2) AsV2() ConfChangeV2 { return c }
|
||||
|
||||
// AsV1 returns ConfChange{} and false.
|
||||
func (c ConfChangeV2) AsV1() (ConfChange, bool) { return ConfChange{}, false }
|
||||
|
||||
// EnterJoint returns two bools. The second bool is true if and only if this
|
||||
// config change will use Joint Consensus, which is the case if it contains more
|
||||
// than one change or if the use of Joint Consensus was requested explicitly.
|
||||
// The first bool can only be true if second one is, and indicates whether the
|
||||
// Joint State will be left automatically.
|
||||
func (c ConfChangeV2) EnterJoint() (autoLeave bool, ok bool) {
|
||||
// NB: in theory, more config changes could qualify for the "simple"
|
||||
// protocol but it depends on the config on top of which the changes apply.
|
||||
// For example, adding two learners is not OK if both nodes are part of the
|
||||
// base config (i.e. two voters are turned into learners in the process of
|
||||
// applying the conf change). In practice, these distinctions should not
|
||||
// matter, so we keep it simple and use Joint Consensus liberally.
|
||||
if c.Transition != ConfChangeTransitionAuto || len(c.Changes) > 1 {
|
||||
// Use Joint Consensus.
|
||||
var autoLeave bool
|
||||
switch c.Transition {
|
||||
case ConfChangeTransitionAuto:
|
||||
autoLeave = true
|
||||
case ConfChangeTransitionJointImplicit:
|
||||
autoLeave = true
|
||||
case ConfChangeTransitionJointExplicit:
|
||||
default:
|
||||
panic(fmt.Sprintf("unknown transition: %+v", c))
|
||||
}
|
||||
return autoLeave, true
|
||||
}
|
||||
return false, false
|
||||
}
|
||||
|
||||
// LeaveJoint is true if the configuration change leaves a joint configuration.
|
||||
// This is the case if the ConfChangeV2 is zero, with the possible exception of
|
||||
// the Context field.
|
||||
func (c ConfChangeV2) LeaveJoint() bool {
|
||||
// NB: c is already a copy.
|
||||
c.Context = nil
|
||||
return proto.Equal(&c, &ConfChangeV2{})
|
||||
}
|
||||
|
||||
// ConfChangesFromString parses a Space-delimited sequence of operations into a
|
||||
// slice of ConfChangeSingle. The supported operations are:
|
||||
// - vn: make n a voter,
|
||||
// - ln: make n a learner,
|
||||
// - rn: remove n, and
|
||||
// - un: update n.
|
||||
func ConfChangesFromString(s string) ([]ConfChangeSingle, error) {
|
||||
var ccs []ConfChangeSingle
|
||||
toks := strings.Split(strings.TrimSpace(s), " ")
|
||||
if toks[0] == "" {
|
||||
toks = nil
|
||||
}
|
||||
for _, tok := range toks {
|
||||
if len(tok) < 2 {
|
||||
return nil, fmt.Errorf("unknown token %s", tok)
|
||||
}
|
||||
var cc ConfChangeSingle
|
||||
switch tok[0] {
|
||||
case 'v':
|
||||
cc.Type = ConfChangeAddNode
|
||||
case 'l':
|
||||
cc.Type = ConfChangeAddLearnerNode
|
||||
case 'r':
|
||||
cc.Type = ConfChangeRemoveNode
|
||||
case 'u':
|
||||
cc.Type = ConfChangeUpdateNode
|
||||
default:
|
||||
return nil, fmt.Errorf("unknown input: %s", tok)
|
||||
}
|
||||
id, err := strconv.ParseUint(tok[1:], 10, 64)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
cc.NodeID = id
|
||||
ccs = append(ccs, cc)
|
||||
}
|
||||
return ccs, nil
|
||||
}
|
||||
|
||||
// ConfChangesToString is the inverse to ConfChangesFromString.
|
||||
func ConfChangesToString(ccs []ConfChangeSingle) string {
|
||||
var buf strings.Builder
|
||||
for i, cc := range ccs {
|
||||
if i > 0 {
|
||||
buf.WriteByte(' ')
|
||||
}
|
||||
switch cc.Type {
|
||||
case ConfChangeAddNode:
|
||||
buf.WriteByte('v')
|
||||
case ConfChangeAddLearnerNode:
|
||||
buf.WriteByte('l')
|
||||
case ConfChangeRemoveNode:
|
||||
buf.WriteByte('r')
|
||||
case ConfChangeUpdateNode:
|
||||
buf.WriteByte('u')
|
||||
default:
|
||||
buf.WriteString("unknown")
|
||||
}
|
||||
fmt.Fprintf(&buf, "%d", cc.NodeID)
|
||||
}
|
||||
return buf.String()
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
// Copyright 2019 The etcd Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package raftpb
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"reflect"
|
||||
"sort"
|
||||
)
|
||||
|
||||
// Equivalent returns a nil error if the inputs describe the same configuration.
|
||||
// On mismatch, returns a descriptive error showing the differences.
|
||||
func (cs ConfState) Equivalent(cs2 ConfState) error {
|
||||
cs1 := cs
|
||||
orig1, orig2 := cs1, cs2
|
||||
s := func(sl *[]uint64) {
|
||||
*sl = append([]uint64(nil), *sl...)
|
||||
sort.Slice(*sl, func(i, j int) bool { return (*sl)[i] < (*sl)[j] })
|
||||
}
|
||||
|
||||
for _, cs := range []*ConfState{&cs1, &cs2} {
|
||||
s(&cs.Voters)
|
||||
s(&cs.Learners)
|
||||
s(&cs.VotersOutgoing)
|
||||
s(&cs.LearnersNext)
|
||||
}
|
||||
|
||||
if !reflect.DeepEqual(cs1, cs2) {
|
||||
return fmt.Errorf("ConfStates not equivalent after sorting:\n%+#v\n%+#v\nInputs were:\n%+#v\n%+#v", cs1, cs2, orig1, orig2)
|
||||
}
|
||||
return nil
|
||||
}
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,187 @@
|
|||
syntax = "proto2";
|
||||
package raftpb;
|
||||
|
||||
import "gogoproto/gogo.proto";
|
||||
|
||||
option (gogoproto.marshaler_all) = true;
|
||||
option (gogoproto.sizer_all) = true;
|
||||
option (gogoproto.unmarshaler_all) = true;
|
||||
option (gogoproto.goproto_getters_all) = false;
|
||||
option (gogoproto.goproto_enum_prefix_all) = false;
|
||||
option (gogoproto.goproto_unkeyed_all) = false;
|
||||
option (gogoproto.goproto_unrecognized_all) = false;
|
||||
option (gogoproto.goproto_sizecache_all) = false;
|
||||
|
||||
enum EntryType {
|
||||
EntryNormal = 0;
|
||||
EntryConfChange = 1; // corresponds to pb.ConfChange
|
||||
EntryConfChangeV2 = 2; // corresponds to pb.ConfChangeV2
|
||||
}
|
||||
|
||||
message Entry {
|
||||
optional uint64 Term = 2 [(gogoproto.nullable) = false]; // must be 64-bit aligned for atomic operations
|
||||
optional uint64 Index = 3 [(gogoproto.nullable) = false]; // must be 64-bit aligned for atomic operations
|
||||
optional EntryType Type = 1 [(gogoproto.nullable) = false];
|
||||
optional bytes Data = 4;
|
||||
}
|
||||
|
||||
message SnapshotMetadata {
|
||||
optional ConfState conf_state = 1 [(gogoproto.nullable) = false];
|
||||
optional uint64 index = 2 [(gogoproto.nullable) = false];
|
||||
optional uint64 term = 3 [(gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
message Snapshot {
|
||||
optional bytes data = 1;
|
||||
optional SnapshotMetadata metadata = 2 [(gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
// For description of different message types, see:
|
||||
// https://pkg.go.dev/go.etcd.io/etcd/raft/v3#hdr-MessageType
|
||||
enum MessageType {
|
||||
MsgHup = 0;
|
||||
MsgBeat = 1;
|
||||
MsgProp = 2;
|
||||
MsgApp = 3;
|
||||
MsgAppResp = 4;
|
||||
MsgVote = 5;
|
||||
MsgVoteResp = 6;
|
||||
MsgSnap = 7;
|
||||
MsgHeartbeat = 8;
|
||||
MsgHeartbeatResp = 9;
|
||||
MsgUnreachable = 10;
|
||||
MsgSnapStatus = 11;
|
||||
MsgCheckQuorum = 12;
|
||||
MsgTransferLeader = 13;
|
||||
MsgTimeoutNow = 14;
|
||||
MsgReadIndex = 15;
|
||||
MsgReadIndexResp = 16;
|
||||
MsgPreVote = 17;
|
||||
MsgPreVoteResp = 18;
|
||||
}
|
||||
|
||||
message Message {
|
||||
optional MessageType type = 1 [(gogoproto.nullable) = false];
|
||||
optional uint64 to = 2 [(gogoproto.nullable) = false];
|
||||
optional uint64 from = 3 [(gogoproto.nullable) = false];
|
||||
optional uint64 term = 4 [(gogoproto.nullable) = false];
|
||||
// logTerm is generally used for appending Raft logs to followers. For example,
|
||||
// (type=MsgApp,index=100,logTerm=5) means leader appends entries starting at
|
||||
// index=101, and the term of entry at index 100 is 5.
|
||||
// (type=MsgAppResp,reject=true,index=100,logTerm=5) means follower rejects some
|
||||
// entries from its leader as it already has an entry with term 5 at index 100.
|
||||
optional uint64 logTerm = 5 [(gogoproto.nullable) = false];
|
||||
optional uint64 index = 6 [(gogoproto.nullable) = false];
|
||||
repeated Entry entries = 7 [(gogoproto.nullable) = false];
|
||||
optional uint64 commit = 8 [(gogoproto.nullable) = false];
|
||||
optional Snapshot snapshot = 9 [(gogoproto.nullable) = false];
|
||||
optional bool reject = 10 [(gogoproto.nullable) = false];
|
||||
optional uint64 rejectHint = 11 [(gogoproto.nullable) = false];
|
||||
optional bytes context = 12;
|
||||
}
|
||||
|
||||
message HardState {
|
||||
optional uint64 term = 1 [(gogoproto.nullable) = false];
|
||||
optional uint64 vote = 2 [(gogoproto.nullable) = false];
|
||||
optional uint64 commit = 3 [(gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
// ConfChangeTransition specifies the behavior of a configuration change with
|
||||
// respect to joint consensus.
|
||||
enum ConfChangeTransition {
|
||||
// Automatically use the simple protocol if possible, otherwise fall back
|
||||
// to ConfChangeJointImplicit. Most applications will want to use this.
|
||||
ConfChangeTransitionAuto = 0;
|
||||
// Use joint consensus unconditionally, and transition out of them
|
||||
// automatically (by proposing a zero configuration change).
|
||||
//
|
||||
// This option is suitable for applications that want to minimize the time
|
||||
// spent in the joint configuration and do not store the joint configuration
|
||||
// in the state machine (outside of InitialState).
|
||||
ConfChangeTransitionJointImplicit = 1;
|
||||
// Use joint consensus and remain in the joint configuration until the
|
||||
// application proposes a no-op configuration change. This is suitable for
|
||||
// applications that want to explicitly control the transitions, for example
|
||||
// to use a custom payload (via the Context field).
|
||||
ConfChangeTransitionJointExplicit = 2;
|
||||
}
|
||||
|
||||
message ConfState {
|
||||
// The voters in the incoming config. (If the configuration is not joint,
|
||||
// then the outgoing config is empty).
|
||||
repeated uint64 voters = 1;
|
||||
// The learners in the incoming config.
|
||||
repeated uint64 learners = 2;
|
||||
// The voters in the outgoing config.
|
||||
repeated uint64 voters_outgoing = 3;
|
||||
// The nodes that will become learners when the outgoing config is removed.
|
||||
// These nodes are necessarily currently in nodes_joint (or they would have
|
||||
// been added to the incoming config right away).
|
||||
repeated uint64 learners_next = 4;
|
||||
// If set, the config is joint and Raft will automatically transition into
|
||||
// the final config (i.e. remove the outgoing config) when this is safe.
|
||||
optional bool auto_leave = 5 [(gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
enum ConfChangeType {
|
||||
ConfChangeAddNode = 0;
|
||||
ConfChangeRemoveNode = 1;
|
||||
ConfChangeUpdateNode = 2;
|
||||
ConfChangeAddLearnerNode = 3;
|
||||
}
|
||||
|
||||
message ConfChange {
|
||||
optional ConfChangeType type = 2 [(gogoproto.nullable) = false];
|
||||
optional uint64 node_id = 3 [(gogoproto.nullable) = false, (gogoproto.customname) = "NodeID" ];
|
||||
optional bytes context = 4;
|
||||
|
||||
// NB: this is used only by etcd to thread through a unique identifier.
|
||||
// Ideally it should really use the Context instead. No counterpart to
|
||||
// this field exists in ConfChangeV2.
|
||||
optional uint64 id = 1 [(gogoproto.nullable) = false, (gogoproto.customname) = "ID" ];
|
||||
}
|
||||
|
||||
// ConfChangeSingle is an individual configuration change operation. Multiple
|
||||
// such operations can be carried out atomically via a ConfChangeV2.
|
||||
message ConfChangeSingle {
|
||||
optional ConfChangeType type = 1 [(gogoproto.nullable) = false];
|
||||
optional uint64 node_id = 2 [(gogoproto.nullable) = false, (gogoproto.customname) = "NodeID"];
|
||||
}
|
||||
|
||||
// ConfChangeV2 messages initiate configuration changes. They support both the
|
||||
// simple "one at a time" membership change protocol and full Joint Consensus
|
||||
// allowing for arbitrary changes in membership.
|
||||
//
|
||||
// The supplied context is treated as an opaque payload and can be used to
|
||||
// attach an action on the state machine to the application of the config change
|
||||
// proposal. Note that contrary to Joint Consensus as outlined in the Raft
|
||||
// paper[1], configuration changes become active when they are *applied* to the
|
||||
// state machine (not when they are appended to the log).
|
||||
//
|
||||
// The simple protocol can be used whenever only a single change is made.
|
||||
//
|
||||
// Non-simple changes require the use of Joint Consensus, for which two
|
||||
// configuration changes are run. The first configuration change specifies the
|
||||
// desired changes and transitions the Raft group into the joint configuration,
|
||||
// in which quorum requires a majority of both the pre-changes and post-changes
|
||||
// configuration. Joint Consensus avoids entering fragile intermediate
|
||||
// configurations that could compromise survivability. For example, without the
|
||||
// use of Joint Consensus and running across three availability zones with a
|
||||
// replication factor of three, it is not possible to replace a voter without
|
||||
// entering an intermediate configuration that does not survive the outage of
|
||||
// one availability zone.
|
||||
//
|
||||
// The provided ConfChangeTransition specifies how (and whether) Joint Consensus
|
||||
// is used, and assigns the task of leaving the joint configuration either to
|
||||
// Raft or the application. Leaving the joint configuration is accomplished by
|
||||
// proposing a ConfChangeV2 with only and optionally the Context field
|
||||
// populated.
|
||||
//
|
||||
// For details on Raft membership changes, see:
|
||||
//
|
||||
// [1]: https://github.com/ongardie/dissertation/blob/master/online-trim.pdf
|
||||
message ConfChangeV2 {
|
||||
optional ConfChangeTransition transition = 1 [(gogoproto.nullable) = false];
|
||||
repeated ConfChangeSingle changes = 2 [(gogoproto.nullable) = false];
|
||||
optional bytes context = 3;
|
||||
}
|
|
@ -16,9 +16,6 @@ github.com/containerd/containerd/errdefs
|
|||
github.com/containerd/containerd/log
|
||||
github.com/containerd/containerd/pkg/userns
|
||||
github.com/containerd/containerd/platforms
|
||||
# github.com/coreos/etcd v3.3.27+incompatible
|
||||
## explicit
|
||||
github.com/coreos/etcd/raft/raftpb
|
||||
# github.com/creack/pty v1.1.11
|
||||
## explicit
|
||||
github.com/creack/pty
|
||||
|
@ -95,7 +92,7 @@ github.com/docker/go-metrics
|
|||
# github.com/docker/go-units v0.4.0
|
||||
## explicit
|
||||
github.com/docker/go-units
|
||||
# github.com/docker/swarmkit v1.12.1-0.20210726173615-3629f50980f6
|
||||
# github.com/docker/swarmkit v1.12.1-0.20220307221335-616e8db4c3b0
|
||||
## explicit
|
||||
github.com/docker/swarmkit/api
|
||||
github.com/docker/swarmkit/api/deepcopy
|
||||
|
@ -114,7 +111,6 @@ github.com/gogo/protobuf/protoc-gen-gogo/descriptor
|
|||
github.com/gogo/protobuf/sortkeys
|
||||
github.com/gogo/protobuf/types
|
||||
# github.com/golang/protobuf v1.5.2
|
||||
## explicit
|
||||
github.com/golang/protobuf/proto
|
||||
github.com/golang/protobuf/ptypes
|
||||
github.com/golang/protobuf/ptypes/any
|
||||
|
@ -233,6 +229,9 @@ github.com/xeipuuv/gojsonreference
|
|||
# github.com/xeipuuv/gojsonschema v1.2.0
|
||||
## explicit
|
||||
github.com/xeipuuv/gojsonschema
|
||||
# go.etcd.io/etcd/raft/v3 v3.5.2
|
||||
## explicit
|
||||
go.etcd.io/etcd/raft/v3/raftpb
|
||||
# golang.org/x/crypto v0.0.0-20211202192323-5770296d904e
|
||||
## explicit
|
||||
golang.org/x/crypto/ed25519
|
||||
|
|
Loading…
Reference in New Issue