Merge pull request #38102 from selansen/master

VXLAN UDP Port configuration support
This commit is contained in:
Sebastiaan van Stijn 2018-11-24 11:50:10 +01:00 коммит произвёл GitHub
Родитель 618741ba87 32180ac0c7
Коммит 0b7cb16dde
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
28 изменённых файлов: 431 добавлений и 131 удалений

Просмотреть файл

@ -28,11 +28,16 @@ func (sr *swarmRouter) initCluster(ctx context.Context, w http.ResponseWriter, r
return errdefs.InvalidParameter(err) return errdefs.InvalidParameter(err)
} }
version := httputils.VersionFromContext(ctx) version := httputils.VersionFromContext(ctx)
// DefaultAddrPool and SubnetSize were added in API 1.39. Ignore on older API versions. // DefaultAddrPool and SubnetSize were added in API 1.39. Ignore on older API versions.
if versions.LessThan(version, "1.39") { if versions.LessThan(version, "1.39") {
req.DefaultAddrPool = nil req.DefaultAddrPool = nil
req.SubnetSize = 0 req.SubnetSize = 0
} }
// DataPathPort was added in API 1.40. Ignore this option on older API versions.
if versions.LessThan(version, "1.40") {
req.DataPathPort = 0
}
nodeID, err := sr.backend.Init(req) nodeID, err := sr.backend.Init(req)
if err != nil { if err != nil {
logrus.Errorf("Error initializing swarm: %v", err) logrus.Errorf("Error initializing swarm: %v", err)

Просмотреть файл

@ -2465,6 +2465,15 @@ definitions:
description: "Whether there is currently a root CA rotation in progress for the swarm" description: "Whether there is currently a root CA rotation in progress for the swarm"
type: "boolean" type: "boolean"
example: false example: false
DataPathPort:
description: |
DataPathPort specifies the data path port number for data traffic.
Acceptable port range is 1024 to 49151.
If no port is set or is set to 0, the default port (4789) is used.
type: "integer"
format: "uint32"
default: 4789
example: 4789
DefaultAddrPool: DefaultAddrPool:
description: | description: |
Default Address Pool specifies default subnet pools for global scope networks. Default Address Pool specifies default subnet pools for global scope networks.
@ -8877,6 +8886,13 @@ paths:
nodes in order to reach the containers running on this node. Using this parameter it is possible to nodes in order to reach the containers running on this node. Using this parameter it is possible to
separate the container data traffic from the management traffic of the cluster. separate the container data traffic from the management traffic of the cluster.
type: "string" type: "string"
DataPathPort:
description: |
DataPathPort specifies the data path port number for data traffic.
Acceptable port range is 1024 to 49151.
if no port is set or is set to 0, default port 4789 will be used.
type: "integer"
format: "uint32"
DefaultAddrPool: DefaultAddrPool:
description: | description: |
Default Address Pool specifies default subnet pools for global scope networks. Default Address Pool specifies default subnet pools for global scope networks.
@ -8897,6 +8913,7 @@ paths:
example: example:
ListenAddr: "0.0.0.0:2377" ListenAddr: "0.0.0.0:2377"
AdvertiseAddr: "192.168.1.1:2377" AdvertiseAddr: "192.168.1.1:2377"
DataPathPort: 4789
DefaultAddrPool: ["10.10.0.0/8", "20.20.0.0/8"] DefaultAddrPool: ["10.10.0.0/8", "20.20.0.0/8"]
SubnetSize: 24 SubnetSize: 24
ForceNewCluster: false ForceNewCluster: false

Просмотреть файл

@ -14,6 +14,7 @@ type ClusterInfo struct {
RootRotationInProgress bool RootRotationInProgress bool
DefaultAddrPool []string DefaultAddrPool []string
SubnetSize uint32 SubnetSize uint32
DataPathPort uint32
} }
// Swarm represents a swarm. // Swarm represents a swarm.
@ -153,6 +154,7 @@ type InitRequest struct {
ListenAddr string ListenAddr string
AdvertiseAddr string AdvertiseAddr string
DataPathAddr string DataPathAddr string
DataPathPort uint32
ForceNewCluster bool ForceNewCluster bool
Spec Spec Spec Spec
AutoLockManagers bool AutoLockManagers bool

Просмотреть файл

@ -42,6 +42,7 @@ func SwarmFromGRPC(c swarmapi.Cluster) types.Swarm {
RootRotationInProgress: c.RootCA.RootRotation != nil, RootRotationInProgress: c.RootCA.RootRotation != nil,
DefaultAddrPool: c.DefaultAddressPool, DefaultAddrPool: c.DefaultAddressPool,
SubnetSize: c.SubnetSize, SubnetSize: c.SubnetSize,
DataPathPort: c.VXLANUDPPort,
}, },
JoinTokens: types.JoinTokens{ JoinTokens: types.JoinTokens{
Worker: c.RootCA.JoinTokens.Worker, Worker: c.RootCA.JoinTokens.Worker,

Просмотреть файл

@ -123,6 +123,25 @@ func validateDefaultAddrPool(defaultAddrPool []string, size uint32) error {
return nil return nil
} }
// getDataPathPort validates vxlan udp port (data path port) number.
// if no port is set, the default (4789) is returned
// valid port numbers are between 1024 and 49151
func getDataPathPort(portNum uint32) (uint32, error) {
// if the value comes as 0 by any reason we set it to default value 4789
if portNum == 0 {
portNum = 4789
return portNum, nil
}
// IANA procedures for each range in detail
// The Well Known Ports, aka the System Ports, from 0-1023
// The Registered Ports, aka the User Ports, from 1024-49151
// The Dynamic Ports, aka the Private Ports, from 49152-65535
// So we can allow range between 1024 to 49151
if portNum < 1024 || portNum > 49151 {
return 0, fmt.Errorf("Datapath port number is not in valid range (1024-49151) : %d", portNum)
}
return portNum, nil
}
func resolveDataPathAddr(dataPathAddr string) (string, error) { func resolveDataPathAddr(dataPathAddr string) (string, error) {
if dataPathAddr == "" { if dataPathAddr == "" {
// dataPathAddr is not defined // dataPathAddr is not defined

Просмотреть файл

@ -57,6 +57,8 @@ type nodeStartConfig struct {
DefaultAddressPool []string DefaultAddressPool []string
// SubnetSize contains subnet size of DefaultAddressPool // SubnetSize contains subnet size of DefaultAddressPool
SubnetSize uint32 SubnetSize uint32
// DataPathPort contains Data path port (VXLAN UDP port) number that is used for data traffic.
DataPathPort uint32
// JoinInProgress is set to true if a join operation has started, but // JoinInProgress is set to true if a join operation has started, but
// not completed yet. // not completed yet.
JoinInProgress bool JoinInProgress bool
@ -125,6 +127,7 @@ func (n *nodeRunner) start(conf nodeStartConfig) error {
NetworkConfig: &swarmallocator.NetworkConfig{ NetworkConfig: &swarmallocator.NetworkConfig{
DefaultAddrPool: conf.DefaultAddressPool, DefaultAddrPool: conf.DefaultAddressPool,
SubnetSize: conf.SubnetSize, SubnetSize: conf.SubnetSize,
VXLANUDPPort: conf.DataPathPort,
}, },
JoinAddr: joinAddr, JoinAddr: joinAddr,
StateDir: n.cluster.root, StateDir: n.cluster.root,

Просмотреть файл

@ -96,6 +96,12 @@ func (c *Cluster) Init(req types.InitRequest) (string, error) {
if err := validateDefaultAddrPool(req.DefaultAddrPool, req.SubnetSize); err != nil { if err := validateDefaultAddrPool(req.DefaultAddrPool, req.SubnetSize); err != nil {
return "", err return "", err
} }
port, err := getDataPathPort(req.DataPathPort)
if err != nil {
return "", err
}
nr, err := c.newNodeRunner(nodeStartConfig{ nr, err := c.newNodeRunner(nodeStartConfig{
forceNewCluster: req.ForceNewCluster, forceNewCluster: req.ForceNewCluster,
autolock: req.AutoLockManagers, autolock: req.AutoLockManagers,
@ -106,6 +112,7 @@ func (c *Cluster) Init(req types.InitRequest) (string, error) {
DefaultAddressPool: req.DefaultAddrPool, DefaultAddressPool: req.DefaultAddrPool,
SubnetSize: req.SubnetSize, SubnetSize: req.SubnetSize,
availability: req.Availability, availability: req.Availability,
DataPathPort: port,
}) })
if err != nil { if err != nil {
return "", err return "", err

Просмотреть файл

@ -29,6 +29,9 @@ keywords: "API, Docker, rcli, REST, documentation"
to return those without the specified labels. to return those without the specified labels.
* `POST /containers/create`, `GET /containers/{id}/json`, and `GET /containers/json` now supports * `POST /containers/create`, `GET /containers/{id}/json`, and `GET /containers/json` now supports
`BindOptions.NonRecursive`. `BindOptions.NonRecursive`.
* `POST /swarm/init` now accepts a `DataPathPort` property to set data path port number.
* `GET /info` now returns information about `DataPathPort` that is currently used in swarm
* `GET /swarm` endpoint now returns DataPathPort info
## V1.39 API changes ## V1.39 API changes

Просмотреть файл

@ -321,6 +321,65 @@ func noServices(client client.ServiceAPIClient) func(log poll.LogT) poll.Result
} }
} }
func TestServiceWithDataPathPortInit(t *testing.T) {
skip.If(t, testEnv.OSType == "windows")
skip.If(t, versions.LessThan(testEnv.DaemonAPIVersion(), "1.40"), "DataPathPort was added in API v1.40")
defer setupTest(t)()
var ops = []func(*daemon.Daemon){}
var datapathPort uint32 = 7777
ops = append(ops, daemon.WithSwarmDataPathPort(datapathPort))
d := swarm.NewSwarm(t, testEnv, ops...)
cli := d.NewClientT(t)
defer cli.Close()
// Create a overlay network
name := "saanvisthira" + t.Name()
network.CreateNoError(t, context.Background(), cli, name,
network.WithDriver("overlay"))
var instances uint64 = 1
serviceID := swarm.CreateService(t, d,
swarm.ServiceWithReplicas(instances),
swarm.ServiceWithNetwork(name),
)
poll.WaitOn(t, serviceRunningCount(cli, serviceID, instances), swarm.ServicePoll)
info := d.Info(t)
assert.Equal(t, info.Swarm.Cluster.DataPathPort, datapathPort)
err := cli.ServiceRemove(context.Background(), serviceID)
assert.NilError(t, err)
d.SwarmLeave(true)
d.Stop(t)
// Clean up , set it back to original one to make sure other tests don't fail
// call without datapath port option.
ops = []func(*daemon.Daemon){}
d = swarm.NewSwarm(t, testEnv, ops...)
cli = d.NewClientT(t)
// Create a overlay network
name = "saanvisthira" + t.Name()
network.CreateNoError(t, context.Background(), cli, name,
network.WithDriver("overlay"))
serviceID = swarm.CreateService(t, d,
swarm.ServiceWithReplicas(instances),
swarm.ServiceWithNetwork(name),
)
poll.WaitOn(t, serviceRunningCount(cli, serviceID, instances), swarm.ServicePoll)
info = d.Info(t)
var defaultDataPathPort uint32 = 4789
assert.Equal(t, info.Swarm.Cluster.DataPathPort, defaultDataPathPort)
err = cli.ServiceRemove(context.Background(), serviceID)
assert.NilError(t, err)
d.SwarmLeave(true)
defer d.Stop(t)
}
func TestServiceWithDefaultAddressPoolInit(t *testing.T) { func TestServiceWithDefaultAddressPoolInit(t *testing.T) {
skip.If(t, testEnv.OSType == "windows") skip.If(t, testEnv.OSType == "windows")
defer setupTest(t)() defer setupTest(t)()

Просмотреть файл

@ -76,6 +76,7 @@ type Daemon struct {
SwarmPort int // FIXME(vdemeester) should probably not be exported SwarmPort int // FIXME(vdemeester) should probably not be exported
DefaultAddrPool []string DefaultAddrPool []string
SubnetSize uint32 SubnetSize uint32
DataPathPort uint32
// cached information // cached information
CachedInfo types.Info CachedInfo types.Info
} }

Просмотреть файл

@ -48,6 +48,13 @@ func WithSwarmDefaultAddrPoolSubnetSize(subnetSize uint32) func(*Daemon) {
} }
} }
// WithSwarmDataPathPort sets the swarm datapath port to use for swarm mode
func WithSwarmDataPathPort(datapathPort uint32) func(*Daemon) {
return func(d *Daemon) {
d.DataPathPort = datapathPort
}
}
// WithEnvironment sets options from internal/test/environment.Execution struct // WithEnvironment sets options from internal/test/environment.Execution struct
func WithEnvironment(e environment.Execution) func(*Daemon) { func WithEnvironment(e environment.Execution) func(*Daemon) {
return func(d *Daemon) { return func(d *Daemon) {

Просмотреть файл

@ -85,6 +85,9 @@ func (d *Daemon) SwarmInit(t assert.TestingT, req swarm.InitRequest) {
req.DefaultAddrPool = d.DefaultAddrPool req.DefaultAddrPool = d.DefaultAddrPool
req.SubnetSize = d.SubnetSize req.SubnetSize = d.SubnetSize
} }
if d.DataPathPort > 0 {
req.DataPathPort = d.DataPathPort
}
cli := d.NewClientT(t) cli := d.NewClientT(t)
defer cli.Close() defer cli.Close()
_, err := cli.SwarmInit(context.Background(), req) _, err := cli.SwarmInit(context.Background(), req)

Просмотреть файл

@ -37,7 +37,7 @@ github.com/mitchellh/hashstructure 2bca23e0e452137f789efbc8610126fd8b94f73b
#get libnetwork packages #get libnetwork packages
# When updating, also update LIBNETWORK_COMMIT in hack/dockerfile/install/proxy.installer accordingly # When updating, also update LIBNETWORK_COMMIT in hack/dockerfile/install/proxy.installer accordingly
github.com/docker/libnetwork 49627167f0585504fd78ed8827529aec57a9618d github.com/docker/libnetwork 1f28166bb386cf9223d2d00a28382b0e474be314
github.com/docker/go-events 9461782956ad83b30282bf90e31fa6a70c255ba9 github.com/docker/go-events 9461782956ad83b30282bf90e31fa6a70c255ba9
github.com/armon/go-radix e39d623f12e8e41c7b5529e9a9dd67a1e2261f80 github.com/armon/go-radix e39d623f12e8e41c7b5529e9a9dd67a1e2261f80
github.com/armon/go-metrics eb0af217e5e9747e41dd5303755356b62d28e3ec github.com/armon/go-metrics eb0af217e5e9747e41dd5303755356b62d28e3ec
@ -130,7 +130,7 @@ github.com/containerd/ttrpc 2a805f71863501300ae1976d29f0454ae003e85a
github.com/gogo/googleapis 08a7655d27152912db7aaf4f983275eaf8d128ef github.com/gogo/googleapis 08a7655d27152912db7aaf4f983275eaf8d128ef
# cluster # cluster
github.com/docker/swarmkit bc032e24784ea618044ee438fedec3458abb2ef9 github.com/docker/swarmkit 8af8c420f491f006ab1730e08d446a795b1667d7
github.com/gogo/protobuf v1.0.0 github.com/gogo/protobuf v1.0.0
github.com/cloudflare/cfssl 1.3.2 github.com/cloudflare/cfssl 1.3.2
github.com/fernet/fernet-go 1b2437bc582b3cfbb341ee5a29f8ef5b42912ff2 github.com/fernet/fernet-go 1b2437bc582b3cfbb341ee5a29f8ef5b42912ff2

5
vendor/github.com/docker/libnetwork/drivers/overlay/encryption.go сгенерированный поставляемый
Просмотреть файл

@ -12,6 +12,7 @@ import (
"strconv" "strconv"
"github.com/docker/libnetwork/drivers/overlay/overlayutils"
"github.com/docker/libnetwork/iptables" "github.com/docker/libnetwork/iptables"
"github.com/docker/libnetwork/ns" "github.com/docker/libnetwork/ns"
"github.com/docker/libnetwork/types" "github.com/docker/libnetwork/types"
@ -200,7 +201,7 @@ func removeEncryption(localIP, remoteIP net.IP, em *encrMap) error {
func programMangle(vni uint32, add bool) (err error) { func programMangle(vni uint32, add bool) (err error) {
var ( var (
p = strconv.FormatUint(uint64(vxlanPort), 10) p = strconv.FormatUint(uint64(overlayutils.VXLANUDPPort()), 10)
c = fmt.Sprintf("0>>22&0x3C@12&0xFFFFFF00=%d", int(vni)<<8) c = fmt.Sprintf("0>>22&0x3C@12&0xFFFFFF00=%d", int(vni)<<8)
m = strconv.FormatUint(uint64(r), 10) m = strconv.FormatUint(uint64(r), 10)
chain = "OUTPUT" chain = "OUTPUT"
@ -227,7 +228,7 @@ func programMangle(vni uint32, add bool) (err error) {
func programInput(vni uint32, add bool) (err error) { func programInput(vni uint32, add bool) (err error) {
var ( var (
port = strconv.FormatUint(uint64(vxlanPort), 10) port = strconv.FormatUint(uint64(overlayutils.VXLANUDPPort()), 10)
vniMatch = fmt.Sprintf("0>>22&0x3C@12&0xFFFFFF00=%d", int(vni)<<8) vniMatch = fmt.Sprintf("0>>22&0x3C@12&0xFFFFFF00=%d", int(vni)<<8)
plainVxlan = []string{"-p", "udp", "--dport", port, "-m", "u32", "--u32", vniMatch, "-j"} plainVxlan = []string{"-p", "udp", "--dport", port, "-m", "u32", "--u32", vniMatch, "-j"}
ipsecVxlan = append([]string{"-m", "policy", "--dir", "in", "--pol", "ipsec"}, plainVxlan...) ipsecVxlan = append([]string{"-m", "policy", "--dir", "in", "--pol", "ipsec"}, plainVxlan...)

3
vendor/github.com/docker/libnetwork/drivers/overlay/ov_utils.go сгенерированный поставляемый
Просмотреть файл

@ -5,6 +5,7 @@ import (
"strings" "strings"
"syscall" "syscall"
"github.com/docker/libnetwork/drivers/overlay/overlayutils"
"github.com/docker/libnetwork/netutils" "github.com/docker/libnetwork/netutils"
"github.com/docker/libnetwork/ns" "github.com/docker/libnetwork/ns"
"github.com/docker/libnetwork/osl" "github.com/docker/libnetwork/osl"
@ -61,7 +62,7 @@ func createVxlan(name string, vni uint32, mtu int) error {
LinkAttrs: netlink.LinkAttrs{Name: name, MTU: mtu}, LinkAttrs: netlink.LinkAttrs{Name: name, MTU: mtu},
VxlanId: int(vni), VxlanId: int(vni),
Learning: true, Learning: true,
Port: vxlanPort, Port: int(overlayutils.VXLANUDPPort()),
Proxy: true, Proxy: true,
L3miss: true, L3miss: true,
L2miss: true, L2miss: true,

1
vendor/github.com/docker/libnetwork/drivers/overlay/overlay.go сгенерированный поставляемый
Просмотреть файл

@ -25,7 +25,6 @@ const (
vethLen = 7 vethLen = 7
vxlanIDStart = 256 vxlanIDStart = 256
vxlanIDEnd = (1 << 24) - 1 vxlanIDEnd = (1 << 24) - 1
vxlanPort = 4789
vxlanEncap = 50 vxlanEncap = 50
secureOption = "encrypted" secureOption = "encrypted"
) )

46
vendor/github.com/docker/libnetwork/drivers/overlay/overlayutils/utils.go сгенерированный поставляемый Normal file
Просмотреть файл

@ -0,0 +1,46 @@
// Package overlayutils provides utility functions for overlay networks
package overlayutils
import (
"fmt"
"sync"
)
var (
vxlanUDPPort uint32
mutex sync.Mutex
)
const defaultVXLANUDPPort = 4789
func init() {
vxlanUDPPort = defaultVXLANUDPPort
}
// ConfigVXLANUDPPort configures vxlan udp port number.
func ConfigVXLANUDPPort(vxlanPort uint32) error {
mutex.Lock()
defer mutex.Unlock()
// if the value comes as 0 by any reason we set it to default value 4789
if vxlanPort == 0 {
vxlanPort = defaultVXLANUDPPort
}
// IANA procedures for each range in detail
// The Well Known Ports, aka the System Ports, from 0-1023
// The Registered Ports, aka the User Ports, from 1024-49151
// The Dynamic Ports, aka the Private Ports, from 49152-65535
// So we can allow range between 1024 to 49151
if vxlanPort < 1024 || vxlanPort > 49151 {
return fmt.Errorf("ConfigVxlanUDPPort Vxlan UDP port number is not in valid range %d", vxlanPort)
}
vxlanUDPPort = vxlanPort
return nil
}
// VXLANUDPPort returns Vxlan UDP port number
func VXLANUDPPort() uint32 {
mutex.Lock()
defer mutex.Unlock()
return vxlanUDPPort
}

267
vendor/github.com/docker/swarmkit/api/objects.pb.go сгенерированный поставляемый
Просмотреть файл

@ -75,6 +75,9 @@ type Node struct {
// endpoint on the node to be used for load balancing. Each overlay // endpoint on the node to be used for load balancing. Each overlay
// network, including ingress network, will have an NetworkAttachment. // network, including ingress network, will have an NetworkAttachment.
Attachments []*NetworkAttachment `protobuf:"bytes,10,rep,name=attachments" json:"attachments,omitempty"` Attachments []*NetworkAttachment `protobuf:"bytes,10,rep,name=attachments" json:"attachments,omitempty"`
// VXLANUDPPort specifies the UDP port for VXLAN traffic.
// This information is passed from cluster object to individual nodes.
VXLANUDPPort uint32 `protobuf:"varint,11,opt,name=VXLANUDPPort,proto3" json:"VXLANUDPPort,omitempty"`
} }
func (m *Node) Reset() { *m = Node{} } func (m *Node) Reset() { *m = Node{} }
@ -303,6 +306,8 @@ type Cluster struct {
// This flag specifies the default subnet size of global scope networks by giving // This flag specifies the default subnet size of global scope networks by giving
// the length of the subnet masks for every such network // the length of the subnet masks for every such network
SubnetSize uint32 `protobuf:"varint,12,opt,name=subnetSize,proto3" json:"subnetSize,omitempty"` SubnetSize uint32 `protobuf:"varint,12,opt,name=subnetSize,proto3" json:"subnetSize,omitempty"`
// VXLANUDPPort specifies the UDP port for VXLAN traffic.
VXLANUDPPort uint32 `protobuf:"varint,13,opt,name=VXLANUDPPort,proto3" json:"VXLANUDPPort,omitempty"`
} }
func (m *Cluster) Reset() { *m = Cluster{} } func (m *Cluster) Reset() { *m = Cluster{} }
@ -912,6 +917,11 @@ func (m *Node) MarshalTo(dAtA []byte) (int, error) {
i += n i += n
} }
} }
if m.VXLANUDPPort != 0 {
dAtA[i] = 0x58
i++
i = encodeVarintObjects(dAtA, i, uint64(m.VXLANUDPPort))
}
return i, nil return i, nil
} }
@ -1514,6 +1524,11 @@ func (m *Cluster) MarshalTo(dAtA []byte) (int, error) {
i++ i++
i = encodeVarintObjects(dAtA, i, uint64(m.SubnetSize)) i = encodeVarintObjects(dAtA, i, uint64(m.SubnetSize))
} }
if m.VXLANUDPPort != 0 {
dAtA[i] = 0x68
i++
i = encodeVarintObjects(dAtA, i, uint64(m.VXLANUDPPort))
}
return i, nil return i, nil
} }
@ -1771,6 +1786,9 @@ func (m *Node) Size() (n int) {
n += 1 + l + sovObjects(uint64(l)) n += 1 + l + sovObjects(uint64(l))
} }
} }
if m.VXLANUDPPort != 0 {
n += 1 + sovObjects(uint64(m.VXLANUDPPort))
}
return n return n
} }
@ -2013,6 +2031,9 @@ func (m *Cluster) Size() (n int) {
if m.SubnetSize != 0 { if m.SubnetSize != 0 {
n += 1 + sovObjects(uint64(m.SubnetSize)) n += 1 + sovObjects(uint64(m.SubnetSize))
} }
if m.VXLANUDPPort != 0 {
n += 1 + sovObjects(uint64(m.VXLANUDPPort))
}
return n return n
} }
@ -4764,6 +4785,7 @@ func (this *Node) String() string {
`Certificate:` + strings.Replace(strings.Replace(this.Certificate.String(), "Certificate", "Certificate", 1), `&`, ``, 1) + `,`, `Certificate:` + strings.Replace(strings.Replace(this.Certificate.String(), "Certificate", "Certificate", 1), `&`, ``, 1) + `,`,
`Role:` + fmt.Sprintf("%v", this.Role) + `,`, `Role:` + fmt.Sprintf("%v", this.Role) + `,`,
`Attachments:` + strings.Replace(fmt.Sprintf("%v", this.Attachments), "NetworkAttachment", "NetworkAttachment", 1) + `,`, `Attachments:` + strings.Replace(fmt.Sprintf("%v", this.Attachments), "NetworkAttachment", "NetworkAttachment", 1) + `,`,
`VXLANUDPPort:` + fmt.Sprintf("%v", this.VXLANUDPPort) + `,`,
`}`, `}`,
}, "") }, "")
return s return s
@ -4897,6 +4919,7 @@ func (this *Cluster) String() string {
`FIPS:` + fmt.Sprintf("%v", this.FIPS) + `,`, `FIPS:` + fmt.Sprintf("%v", this.FIPS) + `,`,
`DefaultAddressPool:` + fmt.Sprintf("%v", this.DefaultAddressPool) + `,`, `DefaultAddressPool:` + fmt.Sprintf("%v", this.DefaultAddressPool) + `,`,
`SubnetSize:` + fmt.Sprintf("%v", this.SubnetSize) + `,`, `SubnetSize:` + fmt.Sprintf("%v", this.SubnetSize) + `,`,
`VXLANUDPPort:` + fmt.Sprintf("%v", this.VXLANUDPPort) + `,`,
`}`, `}`,
}, "") }, "")
return s return s
@ -5434,6 +5457,25 @@ func (m *Node) Unmarshal(dAtA []byte) error {
return err return err
} }
iNdEx = postIndex iNdEx = postIndex
case 11:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field VXLANUDPPort", wireType)
}
m.VXLANUDPPort = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowObjects
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.VXLANUDPPort |= (uint32(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
default: default:
iNdEx = preIndex iNdEx = preIndex
skippy, err := skipObjects(dAtA[iNdEx:]) skippy, err := skipObjects(dAtA[iNdEx:])
@ -7422,6 +7464,25 @@ func (m *Cluster) Unmarshal(dAtA []byte) error {
break break
} }
} }
case 13:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field VXLANUDPPort", wireType)
}
m.VXLANUDPPort = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowObjects
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.VXLANUDPPort |= (uint32(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
default: default:
iNdEx = preIndex iNdEx = preIndex
skippy, err := skipObjects(dAtA[iNdEx:]) skippy, err := skipObjects(dAtA[iNdEx:])
@ -8218,106 +8279,108 @@ var (
func init() { proto.RegisterFile("github.com/docker/swarmkit/api/objects.proto", fileDescriptorObjects) } func init() { proto.RegisterFile("github.com/docker/swarmkit/api/objects.proto", fileDescriptorObjects) }
var fileDescriptorObjects = []byte{ var fileDescriptorObjects = []byte{
// 1610 bytes of a gzipped FileDescriptorProto // 1643 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x58, 0xcd, 0x73, 0x1b, 0x49, 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x58, 0xcd, 0x73, 0x23, 0x47,
0x15, 0xcf, 0xc8, 0x63, 0x7d, 0x3c, 0x59, 0xc2, 0xf4, 0x1a, 0x33, 0x11, 0x46, 0x32, 0xda, 0x5a, 0x15, 0xdf, 0x91, 0x67, 0xf5, 0xf1, 0xf4, 0xc1, 0xd2, 0x31, 0x66, 0x56, 0x18, 0xc9, 0x28, 0x15,
0x6a, 0x6b, 0x2b, 0x25, 0x2f, 0x66, 0x01, 0xc7, 0xb0, 0x6c, 0x24, 0xdb, 0x24, 0xaa, 0x10, 0xe2, 0x6a, 0x2b, 0xb5, 0x25, 0x87, 0x25, 0x80, 0xd7, 0x10, 0x12, 0xc9, 0x32, 0x1b, 0x55, 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0xc6,
0x3f, 0xe6, 0x0d, 0xe3, 0xdf, 0xf3, 0x86, 0x31, 0xc8, 0x2b, 0xff, 0xfc, 0xf0, 0xbf, 0x01, 0x00,
0x00, 0xff, 0xff, 0xc3, 0x37, 0x09, 0x2f, 0x94, 0x14, 0x00, 0x00,
} }

7
vendor/github.com/docker/swarmkit/api/objects.proto сгенерированный поставляемый
Просмотреть файл

@ -81,6 +81,10 @@ message Node {
// endpoint on the node to be used for load balancing. Each overlay // endpoint on the node to be used for load balancing. Each overlay
// network, including ingress network, will have an NetworkAttachment. // network, including ingress network, will have an NetworkAttachment.
repeated NetworkAttachment attachments = 10; repeated NetworkAttachment attachments = 10;
// VXLANUDPPort specifies the UDP port for VXLAN traffic.
// This information is passed from cluster object to individual nodes.
uint32 VXLANUDPPort = 11;
} }
message Service { message Service {
@ -375,6 +379,9 @@ message Cluster {
// This flag specifies the default subnet size of global scope networks by giving // This flag specifies the default subnet size of global scope networks by giving
// the length of the subnet masks for every such network // the length of the subnet masks for every such network
uint32 subnetSize = 12; uint32 subnetSize = 12;
// VXLANUDPPort specifies the UDP port for VXLAN traffic.
uint32 VXLANUDPPort = 13;
} }
// Secret represents a secret that should be passed to a container or a node, // Secret represents a secret that should be passed to a container or a node,

2
vendor/github.com/docker/swarmkit/ca/server.go сгенерированный поставляемый
Просмотреть файл

@ -323,7 +323,7 @@ func (s *Server) IssueNodeCertificate(ctx context.Context, request *api.IssueNod
Availability: request.Availability, Availability: request.Availability,
}, },
} }
node.VXLANUDPPort = clusters[0].VXLANUDPPort
return store.CreateNode(tx, node) return store.CreateNode(tx, node)
}) })
if err == nil { if err == nil {

1
vendor/github.com/docker/swarmkit/manager/allocator/cnmallocator/drivers_ipam.go сгенерированный поставляемый
Просмотреть файл

@ -31,6 +31,7 @@ func initIPAMDrivers(r *drvregistry.DrvRegistry, netConfig *NetworkConfig) error
} }
str.WriteString(": Size ") str.WriteString(": Size ")
str.WriteString(strconv.Itoa(int(netConfig.SubnetSize))) str.WriteString(strconv.Itoa(int(netConfig.SubnetSize)))
} }
if err := ipamutils.ConfigGlobalScopeDefaultNetworks(addressPool); err != nil { if err := ipamutils.ConfigGlobalScopeDefaultNetworks(addressPool); err != nil {
return err return err

3
vendor/github.com/docker/swarmkit/manager/allocator/cnmallocator/networkallocator.go сгенерированный поставляемый
Просмотреть файл

@ -94,6 +94,9 @@ type NetworkConfig struct {
// SubnetSize specifies the subnet size of the networks created from // SubnetSize specifies the subnet size of the networks created from
// the default subnet pool // the default subnet pool
SubnetSize uint32 SubnetSize uint32
// VXLANUDPPort specifies the UDP port number for VXLAN traffic
VXLANUDPPort uint32
} }
// New returns a new NetworkAllocator handle // New returns a new NetworkAllocator handle

20
vendor/github.com/docker/swarmkit/manager/allocator/network.go сгенерированный поставляемый
Просмотреть файл

@ -69,10 +69,22 @@ type networkContext struct {
func (a *Allocator) doNetworkInit(ctx context.Context) (err error) { func (a *Allocator) doNetworkInit(ctx context.Context) (err error) {
var netConfig *cnmallocator.NetworkConfig var netConfig *cnmallocator.NetworkConfig
if a.networkConfig != nil && a.networkConfig.DefaultAddrPool != nil { // There are two ways user can invoke swarm init
netConfig = &cnmallocator.NetworkConfig{ // with default address pool & vxlan port or with only vxlan port
DefaultAddrPool: a.networkConfig.DefaultAddrPool, // hence we need two different way to construct netconfig
SubnetSize: a.networkConfig.SubnetSize, if a.networkConfig != nil {
if a.networkConfig.DefaultAddrPool != nil {
netConfig = &cnmallocator.NetworkConfig{
DefaultAddrPool: a.networkConfig.DefaultAddrPool,
SubnetSize: a.networkConfig.SubnetSize,
VXLANUDPPort: a.networkConfig.VXLANUDPPort,
}
} else if a.networkConfig.VXLANUDPPort != 0 {
netConfig = &cnmallocator.NetworkConfig{
DefaultAddrPool: nil,
SubnetSize: 0,
VXLANUDPPort: a.networkConfig.VXLANUDPPort,
}
} }
} }

6
vendor/github.com/docker/swarmkit/manager/controlapi/cluster.go сгенерированный поставляемый
Просмотреть файл

@ -21,6 +21,8 @@ const (
expiredCertGrace = 24 * time.Hour * 7 expiredCertGrace = 24 * time.Hour * 7
// inbuilt default subnet size // inbuilt default subnet size
inbuiltSubnetSize = 24 inbuiltSubnetSize = 24
// VXLAN default port
defaultVXLANPort = 4789
) )
var ( var (
@ -274,6 +276,7 @@ func redactClusters(clusters []*api.Cluster) []*api.Cluster {
BlacklistedCertificates: cluster.BlacklistedCertificates, BlacklistedCertificates: cluster.BlacklistedCertificates,
DefaultAddressPool: cluster.DefaultAddressPool, DefaultAddressPool: cluster.DefaultAddressPool,
SubnetSize: cluster.SubnetSize, SubnetSize: cluster.SubnetSize,
VXLANUDPPort: cluster.VXLANUDPPort,
} }
if newCluster.DefaultAddressPool == nil { if newCluster.DefaultAddressPool == nil {
// This is just for CLI display. Set the inbuilt default pool for // This is just for CLI display. Set the inbuilt default pool for
@ -281,6 +284,9 @@ func redactClusters(clusters []*api.Cluster) []*api.Cluster {
newCluster.DefaultAddressPool = inbuiltDefaultAddressPool newCluster.DefaultAddressPool = inbuiltDefaultAddressPool
newCluster.SubnetSize = inbuiltSubnetSize newCluster.SubnetSize = inbuiltSubnetSize
} }
if newCluster.VXLANUDPPort == 0 {
newCluster.VXLANUDPPort = defaultVXLANPort
}
redactedClusters = append(redactedClusters, newCluster) redactedClusters = append(redactedClusters, newCluster)
} }

18
vendor/github.com/docker/swarmkit/manager/controlapi/service.go сгенерированный поставляемый
Просмотреть файл

@ -680,13 +680,14 @@ func (s *Server) CreateService(ctx context.Context, request *api.CreateServiceRe
return store.CreateService(tx, service) return store.CreateService(tx, service)
}) })
if err != nil { switch err {
case store.ErrNameConflict:
return nil, status.Errorf(codes.AlreadyExists, "service %s already exists", request.Spec.Annotations.Name)
case nil:
return &api.CreateServiceResponse{Service: service}, nil
default:
return nil, err return nil, err
} }
return &api.CreateServiceResponse{
Service: service,
}, nil
} }
// GetService returns a Service given a ServiceID. // GetService returns a Service given a ServiceID.
@ -896,7 +897,12 @@ func (s *Server) ListServices(ctx context.Context, request *api.ListServicesRequ
} }
}) })
if err != nil { if err != nil {
return nil, err switch err {
case store.ErrInvalidFindBy:
return nil, status.Errorf(codes.InvalidArgument, err.Error())
default:
return nil, err
}
} }
if request.Filters != nil { if request.Filters != nil {

32
vendor/github.com/docker/swarmkit/manager/manager.go сгенерированный поставляемый
Просмотреть файл

@ -942,14 +942,21 @@ func (m *Manager) becomeLeader(ctx context.Context) {
rootCA, rootCA,
m.config.FIPS, m.config.FIPS,
nil, nil,
0,
0) 0)
// If defaultAddrPool is valid we update cluster object with new value // If defaultAddrPool is valid we update cluster object with new value
if m.config.NetworkConfig != nil && m.config.NetworkConfig.DefaultAddrPool != nil { // If VXLANUDPPort is not 0 then we call update cluster object with new value
clusterObj.DefaultAddressPool = m.config.NetworkConfig.DefaultAddrPool if m.config.NetworkConfig != nil {
clusterObj.SubnetSize = m.config.NetworkConfig.SubnetSize if m.config.NetworkConfig.DefaultAddrPool != nil {
} clusterObj.DefaultAddressPool = m.config.NetworkConfig.DefaultAddrPool
clusterObj.SubnetSize = m.config.NetworkConfig.SubnetSize
}
if m.config.NetworkConfig.VXLANUDPPort != 0 {
clusterObj.VXLANUDPPort = m.config.NetworkConfig.VXLANUDPPort
}
}
err := store.CreateCluster(tx, clusterObj) err := store.CreateCluster(tx, clusterObj)
if err != nil && err != store.ErrExist { if err != nil && err != store.ErrExist {
@ -958,7 +965,7 @@ func (m *Manager) becomeLeader(ctx context.Context) {
// Add Node entry for ourself, if one // Add Node entry for ourself, if one
// doesn't exist already. // doesn't exist already.
freshCluster := nil == store.CreateNode(tx, managerNode(nodeID, m.config.Availability)) freshCluster := nil == store.CreateNode(tx, managerNode(nodeID, m.config.Availability, clusterObj.VXLANUDPPort))
if freshCluster { if freshCluster {
// This is a fresh swarm cluster. Add to store now any initial // This is a fresh swarm cluster. Add to store now any initial
@ -991,12 +998,13 @@ func (m *Manager) becomeLeader(ctx context.Context) {
m.roleManager = newRoleManager(s, m.raftNode) m.roleManager = newRoleManager(s, m.raftNode)
// TODO(stevvooe): Allocate a context that can be used to // TODO(stevvooe): Allocate a context that can be used to
// shutdown underlying manager processes when leadership is // shutdown underlying manager processes when leadership isTestUpdaterRollback
// lost. // lost.
// If DefaultAddrPool is null, Read from store and check if // If DefaultAddrPool is null, Read from store and check if
// DefaultAddrPool info is stored in cluster object // DefaultAddrPool info is stored in cluster object
if m.config.NetworkConfig == nil || m.config.NetworkConfig.DefaultAddrPool == nil { // If VXLANUDPPort is 0, read it from the store - cluster object
if m.config.NetworkConfig == nil || m.config.NetworkConfig.DefaultAddrPool == nil || m.config.NetworkConfig.VXLANUDPPort == 0 {
var cluster *api.Cluster var cluster *api.Cluster
s.View(func(tx store.ReadTx) { s.View(func(tx store.ReadTx) {
cluster = store.GetCluster(tx, clusterID) cluster = store.GetCluster(tx, clusterID)
@ -1005,6 +1013,9 @@ func (m *Manager) becomeLeader(ctx context.Context) {
m.config.NetworkConfig.DefaultAddrPool = append(m.config.NetworkConfig.DefaultAddrPool, cluster.DefaultAddressPool...) m.config.NetworkConfig.DefaultAddrPool = append(m.config.NetworkConfig.DefaultAddrPool, cluster.DefaultAddressPool...)
m.config.NetworkConfig.SubnetSize = cluster.SubnetSize m.config.NetworkConfig.SubnetSize = cluster.SubnetSize
} }
if cluster.VXLANUDPPort != 0 {
m.config.NetworkConfig.VXLANUDPPort = cluster.VXLANUDPPort
}
} }
m.allocator, err = allocator.New(s, m.config.PluginGetter, m.config.NetworkConfig) m.allocator, err = allocator.New(s, m.config.PluginGetter, m.config.NetworkConfig)
@ -1131,7 +1142,8 @@ func defaultClusterObject(
rootCA *ca.RootCA, rootCA *ca.RootCA,
fips bool, fips bool,
defaultAddressPool []string, defaultAddressPool []string,
subnetSize uint32) *api.Cluster { subnetSize uint32,
vxlanUDPPort uint32) *api.Cluster {
var caKey []byte var caKey []byte
if rcaSigner, err := rootCA.Signer(); err == nil { if rcaSigner, err := rootCA.Signer(); err == nil {
caKey = rcaSigner.Key caKey = rcaSigner.Key
@ -1166,11 +1178,12 @@ func defaultClusterObject(
FIPS: fips, FIPS: fips,
DefaultAddressPool: defaultAddressPool, DefaultAddressPool: defaultAddressPool,
SubnetSize: subnetSize, SubnetSize: subnetSize,
VXLANUDPPort: vxlanUDPPort,
} }
} }
// managerNode creates a new node with NodeRoleManager role. // managerNode creates a new node with NodeRoleManager role.
func managerNode(nodeID string, availability api.NodeSpec_Availability) *api.Node { func managerNode(nodeID string, availability api.NodeSpec_Availability, vxlanPort uint32) *api.Node {
return &api.Node{ return &api.Node{
ID: nodeID, ID: nodeID,
Certificate: api.Certificate{ Certificate: api.Certificate{
@ -1185,6 +1198,7 @@ func managerNode(nodeID string, availability api.NodeSpec_Availability) *api.Nod
Membership: api.NodeMembershipAccepted, Membership: api.NodeMembershipAccepted,
Availability: availability, Availability: availability,
}, },
VXLANUDPPort: vxlanPort,
} }
} }

18
vendor/github.com/docker/swarmkit/node/node.go сгенерированный поставляемый
Просмотреть файл

@ -19,7 +19,8 @@ import (
"github.com/docker/swarmkit/identity" "github.com/docker/swarmkit/identity"
"github.com/docker/docker/pkg/plugingetter" "github.com/docker/docker/pkg/plugingetter"
metrics "github.com/docker/go-metrics" "github.com/docker/go-metrics"
"github.com/docker/libnetwork/drivers/overlay/overlayutils"
"github.com/docker/swarmkit/agent" "github.com/docker/swarmkit/agent"
"github.com/docker/swarmkit/agent/exec" "github.com/docker/swarmkit/agent/exec"
"github.com/docker/swarmkit/api" "github.com/docker/swarmkit/api"
@ -32,7 +33,7 @@ import (
"github.com/docker/swarmkit/manager/encryption" "github.com/docker/swarmkit/manager/encryption"
"github.com/docker/swarmkit/remotes" "github.com/docker/swarmkit/remotes"
"github.com/docker/swarmkit/xnet" "github.com/docker/swarmkit/xnet"
grpc_prometheus "github.com/grpc-ecosystem/go-grpc-prometheus" "github.com/grpc-ecosystem/go-grpc-prometheus"
"github.com/pkg/errors" "github.com/pkg/errors"
"github.com/sirupsen/logrus" "github.com/sirupsen/logrus"
bolt "go.etcd.io/bbolt" bolt "go.etcd.io/bbolt"
@ -161,6 +162,7 @@ type Node struct {
manager *manager.Manager manager *manager.Manager
notifyNodeChange chan *agent.NodeChanges // used by the agent to relay node updates from the dispatcher Session stream to (*Node).run notifyNodeChange chan *agent.NodeChanges // used by the agent to relay node updates from the dispatcher Session stream to (*Node).run
unlockKey []byte unlockKey []byte
vxlanUDPPort uint32
} }
type lastSeenRole struct { type lastSeenRole struct {
@ -269,6 +271,14 @@ func (n *Node) currentRole() api.NodeRole {
return currentRole return currentRole
} }
// configVXLANUDPPort sets vxlan port in libnetwork
func configVXLANUDPPort(ctx context.Context, vxlanUDPPort uint32) {
if err := overlayutils.ConfigVXLANUDPPort(vxlanUDPPort); err != nil {
log.G(ctx).WithError(err).Error("Configuring VXLAN port failed")
}
logrus.Infof(" Swarm successfully initialized VXLAN UDP Port to %d ", vxlanUDPPort)
}
func (n *Node) run(ctx context.Context) (err error) { func (n *Node) run(ctx context.Context) (err error) {
defer func() { defer func() {
n.err = err n.err = err
@ -358,6 +368,10 @@ func (n *Node) run(ctx context.Context) (err error) {
return return
case nodeChanges := <-n.notifyNodeChange: case nodeChanges := <-n.notifyNodeChange:
if nodeChanges.Node != nil { if nodeChanges.Node != nil {
if nodeChanges.Node.VXLANUDPPort != 0 {
n.vxlanUDPPort = nodeChanges.Node.VXLANUDPPort
configVXLANUDPPort(ctx, n.vxlanUDPPort)
}
// This is a bit complex to be backward compatible with older CAs that // This is a bit complex to be backward compatible with older CAs that
// don't support the Node.Role field. They only use what's presently // don't support the Node.Role field. They only use what's presently
// called DesiredRole. // called DesiredRole.

2
vendor/github.com/docker/swarmkit/vendor.conf сгенерированный поставляемый
Просмотреть файл

@ -33,7 +33,7 @@ github.com/docker/go-connections 7beb39f0b969b075d1325fecb092faf27fd357b6
github.com/docker/go-events 9461782956ad83b30282bf90e31fa6a70c255ba9 github.com/docker/go-events 9461782956ad83b30282bf90e31fa6a70c255ba9
github.com/docker/go-units 9e638d38cf6977a37a8ea0078f3ee75a7cdb2dd1 github.com/docker/go-units 9e638d38cf6977a37a8ea0078f3ee75a7cdb2dd1
github.com/docker/libkv 1d8431073ae03cdaedb198a89722f3aab6d418ef github.com/docker/libkv 1d8431073ae03cdaedb198a89722f3aab6d418ef
github.com/docker/libnetwork a79d3687931697244b8e03485bf7b2042f8ec6b6 github.com/docker/libnetwork 1f28166bb386cf9223d2d00a28382b0e474be314
github.com/opencontainers/runc ad0f5255060d36872be04de22f8731f38ef2d7b1 github.com/opencontainers/runc ad0f5255060d36872be04de22f8731f38ef2d7b1
github.com/opencontainers/go-digest v1.0.0-rc1 github.com/opencontainers/go-digest v1.0.0-rc1
github.com/opencontainers/image-spec v1.0.1 github.com/opencontainers/image-spec v1.0.1