Browse code

Merge pull request #30548 from yongtang/vendor-swarmkit

Update SwarmKit to 78ae345f449ac69aa741c762df7e5f0020f70275

Alexander Morozov authored on 2017/01/31 02:41:08
Showing 17 changed files
... ...
@@ -671,17 +671,8 @@ func (s *DockerSwarmSuite) TestSwarmNetworkPlugin(c *check.C) {
671 671
 	d := s.AddDaemon(c, true, true)
672 672
 
673 673
 	out, err := d.Cmd("network", "create", "-d", globalNetworkPlugin, "foo")
674
-	c.Assert(err, checker.IsNil)
675
-	c.Assert(strings.TrimSpace(out), checker.Not(checker.Equals), "")
676
-
677
-	name := "top"
678
-	out, err = d.Cmd("service", "create", "--name", name, "--network", "foo", "busybox", "top")
679
-	c.Assert(err, checker.IsNil)
680
-	c.Assert(strings.TrimSpace(out), checker.Not(checker.Equals), "")
681
-
682
-	out, err = d.Cmd("service", "inspect", "--format", "{{range .Spec.Networks}}{{.Target}}{{end}}", name)
683
-	c.Assert(err, checker.IsNil)
684
-	c.Assert(strings.TrimSpace(out), checker.Equals, "foo")
674
+	c.Assert(err, checker.NotNil)
675
+	c.Assert(out, checker.Contains, "not supported in swarm mode")
685 676
 }
686 677
 
687 678
 // Test case for #24712
... ...
@@ -102,7 +102,7 @@ github.com/docker/containerd d7975b89804b207b68f8b446cf1e2af72589bfcf
102 102
 github.com/tonistiigi/fifo 1405643975692217d6720f8b54aeee1bf2cd5cf4
103 103
 
104 104
 # cluster
105
-github.com/docker/swarmkit 037b4913929019d44bc927870bf2d92ce9ca261f
105
+github.com/docker/swarmkit 78ae345f449ac69aa741c762df7e5f0020f70275
106 106
 github.com/golang/mock bd3c8e81be01eef76d4b503f5e687d2d1354d2d9
107 107
 github.com/gogo/protobuf 8d70fb3182befc465c4a1eac8ad4d38ff49778e2
108 108
 github.com/cloudflare/cfssl 7fb22c8cba7ecaf98e4082d22d65800cf45e042a
... ...
@@ -483,8 +483,13 @@ type ContainerSpec struct {
483 483
 	// including stdin if it is still open.
484 484
 	TTY bool `protobuf:"varint,13,opt,name=tty,proto3" json:"tty,omitempty"`
485 485
 	// OpenStdin declares that the standard input (stdin) should be open.
486
-	OpenStdin bool    `protobuf:"varint,18,opt,name=open_stdin,json=openStdin,proto3" json:"open_stdin,omitempty"`
487
-	Mounts    []Mount `protobuf:"bytes,8,rep,name=mounts" json:"mounts"`
486
+	OpenStdin bool `protobuf:"varint,18,opt,name=open_stdin,json=openStdin,proto3" json:"open_stdin,omitempty"`
487
+	// ReadOnly declares that the container root filesystem is read-only.
488
+	// This only impacts the root filesystem, not additional mounts (including
489
+	// tmpfs). For additional mounts that are not part of the initial rootfs,
490
+	// they will be decided by the modes passed in the mount definition.
491
+	ReadOnly bool    `protobuf:"varint,19,opt,name=read_only,json=readOnly,proto3" json:"read_only,omitempty"`
492
+	Mounts   []Mount `protobuf:"bytes,8,rep,name=mounts" json:"mounts"`
488 493
 	// StopGracePeriod the grace period for stopping the container before
489 494
 	// forcefully killing the container.
490 495
 	// Note: Can't use stdduration here because this needs to be nullable.
... ...
@@ -1552,6 +1557,18 @@ func (m *ContainerSpec) MarshalTo(dAtA []byte) (int, error) {
1552 1552
 		}
1553 1553
 		i++
1554 1554
 	}
1555
+	if m.ReadOnly {
1556
+		dAtA[i] = 0x98
1557
+		i++
1558
+		dAtA[i] = 0x1
1559
+		i++
1560
+		if m.ReadOnly {
1561
+			dAtA[i] = 1
1562
+		} else {
1563
+			dAtA[i] = 0
1564
+		}
1565
+		i++
1566
+	}
1555 1567
 	return i, nil
1556 1568
 }
1557 1569
 
... ...
@@ -2127,6 +2144,9 @@ func (m *ContainerSpec) Size() (n int) {
2127 2127
 	if m.OpenStdin {
2128 2128
 		n += 3
2129 2129
 	}
2130
+	if m.ReadOnly {
2131
+		n += 3
2132
+	}
2130 2133
 	return n
2131 2134
 }
2132 2135
 
... ...
@@ -2397,6 +2417,7 @@ func (this *ContainerSpec) String() string {
2397 2397
 		`Healthcheck:` + strings.Replace(fmt.Sprintf("%v", this.Healthcheck), "HealthConfig", "HealthConfig", 1) + `,`,
2398 2398
 		`Hosts:` + fmt.Sprintf("%v", this.Hosts) + `,`,
2399 2399
 		`OpenStdin:` + fmt.Sprintf("%v", this.OpenStdin) + `,`,
2400
+		`ReadOnly:` + fmt.Sprintf("%v", this.ReadOnly) + `,`,
2400 2401
 		`}`,
2401 2402
 	}, "")
2402 2403
 	return s
... ...
@@ -4027,6 +4048,26 @@ func (m *ContainerSpec) Unmarshal(dAtA []byte) error {
4027 4027
 				}
4028 4028
 			}
4029 4029
 			m.OpenStdin = bool(v != 0)
4030
+		case 19:
4031
+			if wireType != 0 {
4032
+				return fmt.Errorf("proto: wrong wireType = %d for field ReadOnly", wireType)
4033
+			}
4034
+			var v int
4035
+			for shift := uint(0); ; shift += 7 {
4036
+				if shift >= 64 {
4037
+					return ErrIntOverflowSpecs
4038
+				}
4039
+				if iNdEx >= l {
4040
+					return io.ErrUnexpectedEOF
4041
+				}
4042
+				b := dAtA[iNdEx]
4043
+				iNdEx++
4044
+				v |= (int(b) & 0x7F) << shift
4045
+				if b < 0x80 {
4046
+					break
4047
+				}
4048
+			}
4049
+			m.ReadOnly = bool(v != 0)
4030 4050
 		default:
4031 4051
 			iNdEx = preIndex
4032 4052
 			skippy, err := skipSpecs(dAtA[iNdEx:])
... ...
@@ -5079,109 +5120,110 @@ var (
5079 5079
 func init() { proto.RegisterFile("specs.proto", fileDescriptorSpecs) }
5080 5080
 
5081 5081
 var fileDescriptorSpecs = []byte{
5082
-	// 1654 bytes of a gzipped FileDescriptorProto
5083
-	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xac, 0x57, 0xcd, 0x72, 0x23, 0xb7,
5084
-	0x11, 0x26, 0x25, 0x8a, 0x3f, 0x3d, 0xd4, 0x2e, 0x85, 0xb2, 0x9d, 0x59, 0x3a, 0xa6, 0xb8, 0xf4,
5085
-	0xc6, 0x91, 0xe3, 0x0a, 0x55, 0x51, 0x52, 0xce, 0x3a, 0x1b, 0x57, 0x42, 0x8a, 0x8c, 0x56, 0x51,
5086
-	0x24, 0xb3, 0x20, 0x79, 0x53, 0x7b, 0x62, 0x41, 0x33, 0x10, 0x39, 0xa5, 0xe1, 0x60, 0x02, 0x60,
5087
-	0xe8, 0xe2, 0x2d, 0x47, 0xd7, 0x1e, 0xf2, 0x06, 0x3a, 0xe5, 0x19, 0xf2, 0x0e, 0x7b, 0xcc, 0x29,
5088
-	0x95, 0x93, 0x2a, 0xcb, 0x57, 0xc8, 0x03, 0x24, 0x05, 0x0c, 0x66, 0x38, 0xb4, 0x47, 0x5e, 0x57,
5089
-	0x59, 0x37, 0x74, 0xf3, 0xfb, 0x7a, 0x80, 0xc6, 0x87, 0xee, 0x26, 0x58, 0x22, 0xa4, 0x8e, 0xe8,
5090
-	0x86, 0x9c, 0x49, 0x86, 0x90, 0xcb, 0x9c, 0x6b, 0xca, 0xbb, 0xe2, 0x2b, 0xc2, 0x67, 0xd7, 0x9e,
5091
-	0xec, 0xce, 0x7f, 0xd1, 0xb4, 0xe4, 0x22, 0xa4, 0x06, 0xd0, 0x7c, 0x67, 0xc2, 0x26, 0x4c, 0x2f,
5092
-	0xf7, 0xd5, 0xca, 0x78, 0x5b, 0x13, 0xc6, 0x26, 0x3e, 0xdd, 0xd7, 0xd6, 0x65, 0x74, 0xb5, 0xef,
5093
-	0x46, 0x9c, 0x48, 0x8f, 0x05, 0xf1, 0xef, 0x9d, 0x9b, 0x12, 0x54, 0xcf, 0x98, 0x4b, 0xcf, 0x43,
5094
-	0xea, 0xa0, 0x23, 0xb0, 0x48, 0x10, 0x30, 0xa9, 0x01, 0xc2, 0x2e, 0xb6, 0x8b, 0x7b, 0xd6, 0xc1,
5095
-	0x6e, 0xf7, 0xdb, 0x5f, 0xee, 0xf6, 0x56, 0xb0, 0x7e, 0xe9, 0xf5, 0xed, 0x6e, 0x01, 0x67, 0x99,
5096
-	0xe8, 0x77, 0x50, 0x77, 0xa9, 0xf0, 0x38, 0x75, 0xc7, 0x9c, 0xf9, 0xd4, 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 0x42, 0xa3, 0x06, 0xb8, 0x77, 0x7c, 0xd6,
5108
-	0xd8, 0xc8, 0x47, 0x0d, 0x38, 0xf1, 0x02, 0xb3, 0x95, 0x37, 0x9b, 0x60, 0x9d, 0x53, 0x3e, 0xf7,
5109
-	0x9c, 0x7b, 0x96, 0xc8, 0xa7, 0x50, 0x92, 0x44, 0x5c, 0x6b, 0x69, 0x58, 0xf9, 0xd2, 0xb8, 0x20,
5110
-	0xe2, 0x5a, 0x7d, 0xd4, 0xd0, 0x35, 0x5e, 0x29, 0x83, 0xd3, 0xd0, 0xf7, 0x1c, 0x22, 0xa9, 0xab,
5111
-	0x95, 0x61, 0x1d, 0xfc, 0x24, 0x8f, 0x8d, 0x53, 0x94, 0xd9, 0xff, 0xf3, 0x02, 0xce, 0x50, 0xd1,
5112
-	0x33, 0x28, 0x4f, 0x7c, 0x76, 0x49, 0x7c, 0xad, 0x09, 0xeb, 0xe0, 0x71, 0x5e, 0x90, 0x23, 0x8d,
5113
-	0x58, 0x05, 0x30, 0x14, 0xf4, 0x14, 0xca, 0x51, 0xe8, 0x12, 0x49, 0xed, 0xb2, 0x26, 0xb7, 0xf3,
5114
-	0xc8, 0x5f, 0x6a, 0xc4, 0x21, 0x0b, 0xae, 0xbc, 0x09, 0x36, 0x78, 0x74, 0x02, 0xd5, 0x80, 0xca,
5115
-	0xaf, 0x18, 0xbf, 0x16, 0x76, 0xa5, 0xbd, 0xb9, 0x67, 0x1d, 0x7c, 0x92, 0x2b, 0xc6, 0x18, 0xd3,
5116
-	0x93, 0x92, 0x38, 0xd3, 0x19, 0x0d, 0x64, 0x1c, 0xa6, 0xbf, 0x61, 0x17, 0x71, 0x1a, 0x00, 0xfd,
5117
-	0x16, 0xaa, 0x34, 0x70, 0x43, 0xe6, 0x05, 0xd2, 0xae, 0xde, 0xbd, 0x91, 0xa1, 0xc1, 0xa8, 0x64,
5118
-	0xe2, 0x94, 0xd1, 0x2f, 0x43, 0x69, 0xc6, 0x5c, 0xda, 0xd9, 0x87, 0x9d, 0x6f, 0x25, 0x0b, 0x35,
5119
-	0xa1, 0x6a, 0x92, 0x15, 0xdf, 0x72, 0x09, 0xa7, 0x76, 0xe7, 0x21, 0x6c, 0xaf, 0x25, 0xa6, 0xf3,
5120
-	0xb7, 0x12, 0x54, 0x93, 0xdb, 0x42, 0x3d, 0xa8, 0x39, 0x2c, 0x90, 0xc4, 0x0b, 0x28, 0x37, 0x02,
5121
-	0xc9, 0xcd, 0xed, 0x61, 0x02, 0x52, 0xac, 0xe7, 0x05, 0xbc, 0x62, 0xa1, 0x3f, 0x40, 0x8d, 0x53,
5122
-	0xc1, 0x22, 0xee, 0x50, 0x61, 0x14, 0xb2, 0x97, 0x7f, 0xc7, 0x31, 0x08, 0xd3, 0xbf, 0x44, 0x1e,
5123
-	0xa7, 0x2a, 0x4f, 0x02, 0xaf, 0xa8, 0xe8, 0x19, 0x54, 0x38, 0x15, 0x92, 0x70, 0xf9, 0x5d, 0x97,
5124
-	0x8c, 0x63, 0xc8, 0x88, 0xf9, 0x9e, 0xb3, 0xc0, 0x09, 0x03, 0x3d, 0x83, 0x5a, 0xe8, 0x13, 0x47,
5125
-	0x47, 0xb5, 0xb7, 0x34, 0xfd, 0x83, 0x3c, 0xfa, 0x28, 0x01, 0xe1, 0x15, 0x1e, 0x7d, 0x06, 0xe0,
5126
-	0xb3, 0xc9, 0xd8, 0xe5, 0xde, 0x9c, 0x72, 0x23, 0x92, 0x66, 0x1e, 0x7b, 0xa0, 0x11, 0xb8, 0xe6,
5127
-	0xb3, 0x49, 0xbc, 0x44, 0x47, 0x3f, 0x48, 0x21, 0x19, 0x75, 0x9c, 0x00, 0x90, 0xf4, 0x57, 0xa3,
5128
-	0x8f, 0x8f, 0xbf, 0x57, 0x28, 0x73, 0x23, 0x19, 0x3a, 0x7a, 0x0c, 0xf5, 0x2b, 0xc6, 0x1d, 0x3a,
5129
-	0x36, 0xba, 0xaf, 0x69, 0x4d, 0x58, 0xda, 0x17, 0x0b,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x2a, 0xec, 0x1d, 0x9d, 0xab, 0xd8, 0x40, 0x1f, 0x00, 0xb0, 0x90,
5152
-	0x06, 0x63, 0x21, 0x5d, 0x2f, 0xb0, 0x91, 0x3a, 0x32, 0xae, 0x29, 0xcf, 0xb9, 0x72, 0x34, 0x3f,
5153
-	0x03, 0x2b, 0x23, 0x58, 0x25, 0xb4, 0x6b, 0xba, 0x30, 0x6f, 0x40, 0x2d, 0x55, 0xd4, 0x39, 0xf1,
5154
-	0xa3, 0x78, 0xe0, 0xaa, 0xe1, 0xd8, 0xf8, 0xcd, 0xc6, 0xd3, 0x62, 0xf3, 0x00, 0xac, 0xcc, 0xc5,
5155
-	0xa1, 0x0f, 0x61, 0x9b, 0xd3, 0x89, 0x27, 0x24, 0x5f, 0x8c, 0x49, 0x24, 0xa7, 0xf6, 0xef, 0x35,
5156
-	0xa1, 0x9e, 0x38, 0x7b, 0x91, 0x9c, 0x36, 0xc7, 0xb0, 0x3a, 0x3f, 0x6a, 0x83, 0xa5, 0xf2, 0x2a,
5157
-	0x28, 0x9f, 0x53, 0xae, 0x5a, 0x82, 0xda, 0x76, 0xd6, 0xa5, 0xee, 0x5f, 0x50, 0xc2, 0x9d, 0xa9,
5158
-	0x7e, 0x7e, 0x35, 0x6c, 0x2c, 0xf5, 0x9e, 0x12, 0x91, 0x99, 0xf7, 0x64, 0xcc, 0xce, 0x7f, 0x8b,
5159
-	0x50, 0xcf, 0xf6, 0x26, 0x74, 0x18, 0x77, 0x24, 0x7d, 0xa4, 0x07, 0x07, 0xfb, 0x6f, 0xeb, 0x65,
5160
-	0xba, 0xfe, 0xfb, 0x91, 0x0a, 0x76, 0xaa, 0xc6, 0x48, 0x4d, 0x46, 0xbf, 0x82, 0xad, 0x90, 0x71,
5161
-	0x99, 0x54, 0x81, 0x56, 0x6e, 0xcd, 0x66, 0x3c, 0xa9, 0x97, 0x31, 0xb8, 0x33, 0x85, 0x07, 0xeb,
5162
-	0xd1, 0xd0, 0x13, 0xd8, 0x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, 0x56, 0x31, 0xed, 0x22, 0x6e, 0x90, 0x6f, 0xfc, 0x82, 0xce, 0x61, 0x9b, 0x71,
5174
-	0x67, 0x4a, 0x85, 0x8c, 0xeb, 0xb0, 0x19, 0x58, 0x73, 0xff, 0xca, 0x7c, 0x91, 0x05, 0x9a, 0x22,
5175
-	0x14, 0xef, 0x76, 0x3d, 0x06, 0x7a, 0x0a, 0x25, 0x4e, 0xae, 0x92, 0x91, 0x26, 0x57, 0xdf, 0x98,
5176
-	0x5c, 0xc9, 0xb5, 0x10, 0x9a, 0x81, 0xfe, 0x08, 0xe0, 0x7a, 0x22, 0x24, 0xd2, 0x99, 0x52, 0x6e,
5177
-	0xee, 0x29, 0xf7, 0x88, 0x83, 0x14, 0xb5, 0x16, 0x25, 0xc3, 0x46, 0x27, 0x50, 0x73, 0x48, 0xa2,
5178
-	0xb4, 0xf2, 0xdd, 0x53, 0xfc, 0x61, 0xcf, 0x84, 0x68, 0xa8, 0x10, 0xcb, 0xdb, 0xdd, 0x6a, 0xe2,
5179
-	0xc1, 0x55, 0x87, 0x18, 0xe5, 0x9d, 0xc0, 0xb6, 0x9a, 0xee, 0xc7, 0x2e, 0xbd, 0x22, 0x91, 0x2f,
5180
-	0x85, 0x6e, 0x95, 0x77, 0x14, 0x55, 0x35, 0x68, 0x0e, 0x0c, 0xce, 0xec, 0xab, 0x2e, 0x33, 0x3e,
5181
-	0xf4, 0x67, 0xd8, 0xa1, 0x81, 0xc3, 0x17, 0x5a, 0x67, 0xc9, 0x0e, 0xab, 0x77, 0x1f, 0x76, 0x98,
5182
-	0x82, 0xd7, 0x0e, 0xdb, 0xa0, 0xdf, 0xf0, 0x77, 0x3c, 0x80, 0xb8, 0x4d, 0xdd, 0xaf, 0xfe, 0x10,
5183
-	0x94, 0x5c, 0x22, 0x89, 0x96, 0x5c, 0x1d, 0xeb, 0x75, 0xdf, 0x7e, 0xfd, 0xa6, 0x55, 0xf8, 0xf7,
5184
-	0x9b, 0x56, 0xe1, 0xaf, 0xcb, 0x56, 0xf1, 0xf5, 0xb2, 0x55, 0xfc, 0xe7, 0xb2, 0x55, 0xfc, 0xcf,
5185
-	0xb2, 0x55, 0xbc, 0x2c, 0xeb, 0xe6, 0xfe, 0xcb, 0xff, 0x07, 0x00, 0x00, 0xff, 0xff, 0x91, 0x92,
5186
-	0xb2, 0x3a, 0x1e, 0x10, 0x00, 0x00,
5082
+	// 1672 bytes of a gzipped FileDescriptorProto
5083
+	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xac, 0x57, 0x41, 0x73, 0x1b, 0xb7,
5084
+	0x15, 0x26, 0x25, 0x8a, 0x5c, 0xbe, 0xa5, 0x6c, 0x0a, 0x4d, 0xd2, 0x35, 0xdd, 0x50, 0x34, 0xe3,
5085
+	0xa6, 0x4a, 0x33, 0xa5, 0xa6, 0x6a, 0x27, 0x75, 0xea, 0x66, 0x5a, 0x52, 0x64, 0x65, 0x55, 0x95,
5086
+	0xcc, 0x81, 0x14, 0x77, 0x7c, 0xe2, 0x40, 0xbb, 0x10, 0xb9, 0xa3, 0xe5, 0x62, 0x0b, 0x60, 0x99,
5087
+	0xe1, 0xad, 0xc7, 0x8c, 0x0f, 0xfd, 0x07, 0x3a, 0xf5, 0x37, 0xf4, 0x3f, 0xf8, 0xd8, 0x63, 0x4f,
5088
+	0x9a, 0x9a, 0x7f, 0x21, 0x3f, 0xa0, 0x1d, 0x60, 0xb1, 0xe4, 0x32, 0x59, 0xc5, 0x99, 0xa9, 0x6f,
5089
+	0x78, 0x8f, 0xdf, 0xf7, 0x16, 0x78, 0xf8, 0xf0, 0xde, 0x23, 0xd8, 0x22, 0xa2, 0xae, 0xe8, 0x44,
5090
+	0x9c, 0x49, 0x86, 0x90, 0xc7, 0xdc, 0x6b, 0xca, 0x3b, 0xe2, 0x2b, 0xc2, 0xa7, 0xd7, 0xbe, 0xec,
5091
+	0xcc, 0x7e, 0xd9, 0xb0, 0xe5, 0x3c,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x12, 0x1b, 0x6f, 0xed, 0x49, 0xb5, 0x84, 0x60, 0xee, 0xf8, 0x11, 0xd4,
5168
+	0xfc, 0x68, 0xf6, 0xd9, 0x88, 0x86, 0xe4, 0x32, 0x30, 0xa3, 0x97, 0x85, 0x6d, 0xe5, 0x1b, 0x24,
5169
+	0x2e, 0xf5, 0x1e, 0xfd, 0x50, 0x52, 0x1e, 0x9a, 0xa1, 0xca, 0xc2, 0x4b, 0x1b, 0x7d, 0x01, 0x25,
5170
+	0x3f, 0x22, 0x53, 0xd3, 0x48, 0x73, 0x4f, 0x70, 0x3c, 0xec, 0x9e, 0x1a, 0x0d, 0xf6, 0xac, 0xc5,
5171
+	0xed, 0x6e, 0x49, 0x39, 0xb0, 0xa6, 0xa1, 0x66, 0xda, 0xcb, 0xd4, 0x97, 0x74, 0x6d, 0xb5, 0x70,
5172
+	0xc6, 0xd3, 0xfe, 0x6f, 0x09, 0xec, 0xc3, 0x20, 0x16, 0xd2, 0x74, 0x88, 0x77, 0x96, 0xb7, 0x97,
5173
+	0xb0, 0x43, 0xf4, 0x74, 0x4e, 0x42, 0x55, 0x6e, 0xf5, 0x8c, 0x60, 0x72, 0xf7, 0x38, 0x37, 0xdc,
5174
+	0x12, 0x9c, 0xcc, 0x13, 0xbd, 0xb2, 0x8a, 0xe9, 0x14, 0x71, 0x9d, 0x7c, 0xeb, 0x17, 0x74, 0x0e,
5175
+	0xdb, 0x8c, 0xbb, 0x13, 0x2a, 0x64, 0x52, 0xa4, 0xcd, 0x34, 0x9b, 0xfb, 0x3f, 0xe7, 0x79, 0x16,
5176
+	0x68, 0x2a, 0x54, 0xb2, 0xdb, 0xf5, 0x18, 0xe8, 0x09, 0x94, 0x38, 0xb9, 0x4a, 0xe7, 0x9d, 0x5c,
5177
+	0x7d, 0x63, 0x72, 0x25, 0xd7, 0x42, 0x68, 0x06, 0xfa, 0x13, 0x80, 0xe7, 0x8b, 0x88, 0x48, 0x77,
5178
+	0x42, 0xb9, 0xb9, 0xa7, 0xdc, 0x23, 0xf6, 0x97, 0xa8, 0xb5, 0x28, 0x19, 0x36, 0x3a, 0x81, 0xaa,
5179
+	0x4b, 0x52, 0xa5, 0x95, 0xef, 0x1e, 0xf1, 0x0f, 0xbb, 0x26, 0x44, 0x5d, 0x85, 0x58, 0xdc, 0xee,
5180
+	0x5a, 0xa9, 0x07, 0x5b, 0x2e, 0x31, 0xca, 0x3b, 0x81, 0x6d, 0x35, 0xfa, 0x8f, 0x3c, 0x7a, 0x45,
5181
+	0xe2, 0x40, 0x0a, 0xdd, 0x47, 0xef, 0xa8, 0xb8, 0x6a, 0x0a, 0xed, 0x1b, 0x9c, 0xd9, 0x57, 0x4d,
5182
+	0x66, 0x7c, 0xe8, 0x2f, 0xb0, 0x43, 0x43, 0x97, 0xcf, 0xb5, 0xce, 0xd2, 0x1d, 0x5a, 0x77, 0x1f,
5183
+	0x76, 0xb0, 0x04, 0xaf, 0x1d, 0xb6, 0x4e, 0xbf, 0xe5, 0x6f, 0xfb, 0x00, 0x49, 0x0f, 0x7b, 0xb7,
5184
+	0xfa, 0x43, 0x50, 0xf2, 0x88, 0x24, 0x5a, 0x72, 0x35, 0xac, 0xd7, 0x3d, 0xe7, 0xf5, 0x9b, 0x66,
5185
+	0xe1, 0xdf, 0x6f, 0x9a, 0x85, 0xbf, 0x2d, 0x9a, 0xc5, 0xd7, 0x8b, 0x66, 0xf1, 0x5f, 0x8b, 0x66,
5186
+	0xf1, 0x3f, 0x8b, 0x66, 0xf1, 0xb2, 0xac, 0x3b, 0xff, 0xaf, 0xfe, 0x17, 0x00, 0x00, 0xff, 0xff,
5187
+	0xa2, 0xd8, 0xcf, 0x61, 0x3b, 0x10, 0x00, 0x00,
5187 5188
 }
... ...
@@ -194,6 +194,12 @@ message ContainerSpec {
194 194
 	// OpenStdin declares that the standard input (stdin) should be open.
195 195
 	bool open_stdin = 18;
196 196
 
197
+	// ReadOnly declares that the container root filesystem is read-only.
198
+	// This only impacts the root filesystem, not additional mounts (including
199
+	// tmpfs). For additional mounts that are not part of the initial rootfs,
200
+	// they will be decided by the modes passed in the mount definition.
201
+	bool read_only = 19;
202
+
197 203
 	repeated Mount mounts = 8 [(gogoproto.nullable) = false];
198 204
 
199 205
 	// StopGracePeriod the grace period for stopping the container before
... ...
@@ -40,7 +40,7 @@ type Server struct {
40 40
 	// renewal. They are indexed by node ID.
41 41
 	pending map[string]*api.Node
42 42
 
43
-	// Started is a channel which gets closed once the server is running
43
+	// started is a channel which gets closed once the server is running
44 44
 	// and able to service RPCs.
45 45
 	started chan struct{}
46 46
 }
... ...
@@ -102,10 +102,10 @@ func (s *Server) NodeCertificateStatus(ctx context.Context, request *api.NodeCer
102 102
 		return nil, grpc.Errorf(codes.InvalidArgument, codes.InvalidArgument.String())
103 103
 	}
104 104
 
105
-	if err := s.addTask(); err != nil {
105
+	serverCtx, err := s.isRunningLocked()
106
+	if err != nil {
106 107
 		return nil, err
107 108
 	}
108
-	defer s.doneTask()
109 109
 
110 110
 	var node *api.Node
111 111
 
... ...
@@ -171,7 +171,7 @@ func (s *Server) NodeCertificateStatus(ctx context.Context, request *api.NodeCer
171 171
 			}
172 172
 		case <-ctx.Done():
173 173
 			return nil, ctx.Err()
174
-		case <-s.ctx.Done():
174
+		case <-serverCtx.Done():
175 175
 			return nil, s.ctx.Err()
176 176
 		}
177 177
 	}
... ...
@@ -189,10 +189,9 @@ func (s *Server) IssueNodeCertificate(ctx context.Context, request *api.IssueNod
189 189
 		return nil, grpc.Errorf(codes.InvalidArgument, codes.InvalidArgument.String())
190 190
 	}
191 191
 
192
-	if err := s.addTask(); err != nil {
192
+	if _, err := s.isRunningLocked(); err != nil {
193 193
 		return nil, err
194 194
 	}
195
-	defer s.doneTask()
196 195
 
197 196
 	var (
198 197
 		blacklistedCerts map[string]*api.BlacklistedCertificate
... ...
@@ -407,8 +406,9 @@ func (s *Server) Run(ctx context.Context) error {
407 407
 	// returns true without joinTokens being set correctly.
408 408
 	s.mu.Lock()
409 409
 	s.ctx, s.cancel = context.WithCancel(ctx)
410
-	s.mu.Unlock()
410
+	ctx = s.ctx
411 411
 	close(s.started)
412
+	s.mu.Unlock()
412 413
 
413 414
 	if err != nil {
414 415
 		log.G(ctx).WithFields(logrus.Fields{
... ...
@@ -459,8 +459,6 @@ func (s *Server) Run(ctx context.Context) error {
459 459
 				}
460 460
 			}
461 461
 		case <-ctx.Done():
462
-			return ctx.Err()
463
-		case <-s.ctx.Done():
464 462
 			return nil
465 463
 		}
466 464
 	}
... ...
@@ -469,36 +467,37 @@ func (s *Server) Run(ctx context.Context) error {
469 469
 // Stop stops the CA and closes all grpc streams.
470 470
 func (s *Server) Stop() error {
471 471
 	s.mu.Lock()
472
+
472 473
 	if !s.isRunning() {
473 474
 		s.mu.Unlock()
474 475
 		return errors.New("CA signer is already stopped")
475 476
 	}
476 477
 	s.cancel()
478
+	s.started = make(chan struct{})
477 479
 	s.mu.Unlock()
478
-	// wait for all handlers to finish their CA deals,
480
+
481
+	// Wait for Run to complete
479 482
 	s.wg.Wait()
480
-	s.started = make(chan struct{})
483
+
481 484
 	return nil
482 485
 }
483 486
 
484 487
 // Ready waits on the ready channel and returns when the server is ready to serve.
485 488
 func (s *Server) Ready() <-chan struct{} {
489
+	s.mu.Lock()
490
+	defer s.mu.Unlock()
486 491
 	return s.started
487 492
 }
488 493
 
489
-func (s *Server) addTask() error {
494
+func (s *Server) isRunningLocked() (context.Context, error) {
490 495
 	s.mu.Lock()
491 496
 	if !s.isRunning() {
492 497
 		s.mu.Unlock()
493
-		return grpc.Errorf(codes.Aborted, "CA signer is stopped")
498
+		return nil, grpc.Errorf(codes.Aborted, "CA signer is stopped")
494 499
 	}
495
-	s.wg.Add(1)
500
+	ctx := s.ctx
496 501
 	s.mu.Unlock()
497
-	return nil
498
-}
499
-
500
-func (s *Server) doneTask() {
501
-	s.wg.Done()
502
+	return ctx, nil
502 503
 }
503 504
 
504 505
 func (s *Server) isRunning() bool {
... ...
@@ -371,12 +371,15 @@ func (a *Allocator) doNetworkAlloc(ctx context.Context, ev events.Event) {
371 371
 		s := v.Service.Copy()
372 372
 
373 373
 		if nc.nwkAllocator.IsServiceAllocated(s) {
374
-			break
375
-		}
376
-
377
-		if err := a.allocateService(ctx, s); err != nil {
378
-			log.G(ctx).WithError(err).Errorf("Failed allocation during update of service %s", s.ID)
379
-			break
374
+			if nc.nwkAllocator.PortsAllocatedInHostPublishMode(s) {
375
+				break
376
+			}
377
+			updatePortsInHostPublishMode(s)
378
+		} else {
379
+			if err := a.allocateService(ctx, s); err != nil {
380
+				log.G(ctx).WithError(err).Errorf("Failed allocation during update of service %s", s.ID)
381
+				break
382
+			}
380 383
 		}
381 384
 
382 385
 		if _, err := a.store.Batch(func(batch *store.Batch) error {
... ...
@@ -641,6 +644,36 @@ func (a *Allocator) commitAllocatedNode(ctx context.Context, batch *store.Batch,
641 641
 	return nil
642 642
 }
643 643
 
644
+// This function prepares the service object for being updated when the change regards
645
+// the published ports in host mode: It resets the runtime state ports (s.Endpoint.Ports)
646
+// to the current ingress mode runtime state ports plus the newly configured publish mode ports,
647
+// so that the service allocation invoked on this new service object will trigger the deallocation
648
+// of any old publish mode port and allocation of any new one.
649
+func updatePortsInHostPublishMode(s *api.Service) {
650
+	if s.Endpoint != nil {
651
+		var portConfigs []*api.PortConfig
652
+		for _, portConfig := range s.Endpoint.Ports {
653
+			if portConfig.PublishMode == api.PublishModeIngress {
654
+				portConfigs = append(portConfigs, portConfig)
655
+			}
656
+		}
657
+		s.Endpoint.Ports = portConfigs
658
+	}
659
+
660
+	if s.Spec.Endpoint != nil {
661
+		if s.Endpoint == nil {
662
+			s.Endpoint = &api.Endpoint{}
663
+		}
664
+		for _, portConfig := range s.Spec.Endpoint.Ports {
665
+			if portConfig.PublishMode == api.PublishModeIngress {
666
+				continue
667
+			}
668
+			s.Endpoint.Ports = append(s.Endpoint.Ports, portConfig.Copy())
669
+		}
670
+		s.Endpoint.Spec = s.Spec.Endpoint.Copy()
671
+	}
672
+}
673
+
644 674
 func (a *Allocator) allocateService(ctx context.Context, s *api.Service) error {
645 675
 	nc := a.netCtx
646 676
 
... ...
@@ -283,6 +283,12 @@ func (na *NetworkAllocator) IsTaskAllocated(t *api.Task) bool {
283 283
 	return true
284 284
 }
285 285
 
286
+// PortsAllocatedInHostPublishMode returns if the passed service has its published ports in
287
+// host (non ingress) mode allocated
288
+func (na *NetworkAllocator) PortsAllocatedInHostPublishMode(s *api.Service) bool {
289
+	return na.portAllocator.portsAllocatedInHostPublishMode(s)
290
+}
291
+
286 292
 // IsServiceAllocated returns if the passed service has its network resources allocated or not.
287 293
 func (na *NetworkAllocator) IsServiceAllocated(s *api.Service) bool {
288 294
 	// If endpoint mode is VIP and allocator does not have the
... ...
@@ -269,6 +269,33 @@ func (pa *portAllocator) serviceDeallocatePorts(s *api.Service) {
269 269
 	s.Endpoint.Ports = nil
270 270
 }
271 271
 
272
+func (pa *portAllocator) portsAllocatedInHostPublishMode(s *api.Service) bool {
273
+	if s.Endpoint == nil && s.Spec.Endpoint == nil {
274
+		return true
275
+	}
276
+
277
+	portStates := allocatedPorts{}
278
+	if s.Endpoint != nil {
279
+		for _, portState := range s.Endpoint.Ports {
280
+			if portState.PublishMode == api.PublishModeHost {
281
+				portStates.addState(portState)
282
+			}
283
+		}
284
+	}
285
+
286
+	if s.Spec.Endpoint != nil {
287
+		for _, portConfig := range s.Spec.Endpoint.Ports {
288
+			if portConfig.PublishMode == api.PublishModeHost {
289
+				if portStates.delState(portConfig) == nil {
290
+					return false
291
+				}
292
+			}
293
+		}
294
+	}
295
+
296
+	return true
297
+}
298
+
272 299
 func (pa *portAllocator) isPortsAllocated(s *api.Service) bool {
273 300
 	// If service has no user-defined endpoint and allocated endpoint,
274 301
 	// we assume it is allocated and return true.
... ...
@@ -4,7 +4,10 @@ import (
4 4
 	"regexp"
5 5
 	"strings"
6 6
 
7
+	"github.com/docker/docker/pkg/plugingetter"
8
+	"github.com/docker/libnetwork/ipamapi"
7 9
 	"github.com/docker/swarmkit/api"
10
+	"github.com/docker/swarmkit/manager/allocator/networkallocator"
8 11
 	"github.com/docker/swarmkit/manager/state/store"
9 12
 	"google.golang.org/grpc"
10 13
 	"google.golang.org/grpc/codes"
... ...
@@ -76,7 +79,7 @@ func validateAnnotations(m api.Annotations) error {
76 76
 	return nil
77 77
 }
78 78
 
79
-func validateDriver(driver *api.Driver) error {
79
+func validateDriver(driver *api.Driver, pg plugingetter.PluginGetter, pluginType string) error {
80 80
 	if driver == nil {
81 81
 		// It is ok to not specify the driver. We will choose
82 82
 		// a default driver.
... ...
@@ -87,5 +90,18 @@ func validateDriver(driver *api.Driver) error {
87 87
 		return grpc.Errorf(codes.InvalidArgument, "driver name: if driver is specified name is required")
88 88
 	}
89 89
 
90
+	if strings.ToLower(driver.Name) == networkallocator.DefaultDriver || strings.ToLower(driver.Name) == ipamapi.DefaultIPAM {
91
+		return nil
92
+	}
93
+
94
+	p, err := pg.Get(driver.Name, pluginType, plugingetter.Lookup)
95
+	if err != nil {
96
+		return grpc.Errorf(codes.InvalidArgument, "error during lookup of plugin %s", driver.Name)
97
+	}
98
+
99
+	if p.IsV1() {
100
+		return grpc.Errorf(codes.InvalidArgument, "legacy plugin %s of type %s is not supported in swarm mode", driver.Name, pluginType)
101
+	}
102
+
90 103
 	return nil
91 104
 }
... ...
@@ -4,6 +4,9 @@ import (
4 4
 	"fmt"
5 5
 	"net"
6 6
 
7
+	"github.com/docker/docker/pkg/plugingetter"
8
+	"github.com/docker/libnetwork/driverapi"
9
+	"github.com/docker/libnetwork/ipamapi"
7 10
 	"github.com/docker/swarmkit/api"
8 11
 	"github.com/docker/swarmkit/identity"
9 12
 	"github.com/docker/swarmkit/manager/state/store"
... ...
@@ -47,14 +50,14 @@ func validateIPAMConfiguration(ipamConf *api.IPAMConfig) error {
47 47
 	return nil
48 48
 }
49 49
 
50
-func validateIPAM(ipam *api.IPAMOptions) error {
50
+func validateIPAM(ipam *api.IPAMOptions, pg plugingetter.PluginGetter) error {
51 51
 	if ipam == nil {
52 52
 		// It is ok to not specify any IPAM configurations. We
53 53
 		// will choose good defaults.
54 54
 		return nil
55 55
 	}
56 56
 
57
-	if err := validateDriver(ipam.Driver); err != nil {
57
+	if err := validateDriver(ipam.Driver, pg, ipamapi.PluginEndpointType); err != nil {
58 58
 		return err
59 59
 	}
60 60
 
... ...
@@ -67,7 +70,7 @@ func validateIPAM(ipam *api.IPAMOptions) error {
67 67
 	return nil
68 68
 }
69 69
 
70
-func validateNetworkSpec(spec *api.NetworkSpec) error {
70
+func validateNetworkSpec(spec *api.NetworkSpec, pg plugingetter.PluginGetter) error {
71 71
 	if spec == nil {
72 72
 		return grpc.Errorf(codes.InvalidArgument, errInvalidArgument.Error())
73 73
 	}
... ...
@@ -76,11 +79,11 @@ func validateNetworkSpec(spec *api.NetworkSpec) error {
76 76
 		return err
77 77
 	}
78 78
 
79
-	if err := validateDriver(spec.DriverConfig); err != nil {
79
+	if err := validateDriver(spec.DriverConfig, pg, driverapi.NetworkPluginEndpointType); err != nil {
80 80
 		return err
81 81
 	}
82 82
 
83
-	if err := validateIPAM(spec.IPAM); err != nil {
83
+	if err := validateIPAM(spec.IPAM, pg); err != nil {
84 84
 		return err
85 85
 	}
86 86
 
... ...
@@ -93,7 +96,7 @@ func validateNetworkSpec(spec *api.NetworkSpec) error {
93 93
 func (s *Server) CreateNetwork(ctx context.Context, request *api.CreateNetworkRequest) (*api.CreateNetworkResponse, error) {
94 94
 	// if you change this function, you have to change createInternalNetwork in
95 95
 	// the tests to match it (except the part where we check the label).
96
-	if err := validateNetworkSpec(request.Spec); err != nil {
96
+	if err := validateNetworkSpec(request.Spec, s.pg); err != nil {
97 97
 		return nil, err
98 98
 	}
99 99
 
... ...
@@ -3,6 +3,7 @@ package controlapi
3 3
 import (
4 4
 	"errors"
5 5
 
6
+	"github.com/docker/docker/pkg/plugingetter"
6 7
 	"github.com/docker/swarmkit/ca"
7 8
 	"github.com/docker/swarmkit/manager/state/raft"
8 9
 	"github.com/docker/swarmkit/manager/state/store"
... ...
@@ -18,13 +19,15 @@ type Server struct {
18 18
 	store  *store.MemoryStore
19 19
 	raft   *raft.Node
20 20
 	rootCA *ca.RootCA
21
+	pg     plugingetter.PluginGetter
21 22
 }
22 23
 
23 24
 // NewServer creates a Cluster API server.
24
-func NewServer(store *store.MemoryStore, raft *raft.Node, rootCA *ca.RootCA) *Server {
25
+func NewServer(store *store.MemoryStore, raft *raft.Node, rootCA *ca.RootCA, pg plugingetter.PluginGetter) *Server {
25 26
 	return &Server{
26 27
 		store:  store,
27 28
 		raft:   raft,
28 29
 		rootCA: rootCA,
30
+		pg:     pg,
29 31
 	}
30 32
 }
31 33
new file mode 100644
... ...
@@ -0,0 +1,57 @@
0
+package manager
1
+
2
+import (
3
+	"reflect"
4
+
5
+	"github.com/docker/swarmkit/api"
6
+	"github.com/docker/swarmkit/manager/state/store"
7
+)
8
+
9
+// IsStateDirty returns true if any objects have been added to raft which make
10
+// the state "dirty". Currently, the existence of any object other than the
11
+// default cluster or the local node implies a dirty state.
12
+func (m *Manager) IsStateDirty() (bool, error) {
13
+	var (
14
+		storeSnapshot *api.StoreSnapshot
15
+		err           error
16
+	)
17
+	m.raftNode.MemoryStore().View(func(readTx store.ReadTx) {
18
+		storeSnapshot, err = m.raftNode.MemoryStore().Save(readTx)
19
+	})
20
+
21
+	if err != nil {
22
+		return false, err
23
+	}
24
+
25
+	// Check Nodes and Clusters fields.
26
+	nodeID := m.config.SecurityConfig.ClientTLSCreds.NodeID()
27
+	if len(storeSnapshot.Nodes) > 1 || (len(storeSnapshot.Nodes) == 1 && storeSnapshot.Nodes[0].ID != nodeID) {
28
+		return true, nil
29
+	}
30
+
31
+	clusterID := m.config.SecurityConfig.ClientTLSCreds.Organization()
32
+	if len(storeSnapshot.Clusters) > 1 || (len(storeSnapshot.Clusters) == 1 && storeSnapshot.Clusters[0].ID != clusterID) {
33
+		return true, nil
34
+	}
35
+
36
+	// Use reflection to check that other fields don't have values. This
37
+	// lets us implement a whitelist-type approach, where we don't need to
38
+	// remember to add individual types here.
39
+
40
+	val := reflect.ValueOf(*storeSnapshot)
41
+	numFields := val.NumField()
42
+
43
+	for i := 0; i != numFields; i++ {
44
+		field := val.Field(i)
45
+		structField := val.Type().Field(i)
46
+		if structField.Type.Kind() != reflect.Slice {
47
+			panic("unexpected field type in StoreSnapshot")
48
+		}
49
+		if structField.Name != "Nodes" && structField.Name != "Clusters" && field.Len() != 0 {
50
+			// One of the other data types has an entry
51
+			return true, nil
52
+		}
53
+	}
54
+
55
+	return false, nil
56
+}
... ...
@@ -134,7 +134,6 @@ type Dispatcher struct {
134 134
 }
135 135
 
136 136
 // New returns Dispatcher with cluster interface(usually raft.Node).
137
-// NOTE: each handler which does something with raft must add to Dispatcher.wg
138 137
 func New(cluster Cluster, c *Config) *Dispatcher {
139 138
 	d := &Dispatcher{
140 139
 		nodes:                 newNodeStore(c.HeartbeatPeriod, c.HeartbeatEpsilon, c.GracePeriodMultiplier, c.RateLimitPeriod),
... ...
@@ -384,7 +384,7 @@ func (m *Manager) Run(parent context.Context) error {
384 384
 		return err
385 385
 	}
386 386
 
387
-	baseControlAPI := controlapi.NewServer(m.raftNode.MemoryStore(), m.raftNode, m.config.SecurityConfig.RootCA())
387
+	baseControlAPI := controlapi.NewServer(m.raftNode.MemoryStore(), m.raftNode, m.config.SecurityConfig.RootCA(), m.config.PluginGetter)
388 388
 	baseResourceAPI := resourceapi.New(m.raftNode.MemoryStore())
389 389
 	healthServer := health.NewHealthServer()
390 390
 	localHealthServer := health.NewHealthServer()
... ...
@@ -49,16 +49,6 @@ func ByName(name string) By {
49 49
 	return byName(name)
50 50
 }
51 51
 
52
-type byCN string
53
-
54
-func (b byCN) isBy() {
55
-}
56
-
57
-// ByCN creates an object to pass to Find to select by CN.
58
-func ByCN(name string) By {
59
-	return byCN(name)
60
-}
61
-
62 52
 type byService string
63 53
 
64 54
 func (b byService) isBy() {
... ...
@@ -25,7 +25,6 @@ const (
25 25
 	indexServiceID    = "serviceid"
26 26
 	indexNodeID       = "nodeid"
27 27
 	indexSlot         = "slot"
28
-	indexCN           = "cn"
29 28
 	indexDesiredState = "desiredstate"
30 29
 	indexTaskState    = "taskstate"
31 30
 	indexRole         = "role"
... ...
@@ -573,12 +572,6 @@ func (tx readTx) findIterators(table string, by By, checkType func(By) error) ([
573 573
 			return nil, err
574 574
 		}
575 575
 		return []memdb.ResultIterator{it}, nil
576
-	case byCN:
577
-		it, err := tx.memDBTx.Get(table, indexCN, string(v))
578
-		if err != nil {
579
-			return nil, err
580
-		}
581
-		return []memdb.ResultIterator{it}, nil
582 576
 	case byIDPrefix:
583 577
 		it, err := tx.memDBTx.Get(table, indexID+prefix, string(v))
584 578
 		if err != nil {
... ...
@@ -529,6 +529,20 @@ func (n *Node) Agent() *agent.Agent {
529 529
 	return n.agent
530 530
 }
531 531
 
532
+// IsStateDirty returns true if any objects have been added to raft which make
533
+// the state "dirty". Currently, the existence of any object other than the
534
+// default cluster or the local node implies a dirty state.
535
+func (n *Node) IsStateDirty() (bool, error) {
536
+	n.RLock()
537
+	defer n.RUnlock()
538
+
539
+	if n.manager == nil {
540
+		return false, errors.New("node is not a manager")
541
+	}
542
+
543
+	return n.manager.IsStateDirty()
544
+}
545
+
532 546
 // Remotes returns a list of known peers known to node.
533 547
 func (n *Node) Remotes() []api.Peer {
534 548
 	weights := n.remotes.Weights()