Revendor swarmkit to 3076318ec0327e22c837c2bfdfacea08124dc755

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
This commit is contained in:
Andrea Luzzardi 2016-11-15 19:04:09 -08:00
parent 75fd88ba89
commit 7a457451f6
3 changed files with 17 additions and 6 deletions

View file

@ -100,7 +100,7 @@ github.com/docker/containerd 8517738ba4b82aff5662c97ca4627e7e4d03b531
github.com/tonistiigi/fifo 1405643975692217d6720f8b54aeee1bf2cd5cf4
# cluster
github.com/docker/swarmkit efd44df04cc0fd828de5947263858c3a5a2729b1
github.com/docker/swarmkit 3076318ec0327e22c837c2bfdfacea08124dc755
github.com/golang/mock bd3c8e81be01eef76d4b503f5e687d2d1354d2d9
github.com/gogo/protobuf v0.3
github.com/cloudflare/cfssl 7fb22c8cba7ecaf98e4082d22d65800cf45e042a

View file

@ -1,6 +1,7 @@
package controlapi
import (
"crypto/subtle"
"regexp"
"strings"
@ -71,7 +72,10 @@ func (s *Server) UpdateSecret(ctx context.Context, request *api.UpdateSecretRequ
return nil
}
if secret.Spec.Annotations.Name != request.Spec.Annotations.Name || request.Spec.Data != nil {
// Check if the Name is different than the current name, or the secret is non-nil and different
// than the current secret
if secret.Spec.Annotations.Name != request.Spec.Annotations.Name ||
(request.Spec.Data != nil && subtle.ConstantTimeCompare(request.Spec.Data, secret.Spec.Data) == 0) {
return grpc.Errorf(codes.InvalidArgument, "only updates to Labels are allowed")
}

View file

@ -203,10 +203,6 @@ func validateEndpointSpec(epSpec *api.EndpointSpec) error {
return nil
}
if len(epSpec.Ports) > 0 && epSpec.Mode == api.ResolutionModeDNSRoundRobin {
return grpc.Errorf(codes.InvalidArgument, "EndpointSpec: ports can't be used with dnsrr mode")
}
type portSpec struct {
publishedPort uint32
protocol api.PortConfig_Protocol
@ -214,6 +210,17 @@ func validateEndpointSpec(epSpec *api.EndpointSpec) error {
portSet := make(map[portSpec]struct{})
for _, port := range epSpec.Ports {
// Publish mode = "ingress" represents Routing-Mesh and current implementation
// of routing-mesh relies on IPVS based load-balancing with input=published-port.
// But Endpoint-Spec mode of DNSRR relies on multiple A records and cannot be used
// with routing-mesh (PublishMode="ingress") which cannot rely on DNSRR.
// But PublishMode="host" doesn't provide Routing-Mesh and the DNSRR is applicable
// for the backend network and hence we accept that configuration.
if epSpec.Mode == api.ResolutionModeDNSRoundRobin && port.PublishMode == api.PublishModeIngress {
return grpc.Errorf(codes.InvalidArgument, "EndpointSpec: port published with ingress mode can't be used with dnsrr mode")
}
// If published port is not specified, it does not conflict
// with any others.
if port.PublishedPort == 0 {