diff --git a/cli/command/container/cp.go b/cli/command/container/cp.go index ffb9a211c2d1..20809bc36206 100644 --- a/cli/command/container/cp.go +++ b/cli/command/container/cp.go @@ -128,6 +128,10 @@ func copyFromContainer(ctx context.Context, dockerCli command.Cli, copyConfig cp } } + if err := command.ValidateOutputPath(dstPath); err != nil { + return err + } + client := dockerCli.Client() // if client requests to follow symbol link, then must decide target file to be copied var rebaseName string @@ -209,6 +213,11 @@ func copyToContainer(ctx context.Context, dockerCli command.Cli, copyConfig cpCo dstStat, err = client.ContainerStatPath(ctx, copyConfig.container, linkTarget) } + // Validate the destination path + if err := command.ValidateOutputPathFileMode(dstStat.Mode); err != nil { + return errors.Wrapf(err, `destination "%s:%s" must be a directory or a regular file`, copyConfig.container, dstPath) + } + // Ignore any error and assume that the parent directory of the destination // path exists, in which case the copy may still succeed. If there is any // type of conflict (e.g., non-directory overwriting an existing directory diff --git a/cli/command/container/cp_test.go b/cli/command/container/cp_test.go index 67cdaf15a9bf..f08b7ee52035 100644 --- a/cli/command/container/cp_test.go +++ b/cli/command/container/cp_test.go @@ -190,3 +190,12 @@ func TestSplitCpArg(t *testing.T) { }) } } + +func TestRunCopyFromContainerToFilesystemIrregularDestination(t *testing.T) { + options := copyOptions{source: "container:/dev/null", destination: "/dev/random"} + cli := test.NewFakeCli(nil) + err := runCopy(cli, options) + assert.Assert(t, err != nil) + expected := `"/dev/random" must be a directory or a regular file` + assert.ErrorContains(t, err, expected) +} diff --git a/cli/command/container/export.go b/cli/command/container/export.go index f0f67373d7a2..ee77cdb55de4 100644 --- a/cli/command/container/export.go +++ b/cli/command/container/export.go @@ -41,6 +41,10 @@ func runExport(dockerCli command.Cli, opts exportOptions) error { return errors.New("cowardly refusing to save to a terminal. Use the -o flag or redirect") } + if err := command.ValidateOutputPath(opts.output); err != nil { + return errors.Wrap(err, "failed to export container") + } + clnt := dockerCli.Client() responseBody, err := clnt.ContainerExport(context.Background(), opts.container) diff --git a/cli/command/container/export_test.go b/cli/command/container/export_test.go index b961ec763000..340d55e10e59 100644 --- a/cli/command/container/export_test.go +++ b/cli/command/container/export_test.go @@ -31,3 +31,19 @@ func TestContainerExportOutputToFile(t *testing.T) { assert.Assert(t, fs.Equal(dir.Path(), expected)) } + +func TestContainerExportOutputToIrregularFile(t *testing.T) { + cli := test.NewFakeCli(&fakeClient{ + containerExportFunc: func(container string) (io.ReadCloser, error) { + return ioutil.NopCloser(strings.NewReader("foo")), nil + }, + }) + cmd := NewExportCommand(cli) + cmd.SetOutput(ioutil.Discard) + cmd.SetArgs([]string{"-o", "/dev/random", "container"}) + + err := cmd.Execute() + assert.Assert(t, err != nil) + expected := `"/dev/random" must be a directory or a regular file` + assert.ErrorContains(t, err, expected) +} diff --git a/cli/command/container/formatter_stats.go b/cli/command/container/formatter_stats.go index 565de4470b77..59ebcf631621 100644 --- a/cli/command/container/formatter_stats.go +++ b/cli/command/container/formatter_stats.go @@ -2,6 +2,7 @@ package container import ( "fmt" + "strconv" "sync" "github.com/docker/cli/cli/command/formatter" @@ -13,11 +14,21 @@ const ( winOSType = "windows" defaultStatsTableFormat = "table {{.ID}}\t{{.Name}}\t{{.CPUPerc}}\t{{.MemUsage}}\t{{.MemPerc}}\t{{.NetIO}}\t{{.BlockIO}}\t{{.PIDs}}" winDefaultStatsTableFormat = "table {{.ID}}\t{{.Name}}\t{{.CPUPerc}}\t{{.MemUsage}}\t{{.NetIO}}\t{{.BlockIO}}" + autoRangeStatsTableFormat = "table {{.ID}}\t{{.CurrentMemoryMin}}\t{{.CurrentMemoryMax}}\t{{.OptiMemoryMin}}\t{{.OptiMemoryMax}}\t{{.OptiCPUNumber}}\t{{.UsedCPUPerc}}\t{{.OptiCPUTime}}" + + currentMemoryMinHeader = "CURRENT MIN" + currentMemoryMaxHeader = "CURRENT MAX" + optiMemoryMinHeader = "OPTI MIN" + optiMemoryMaxHeader = "OPTI MAX" + optiCPUNumberHeader = "OPTI CPU" + usedCPUPercHeader = "USED %" + optiCPUTimeHeader = "OPTI TIME" containerHeader = "CONTAINER" cpuPercHeader = "CPU %" netIOHeader = "NET I/O" blockIOHeader = "BLOCK I/O" + memPercHeader = "MEM %" // Used only on Linux winMemUseHeader = "PRIV WORKING SET" // Used only on Windows memUseHeader = "MEM USAGE / LIMIT" // Used only on Linux @@ -26,6 +37,14 @@ const ( // StatsEntry represents represents the statistics data collected from a container type StatsEntry struct { + CurrentMemoryMin string + CurrentMemoryMax string + OptiMemoryMin string + OptiMemoryMax string + OptiCPUNumber string + UsedCPUPerc string + OptiCPUTime string + Container string Name string ID string @@ -72,6 +91,14 @@ func (cs *Stats) SetErrorAndReset(err error) { cs.PidsCurrent = 0 cs.err = err cs.IsInvalid = true + cs.CurrentMemoryMin = "" + cs.CurrentMemoryMax = "" + cs.OptiMemoryMin = "" + cs.OptiMemoryMax = "" + cs.OptiCPUNumber = "" + cs.UsedCPUPerc = "" + cs.OptiCPUTime = "" + } // SetError sets container statistics error @@ -106,6 +133,8 @@ func NewStatsFormat(source, osType string) formatter.Format { return formatter.Format(winDefaultStatsTableFormat) } return formatter.Format(defaultStatsTableFormat) + } else if source == formatter.AutoRangeFormatKey { + return formatter.Format(autoRangeStatsTableFormat) } return formatter.Format(source) } @@ -136,15 +165,22 @@ func statsFormatWrite(ctx formatter.Context, Stats []StatsEntry, osType string, } statsCtx := statsContext{} statsCtx.Header = formatter.SubHeaderContext{ - "Container": containerHeader, - "Name": formatter.NameHeader, - "ID": formatter.ContainerIDHeader, - "CPUPerc": cpuPercHeader, - "MemUsage": memUsage, - "MemPerc": memPercHeader, - "NetIO": netIOHeader, - "BlockIO": blockIOHeader, - "PIDs": pidsHeader, + "Container": containerHeader, + "Name": formatter.NameHeader, + "ID": formatter.ContainerIDHeader, + "CPUPerc": cpuPercHeader, + "MemUsage": memUsage, + "MemPerc": memPercHeader, + "NetIO": netIOHeader, + "BlockIO": blockIOHeader, + "PIDs": pidsHeader, + "CurrentMemoryMin": currentMemoryMinHeader, + "CurrentMemoryMax": currentMemoryMaxHeader, + "OptiMemoryMin": optiMemoryMinHeader, + "OptiMemoryMax": optiMemoryMaxHeader, + "OptiCPUNumber": optiCPUNumberHeader, + "UsedCPUPerc": usedCPUPercHeader, + "OptiCPUTime": optiCPUTimeHeader, } statsCtx.os = osType return ctx.Write(&statsCtx, render) @@ -157,10 +193,55 @@ type statsContext struct { trunc bool } +func dashOrConverted(value string, isInvalid bool) string { + val, err := strconv.ParseFloat(value, 32) + if err != nil || isInvalid { + return "--" + } + return units.BytesSize(val) +} + func (c *statsContext) MarshalJSON() ([]byte, error) { return formatter.MarshalJSON(c) } +func (c *statsContext) CurrentMemoryMin() string { + return dashOrConverted(c.s.CurrentMemoryMin, c.s.IsInvalid) +} + +func (c *statsContext) CurrentMemoryMax() string { + return dashOrConverted(c.s.CurrentMemoryMax, c.s.IsInvalid) +} + +func (c *statsContext) OptiMemoryMin() string { + return dashOrConverted(c.s.OptiMemoryMin, c.s.IsInvalid) +} + +func (c *statsContext) OptiMemoryMax() string { + return dashOrConverted(c.s.OptiMemoryMax, c.s.IsInvalid) +} + +func (c *statsContext) OptiCPUNumber() string { + if c.s.IsInvalid { + return fmt.Sprintf("--") + } + return c.s.OptiCPUNumber +} + +func (c *statsContext) UsedCPUPerc() string { + if c.s.IsInvalid { + return fmt.Sprintf("--") + } + return c.s.UsedCPUPerc +} + +func (c *statsContext) OptiCPUTime() string { + if c.s.IsInvalid { + return fmt.Sprintf("--") + } + return c.s.OptiCPUTime +} + func (c *statsContext) Container() string { return c.s.Container } diff --git a/cli/command/container/formatter_stats_test.go b/cli/command/container/formatter_stats_test.go index 68e76625ab4d..4c2bdb4bb582 100644 --- a/cli/command/container/formatter_stats_test.go +++ b/cli/command/container/formatter_stats_test.go @@ -37,6 +37,20 @@ func TestContainerStatsContext(t *testing.T) { {StatsEntry{PidsCurrent: 10}, "", "10", pidsHeader, ctx.PIDs}, {StatsEntry{PidsCurrent: 10, IsInvalid: true}, "", "--", pidsHeader, ctx.PIDs}, {StatsEntry{PidsCurrent: 10}, "windows", "--", pidsHeader, ctx.PIDs}, + {StatsEntry{CurrentMemoryMin: "746123"}, "", "728.6KiB", currentMemoryMinHeader, ctx.CurrentMemoryMin}, + {StatsEntry{CurrentMemoryMin: "746123", IsInvalid: true}, "", "--", currentMemoryMinHeader, ctx.CurrentMemoryMin}, + {StatsEntry{CurrentMemoryMax: "758123"}, "", "740.4KiB", currentMemoryMaxHeader, ctx.CurrentMemoryMax}, + {StatsEntry{CurrentMemoryMax: "758123", IsInvalid: true}, "", "--", currentMemoryMaxHeader, ctx.CurrentMemoryMax}, + {StatsEntry{OptiMemoryMin: "600000000"}, "", "572.2MiB", optiMemoryMinHeader, ctx.OptiMemoryMin}, + {StatsEntry{OptiMemoryMin: "600000000", IsInvalid: true}, "", "--", optiMemoryMinHeader, ctx.OptiMemoryMin}, + {StatsEntry{OptiMemoryMax: "900000000"}, "", "858.3MiB", optiMemoryMaxHeader, ctx.OptiMemoryMax}, + {StatsEntry{OptiMemoryMax: "900000000", IsInvalid: true}, "", "--", optiMemoryMaxHeader, ctx.OptiMemoryMax}, + {StatsEntry{OptiCPUNumber: "4"}, "", "4", optiCPUNumberHeader, ctx.OptiCPUNumber}, + {StatsEntry{OptiCPUNumber: "4", IsInvalid: true}, "", "--", optiCPUNumberHeader, ctx.OptiCPUNumber}, + {StatsEntry{OptiCPUTime: "123456"}, "", "123456", optiCPUTimeHeader, ctx.OptiCPUTime}, + {StatsEntry{OptiCPUTime: "123456", IsInvalid: true}, "", "--", optiCPUTimeHeader, ctx.OptiCPUTime}, + {StatsEntry{UsedCPUPerc: "342%"}, "", "342%", usedCPUPercHeader, ctx.UsedCPUPerc}, + {StatsEntry{UsedCPUPerc: "342%", IsInvalid: true}, "", "--", usedCPUPercHeader, ctx.UsedCPUPerc}, } for _, te := range tt { @@ -219,6 +233,20 @@ func TestContainerStatsContextWriteWithNoStats(t *testing.T) { }, "CONTAINER CPU %\n", }, + { + formatter.Context{ + Format: "table {{.CurrentMemoryMin}}\t{{.CurrentMemoryMax}}\t{{.OptiMemoryMin}}\t{{.OptiMemoryMax}}", + Output: &out, + }, + "CURRENT MIN CURRENT MAX OPTI MIN OPTI MAX\n", + }, + { + formatter.Context{ + Format: "table {{.OptiCPUNumber}}\t{{.UsedCPUPerc}}\t{{.OptiCPUTime}}", + Output: &out, + }, + "OPTI CPU USED % OPTI TIME\n", + }, } for _, context := range contexts { diff --git a/cli/command/container/stats_helpers.go b/cli/command/container/stats_helpers.go index d85891a5f3f3..d620a6f72947 100644 --- a/cli/command/container/stats_helpers.go +++ b/cli/command/container/stats_helpers.go @@ -81,8 +81,8 @@ func collect(ctx context.Context, s *Stats, cli client.APIClient, streamStats bo var ( v *types.StatsJSON memPercent, cpuPercent float64 - blkRead, blkWrite uint64 // Only used on Linux mem, memLimit float64 + blkRead, blkWrite uint64 // Only used on Linux pidsStatsCurrent uint64 ) @@ -126,8 +126,16 @@ func collect(ctx context.Context, s *Stats, cli client.APIClient, streamStats bo BlockRead: float64(blkRead), BlockWrite: float64(blkWrite), PidsCurrent: pidsStatsCurrent, + CurrentMemoryMin: getAutoRangeValue(v.AutoRange["memoryAR"], "nmin"), + CurrentMemoryMax: getAutoRangeValue(v.AutoRange["memoryAR"], "nmax"), + OptiMemoryMin: getAutoRangeValue(v.AutoRange["memoryAR"], "sugmin"), + OptiMemoryMax: getAutoRangeValue(v.AutoRange["memoryAR"], "sugmax"), + OptiCPUNumber: getAutoRangeValue(v.AutoRange["cpuAR"], "numCPU"), + UsedCPUPerc: getAutoRangeValue(v.AutoRange["cpuAR"], "percentOpti"), + OptiCPUTime: getAutoRangeValue(v.AutoRange["cpuAR"], "usageOpti"), }) u <- nil + if !streamStats { return } @@ -164,6 +172,14 @@ func collect(ctx context.Context, s *Stats, cli client.APIClient, streamStats bo } } +func getAutoRangeValue(array map[string]string, value string) string { + v, exist := array[value] + if !exist { + v = "--" + } + return v +} + func calculateCPUPercentUnix(previousCPU, previousSystem uint64, v *types.StatsJSON) float64 { var ( cpuPercent = 0.0 diff --git a/cli/command/container/stats_helpers_test.go b/cli/command/container/stats_helpers_test.go index a9657e2e2c40..318fd7196c9b 100644 --- a/cli/command/container/stats_helpers_test.go +++ b/cli/command/container/stats_helpers_test.go @@ -19,6 +19,21 @@ func TestCalculateMemUsageUnixNoCache(t *testing.T) { assert.Assert(t, inDelta(100.0, result, 1e-6)) } +func TestGetAutoRangeValue(t *testing.T) { + testMap := map[string]string{ + "testTrue": "true", + "testFalse": "false", + } + testValues := []string{"testTrue", "testFalse", "test"} + + results := []string{"true", "false", "--"} + + for index := range testValues { + v := getAutoRangeValue(testMap, testValues[index]) + assert.Assert(t, v == results[index]) + } +} + func TestCalculateMemPercentUnixNoCache(t *testing.T) { // Given someLimit := float64(100.0) diff --git a/cli/command/formatter/formatter.go b/cli/command/formatter/formatter.go index ae828bfe4746..4436f0edc4e1 100644 --- a/cli/command/formatter/formatter.go +++ b/cli/command/formatter/formatter.go @@ -13,9 +13,10 @@ import ( // Format keys used to specify certain kinds of output formats const ( - TableFormatKey = "table" - RawFormatKey = "raw" - PrettyFormatKey = "pretty" + TableFormatKey = "table" + RawFormatKey = "raw" + PrettyFormatKey = "pretty" + AutoRangeFormatKey = "autorange" DefaultQuietFormat = "{{.ID}}" ) diff --git a/cli/command/image/save.go b/cli/command/image/save.go index ef23ca1bb118..218a9a7974ba 100644 --- a/cli/command/image/save.go +++ b/cli/command/image/save.go @@ -3,8 +3,6 @@ package image import ( "context" "io" - "os" - "path/filepath" "github.com/docker/cli/cli" "github.com/docker/cli/cli/command" @@ -44,7 +42,7 @@ func RunSave(dockerCli command.Cli, opts saveOptions) error { return errors.New("cowardly refusing to save to a terminal. Use the -o flag or redirect") } - if err := validateOutputPath(opts.output); err != nil { + if err := command.ValidateOutputPath(opts.output); err != nil { return errors.Wrap(err, "failed to save image") } @@ -61,13 +59,3 @@ func RunSave(dockerCli command.Cli, opts saveOptions) error { return command.CopyToFile(opts.output, responseBody) } - -func validateOutputPath(path string) error { - dir := filepath.Dir(path) - if dir != "" && dir != "." { - if _, err := os.Stat(dir); os.IsNotExist(err) { - return errors.Errorf("unable to validate output path: directory %q does not exist", dir) - } - } - return nil -} diff --git a/cli/command/image/save_test.go b/cli/command/image/save_test.go index d051e8cb5c31..cc960ba0e00c 100644 --- a/cli/command/image/save_test.go +++ b/cli/command/image/save_test.go @@ -44,7 +44,12 @@ func TestNewSaveCommandErrors(t *testing.T) { { name: "output directory does not exist", args: []string{"-o", "fakedir/out.tar", "arg1"}, - expectedError: "failed to save image: unable to validate output path: directory \"fakedir\" does not exist", + expectedError: "failed to save image: invalid output path: directory \"fakedir\" does not exist", + }, + { + name: "output file is irregular", + args: []string{"-o", "/dev/null", "arg1"}, + expectedError: "failed to save image: invalid output path: \"/dev/null\" must be a directory or a regular file", }, } for _, tc := range testCases { diff --git a/cli/command/service/formatter.go b/cli/command/service/formatter.go index 4c81406a4a33..4df5565bbad4 100644 --- a/cli/command/service/formatter.go +++ b/cli/command/service/formatter.go @@ -25,6 +25,11 @@ Labels: {{- range $k, $v := .Labels }} {{ $k }}{{if $v }}={{ $v }}{{ end }} {{- end }}{{ end }} +{{- if .AutoRange}} +AutoRange: +{{- range $k, $v := .AutoRange}} + {{ $k }}{{if $v }}={{ $v }}{{ end }} +{{- end }}{{- end }} Service Mode: {{- if .IsModeGlobal }} Global {{- else if .IsModeReplicated }} Replicated @@ -204,6 +209,10 @@ func (ctx *serviceInspectContext) MarshalJSON() ([]byte, error) { return formatter.MarshalJSON(ctx) } +func (ctx *serviceInspectContext) AutoRange() swarm.AutoRange { + return ctx.Service.Spec.AutoRange +} + func (ctx *serviceInspectContext) ID() string { return ctx.Service.ID } diff --git a/cli/command/utils.go b/cli/command/utils.go index 26f53814cdf9..0356fa4cc62b 100644 --- a/cli/command/utils.go +++ b/cli/command/utils.go @@ -12,6 +12,7 @@ import ( "github.com/docker/cli/cli/streams" "github.com/docker/docker/api/types/filters" "github.com/docker/docker/pkg/system" + "github.com/pkg/errors" "github.com/spf13/pflag" ) @@ -126,3 +127,37 @@ func AddPlatformFlag(flags *pflag.FlagSet, target *string) { flags.SetAnnotation("platform", "version", []string{"1.32"}) flags.SetAnnotation("platform", "experimental", nil) } + +// ValidateOutputPath validates the output paths of the `export` and `save` commands. +func ValidateOutputPath(path string) error { + dir := filepath.Dir(path) + if dir != "" && dir != "." { + if _, err := os.Stat(dir); os.IsNotExist(err) { + return errors.Errorf("invalid output path: directory %q does not exist", dir) + } + } + // check whether `path` points to a regular file + // (if the path exists and doesn't point to a directory) + if fileInfo, err := os.Stat(path); !os.IsNotExist(err) { + if fileInfo.Mode().IsDir() || fileInfo.Mode().IsRegular() { + return nil + } + + if err := ValidateOutputPathFileMode(fileInfo.Mode()); err != nil { + return errors.Wrapf(err, fmt.Sprintf("invalid output path: %q must be a directory or a regular file", path)) + } + } + return nil +} + +// ValidateOutputPathFileMode validates the output paths of the `cp` command and serves as a +// helper to `ValidateOutputPath` +func ValidateOutputPathFileMode(fileMode os.FileMode) error { + switch { + case fileMode&os.ModeDevice != 0: + return errors.New("got a device") + case fileMode&os.ModeIrregular != 0: + return errors.New("got an irregular file") + } + return nil +} diff --git a/cli/compose/convert/service.go b/cli/compose/convert/service.go index d2bfcbaa5534..bf14db8bc15a 100644 --- a/cli/compose/convert/service.go +++ b/cli/compose/convert/service.go @@ -4,6 +4,7 @@ import ( "fmt" "os" "sort" + "strconv" "strings" "time" @@ -108,6 +109,11 @@ func Service( return swarm.ServiceSpec{}, err } + autoRange, err := convertAutoRange(service.AutoRange) + if err != nil { + return swarm.ServiceSpec{}, err + } + var privileges swarm.Privileges privileges.CredentialSpec, err = convertCredentialSpec(service.CredentialSpec) if err != nil { @@ -127,6 +133,7 @@ func Service( Name: name, Labels: AddStackLabel(namespace, service.Deploy.Labels), }, + AutoRange: autoRange, TaskTemplate: swarm.TaskSpec{ ContainerSpec: &swarm.ContainerSpec{ Image: service.Image, @@ -152,6 +159,7 @@ func Service( Isolation: container.Isolation(service.Isolation), Init: service.Init, }, + AutoRange: autoRange, LogDriver: logDriver, Resources: resources, RestartPolicy: restartPolicy, @@ -184,6 +192,137 @@ func Service( return serviceSpec, nil } +func convertAutoRange(oldAr composetypes.AutoRange) (swarm.AutoRange, error) { + if len(oldAr) <= 0 { + return swarm.AutoRange{}, nil + } + + ar := make(swarm.AutoRange) + for key := range oldAr { + newR := strings.ToLower(key) + ar[newR] = make(map[string]string) + for subKey, subValue := range oldAr[key] { + if !checkAutoRangeDeclaration(subValue) { + return swarm.AutoRange{}, fmt.Errorf("wrong parameter %q:%q for autoRange configuration", subKey, subValue) + } + ar[newR][subKey] = subValue + } + } + if err := checkAutoRangeValues(ar); err != nil { + return swarm.AutoRange{}, err + } + return ar, nil +} + +func isInRange(value, min, max int) bool { + return (value > min && value <= max) +} + +func isPositive(value int) bool { + return value >= 0 +} + +func checkCPUValues(values map[string]string) (min, max int, err error) { + category := "cpu%" + min, max, err = -1, -1, nil + + for key, value := range values { + switch key { + case "min": + min, err = convertAndValidateRange(0, 100, value, category) + case "max": + max, err = convertAndValidateRange(0, 100, value, category) + default: + err = fmt.Errorf("unrecognized key %q for %q", key, category) + } + if err != nil { + return + } + } + + return min, max, err +} + +func convertAndValidatePositive(value, category string) (int, error) { + result, err := strconv.Atoi(value) + if !isPositive(result) || err != nil { + return -1, fmt.Errorf("invalid value %d for %q", result, category) + } + return result, err +} + +func convertAndValidateRange(min, max int, value, category string) (int, error) { + result, err := strconv.Atoi(value) + if !isInRange(result, min, max) || err != nil { + return -1, fmt.Errorf("invalid value %d for %q", result, category) + } + return result, err +} + +func checkMemoryValues(values map[string]string) (min, max int, err error) { + category := "memory" + min, max, err = -1, -1, nil + + for key, value := range values { + switch key { + case "min": + min, err = convertAndValidatePositive(value, category) + case "max": + max, err = convertAndValidatePositive(value, category) + case "threshold": + _, err = convertAndValidateRange(0, 100, value, "threshold") + default: + err = fmt.Errorf("unrecognized key %q for %q", key, category) + } + if err != nil { + return + } + } + + return min, max, err +} + +func checkAutoRangeValues(autorange swarm.AutoRange) (err error) { + var min, max int + err = nil + + for category := range autorange { + switch category { + case "cpu%": + min, max, err = checkCPUValues(autorange[category]) + case "memory": + min, max, err = checkMemoryValues(autorange[category]) + default: + err = fmt.Errorf("unrecognized category %q", category) + } + if err != nil { + return + } + + // Do checks on values + if min > max && max != -1 || min < -1 || max < -1 { + err = fmt.Errorf("invalid min %d or max %d values for %q", min, max, category) + } + + if err != nil { + return + } + // Reset for next checks + min, max = -1, -1 + } + + return err +} + +func checkAutoRangeDeclaration(value string) bool { + if value == "0" || len(value) == 0 { + return false + } else if _, err := strconv.Atoi(value); err != nil { + return false + } + return true +} + func getPlacementPreference(preferences []composetypes.PlacementPreferences) []swarm.PlacementPreference { result := []swarm.PlacementPreference{} for _, preference := range preferences { diff --git a/cli/compose/convert/service_test.go b/cli/compose/convert/service_test.go index d281e0e4529b..a02dbb99e114 100644 --- a/cli/compose/convert/service_test.go +++ b/cli/compose/convert/service_test.go @@ -2,6 +2,7 @@ package convert import ( "context" + "fmt" "os" "sort" "strings" @@ -199,6 +200,277 @@ func TestConvertEndpointSpec(t *testing.T) { assert.Check(t, is.DeepEqual(expected, *endpoint)) } +func TestCheckAutoRangeDeclaration(t *testing.T) { + testDeclaration := []string{"123456", "-1", "0", "", "abc", "123.01"} + + expected := []bool{true, true, false, false, false, false} + + for index, declaration := range testDeclaration { + result := checkAutoRangeDeclaration(declaration) + assert.Check(t, result == expected[index]) + } +} + +func TestConvertAndValidatePositive(t *testing.T) { + testRanges := []string{"1", "0", "-1", "test"} + + expected := []struct { + result int + err error + }{ + { + result: 1, + err: nil, + }, + { + result: 0, + err: nil, + }, + { + result: -1, + err: fmt.Errorf("invalid value %d for %q", -1, "cpu%"), + }, + { + result: 0, + err: fmt.Errorf("invalid value %d for %q", 0, "cpu%"), + }, + } + + for idx, test := range testRanges { + result, err := convertAndValidatePositive(test, "cpu%") + if result == expected[idx].result && + err == nil && expected[idx].err == nil || err != nil && expected[idx].err != nil { + continue + } + t.Fail() + } +} + +func TestConvertAndValidateRange(t *testing.T) { + testRanges := []struct { + value string + category string + min int + max int + }{ + { + value: "1", + category: "cpu", + min: 0, + max: 100, + }, + { + value: "99", + category: "threshold", + min: 0, + max: 100, + }, + { + value: "0", + category: "yolo", + min: 0, + max: 1, + }, + } + + expected := []struct { + result int + err error + }{ + { + result: 1, + err: nil, + }, + { + result: 99, + err: nil, + }, + { + result: -1, + err: fmt.Errorf("invalid value %d for %q", 0, "yolo"), + }, + } + + for idx, test := range testRanges { + result, err := convertAndValidateRange(test.min, test.max, test.value, test.category) + if result == expected[idx].result && + err == nil && expected[idx].err == nil || err != nil && expected[idx].err != nil { + continue + } + t.Fail() + } + +} + +func TestIsInRange(t *testing.T) { + testRanges := []struct { + value int + min int + max int + }{ + { + value: 0, + min: 0, + max: 100, + }, + { + value: 1, + min: 0, + max: 100, + }, + { + value: 100, + min: 0, + max: 100, + }, + { + value: 100, + min: 100, + max: 100, + }, + } + expected := []bool{false, true, true, false} + + for idx, test := range testRanges { + result := isInRange(test.value, test.min, test.max) + t.Logf("result: %v | expected: %v\n", result, expected[idx]) + if result != expected[idx] { + t.Fail() + } + } +} + +func TestIsPositive(t *testing.T) { + testInteger := []int{0, -1, 42} + + expected := []bool{true, false, true} + + for idx, test := range testInteger { + result := isPositive(test) + if result != expected[idx] { + t.Fail() + } + } +} + +func TestCheckCPUValue(t *testing.T) { + testAutoranges := []map[string]string{ + {}, + { + "min": "99", + "max": "2000", + }, + { + "max": "-2000", + }, + { + "peekaboo": "2000", + }, + } + + expected := []error{ + nil, + fmt.Errorf("invalid value %d for %q", 1000, "cpu%"), + fmt.Errorf("invalid value %d for %q", -2000, "cpu%"), + fmt.Errorf("unrecognized key %q for %q", "peekaboo", "cpu%"), + } + + for idx, test := range testAutoranges { + _, _, err := checkCPUValues(test) + if err == nil && expected[idx] == nil || err != nil && expected[idx] != nil { + } else { + t.Fail() + } + } +} + +func TestCheckMemoryValue(t *testing.T) { + testAutoranges := []map[string]string{ + {}, + { + "min": "1234", + "max": "1232", + }, + { + "max": "-2000", + }, + { + "peekaboo": "2000", + }, + { + "threshold": "101", + }, + } + + expected := []error{ + nil, + nil, + fmt.Errorf("invalid value %d for %q", -2000, "memory"), + fmt.Errorf("unrecognized key %q for %q", "peekaboo", "memory"), + fmt.Errorf("invalid value %d for %q", 101, "threshold"), + } + + for idx, test := range testAutoranges { + _, _, err := checkMemoryValues(test) + if err == nil && expected[idx] == nil || err != nil && expected[idx] != nil { + } else { + t.Fail() + } + } +} + +func TestCheckAutoRangeValues(t *testing.T) { + testAutoranges := []swarm.AutoRange{ + { + "memory": {}, + "cpu%": {}, + }, + { + "memory": { + "min": "1234567", + "max": "3214556", + "threshold": "90", + }, + "cpu%": { + "min": "1000", + "max": "2000", + }, + }, + { + "memory": { + "min": "1234567", + "threshold": "120", + }, + }, + { + "cpu%": { + "max": "-2000", + }, + }, + { + "cpu%": { + "peekaboo": "2000", + }, + }, + } + expected := []error{ + nil, + fmt.Errorf("invalid value %d for %q", 1000, "cpu%"), + fmt.Errorf("invalid threshold %d", 120), + fmt.Errorf("invalid min %d or max %d values for %q", -1, -2000, "cpu%"), + fmt.Errorf("unrecognized key %q for %q", "peekaboo", "cpu%"), + } + + for idx, autorange := range testAutoranges { + err := checkAutoRangeValues(autorange) + if err == nil && expected[idx] == nil || err != nil && expected[idx] != nil { + continue + } else { + t.Fail() + } + } +} + func TestConvertServiceNetworksOnlyDefault(t *testing.T) { networkConfigs := networkMap{} diff --git a/cli/compose/schema/bindata.go b/cli/compose/schema/bindata.go index dc01e6788fb9..035ed8c4bdd8 100644 --- a/cli/compose/schema/bindata.go +++ b/cli/compose/schema/bindata.go @@ -508,6 +508,50 @@ bnBpPlHfjORjkTRf1wyAwiYqMXd9/G6313QfoXs6/sbZ66r6e179PwAA//8ZL3SpvkUAAA== `, }, + "/data/config_schema_v3.8.json": { + local: "data/config_schema_v3.8.json", + size: 18474, + modtime: 1518458244, + compressed: ` +H4sIAAAAAAAC/+xc3Y/juA1/z19h+K5P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avRLMSLx8ypy8 +JO20FYnHb2s/xRRcc4KozplxfFl7xv2eoTZ1GUKq5q8h/K94m1eolBj4MIkPk+hX6KrcQK9lDtYiwDr9 +q6rQwRft3b2/9+r8ipL/pDlKl2GC6wLyVhRgoc5AADKaDKzBceRMad/oFuV6y65jD8kZPa1l3lSKeh0h +yHMl1JW4UwbiuTI6CFq/MpHKr8vDrBW0rTihMArNrlW0NkiYMIt7FcZqUQh7QBAUZt1yWjOaqRutV5BX +CCR9hyujazf/iq9irHAzF89PB0wSw+HuWXbNvVvuXSozRIpgoJvZ1nXrs4R5K4ifm5qWF6jjI+FFwB3I +RV0jrtpBwOCz9SM93562ZCskaCFdXEFtRA1VItX69xj+VqGtv4rOFMnXQtjgxqrYmjDcAnYWO+EoU982 +dlo6LJ3dvG1B6q7TVXhDr9Mx1lt/VRsbXz7aimjEGEIPQfW2hWWPH1C+nJTrrZDWUH0g2gJE+9nt//Zs +tfl+2fuNbEXl/+T4CgsN+KroBvb/J9nWySFs3daG6mNbf5ZtHTXd9LZ3evkzp/HgzuBN/66nW8aYzPIr +JK4My7ko11XlaNJG2fOSr3huPfw2+z2Qu4P/jULAFdod7Xs6KqFsuubG8Y8ouLGkHT/5SYVSTnGaXE5+ +Hza41D+HsB3oZ0RSf13TCxS2QYm57YcWxu017Q8eODr+htnrpvz3vPlfAAAA//8ze5q4KkgAAA== +`, + }, + "/": { isDir: true, local: "", diff --git a/cli/compose/schema/data/config_schema_v3.8.json b/cli/compose/schema/data/config_schema_v3.8.json new file mode 100644 index 000000000000..c3524de54499 --- /dev/null +++ b/cli/compose/schema/data/config_schema_v3.8.json @@ -0,0 +1,626 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "config_schema_v3.7.json", + "type": "object", + "required": ["version"], + + "properties": { + "version": { + "type": "string" + }, + + "services": { + "id": "#/properties/services", + "type": "object", + "patternProperties": { + "^[a-zA-Z0-9._-]+$": { + "$ref": "#/definitions/service" + } + }, + "additionalProperties": false + }, + + "networks": { + "id": "#/properties/networks", + "type": "object", + "patternProperties": { + "^[a-zA-Z0-9._-]+$": { + "$ref": "#/definitions/network" + } + } + }, + + "volumes": { + "id": "#/properties/volumes", + "type": "object", + "patternProperties": { + "^[a-zA-Z0-9._-]+$": { + "$ref": "#/definitions/volume" + } + }, + "additionalProperties": false + }, + + "secrets": { + "id": "#/properties/secrets", + "type": "object", + "patternProperties": { + "^[a-zA-Z0-9._-]+$": { + "$ref": "#/definitions/secret" + } + }, + "additionalProperties": false + }, + + "configs": { + "id": "#/properties/configs", + "type": "object", + "patternProperties": { + "^[a-zA-Z0-9._-]+$": { + "$ref": "#/definitions/config" + } + }, + "additionalProperties": false + } + }, + + "patternProperties": {"^x-": {}}, + "additionalProperties": false, + + "definitions": { + + "service": { + "id": "#/definitions/service", + "type": "object", + + "properties": { + "deploy": {"$ref": "#/definitions/deployment"}, + "build": { + "oneOf": [ + {"type": "string"}, + { + "type": "object", + "properties": { + "context": {"type": "string"}, + "dockerfile": {"type": "string"}, + "args": {"$ref": "#/definitions/list_or_dict"}, + "labels": {"$ref": "#/definitions/list_or_dict"}, + "cache_from": {"$ref": "#/definitions/list_of_strings"}, + "network": {"type": "string"}, + "target": {"type": "string"}, + "shm_size": {"type": ["integer", "string"]} + }, + "additionalProperties": false + } + ] + }, + "cap_add": {"type": "array", "items": {"type": "string"}, "uniqueItems": true}, + "cap_drop": {"type": "array", "items": {"type": "string"}, "uniqueItems": true}, + "cgroup_parent": {"type": "string"}, + "command": { + "oneOf": [ + {"type": "string"}, + {"type": "array", "items": {"type": "string"}} + ] + }, + "configs": { + "type": "array", + "items": { + "oneOf": [ + {"type": "string"}, + { + "type": "object", + "properties": { + "source": {"type": "string"}, + "target": {"type": "string"}, + "uid": {"type": "string"}, + "gid": {"type": "string"}, + "mode": {"type": "number"} + } + } + ] + } + }, + "container_name": {"type": "string"}, + "credential_spec": { + "type": "object", + "properties": { + "file": {"type": "string"}, + "registry": {"type": "string"} + }, + "additionalProperties": false + }, + "depends_on": {"$ref": "#/definitions/list_of_strings"}, + "devices": {"type": "array", "items": {"type": "string"}, "uniqueItems": true}, + "dns": {"$ref": "#/definitions/string_or_list"}, + "dns_search": {"$ref": "#/definitions/string_or_list"}, + "domainname": {"type": "string"}, + "entrypoint": { + "oneOf": [ + {"type": "string"}, + {"type": "array", "items": {"type": "string"}} + ] + }, + "env_file": {"$ref": "#/definitions/string_or_list"}, + "environment": {"$ref": "#/definitions/list_or_dict"}, + + "expose": { + "type": "array", + "items": { + "type": ["string", "number"], + "format": "expose" + }, + "uniqueItems": true + }, + "autorange": { + "type": ["object", "null"], + "properties": { + "cpu%": { + "type": ["object", "null"], + "properties": { + "min": {"type": "string"}, + "max": {"type": "string"} + } + }, + "memory": { + "type": ["object", "null"], + "properties": { + "min": {"type": "string"}, + "max": {"type": "string"}, + "threshold": {"type": "string"} + } + } + }, + "additionalProperties": false + }, + "external_links": {"type": "array", "items": {"type": "string"}, "uniqueItems": true}, + "extra_hosts": {"$ref": "#/definitions/list_or_dict"}, + "healthcheck": {"$ref": "#/definitions/healthcheck"}, + "hostname": {"type": "string"}, + "image": {"type": "string"}, + "init": {"type": "boolean"}, + "ipc": {"type": "string"}, + "isolation": {"type": "string"}, + "labels": {"$ref": "#/definitions/list_or_dict"}, + "links": {"type": "array", "items": {"type": "string"}, "uniqueItems": true}, + + "logging": { + "type": "object", + + "properties": { + "driver": {"type": "string"}, + "options": { + "type": "object", + "patternProperties": { + "^.+$": {"type": ["string", "number", "null"]} + } + } + }, + "additionalProperties": false + }, + + "mac_address": {"type": "string"}, + "network_mode": {"type": "string"}, + + "networks": { + "oneOf": [ + {"$ref": "#/definitions/list_of_strings"}, + { + "type": "object", + "patternProperties": { + "^[a-zA-Z0-9._-]+$": { + "oneOf": [ + { + "type": "object", + "properties": { + "aliases": {"$ref": "#/definitions/list_of_strings"}, + "ipv4_address": {"type": "string"}, + "ipv6_address": {"type": "string"} + }, + "additionalProperties": false + }, + {"type": "null"} + ] + } + }, + "additionalProperties": false + } + ] + }, + "pid": {"type": ["string", "null"]}, + + "ports": { + "type": "array", + "items": { + "oneOf": [ + {"type": "number", "format": "ports"}, + {"type": "string", "format": "ports"}, + { + "type": "object", + "properties": { + "mode": {"type": "string"}, + "target": {"type": "integer"}, + "published": {"type": "integer"}, + "protocol": {"type": "string"} + }, + "additionalProperties": false + } + ] + }, + "uniqueItems": true + }, + + "privileged": {"type": "boolean"}, + "read_only": {"type": "boolean"}, + "restart": {"type": "string"}, + "security_opt": {"type": "array", "items": {"type": "string"}, "uniqueItems": true}, + "shm_size": {"type": ["number", "string"]}, + "secrets": { + "type": "array", + "items": { + "oneOf": [ + {"type": "string"}, + { + "type": "object", + "properties": { + "source": {"type": "string"}, + "target": {"type": "string"}, + "uid": {"type": "string"}, + "gid": {"type": "string"}, + "mode": {"type": "number"} + } + } + ] + } + }, + "sysctls": {"$ref": "#/definitions/list_or_dict"}, + "stdin_open": {"type": "boolean"}, + "stop_grace_period": {"type": "string", "format": "duration"}, + "stop_signal": {"type": "string"}, + "tmpfs": {"$ref": "#/definitions/string_or_list"}, + "tty": {"type": "boolean"}, + "ulimits": { + "type": "object", + "patternProperties": { + "^[a-z]+$": { + "oneOf": [ + {"type": "integer"}, + { + "type":"object", + "properties": { + "hard": {"type": "integer"}, + "soft": {"type": "integer"} + }, + "required": ["soft", "hard"], + "additionalProperties": false + } + ] + } + } + }, + "user": {"type": "string"}, + "userns_mode": {"type": "string"}, + "volumes": { + "type": "array", + "items": { + "oneOf": [ + {"type": "string"}, + { + "type": "object", + "required": ["type"], + "properties": { + "type": {"type": "string"}, + "source": {"type": "string"}, + "target": {"type": "string"}, + "read_only": {"type": "boolean"}, + "consistency": {"type": "string"}, + "bind": { + "type": "object", + "properties": { + "propagation": {"type": "string"} + } + }, + "volume": { + "type": "object", + "properties": { + "nocopy": {"type": "boolean"} + } + }, + "tmpfs": { + "type": "object", + "properties": { + "size": { + "type": "integer", + "minimum": 0 + } + } + } + }, + "additionalProperties": false + } + ], + "uniqueItems": true + } + }, + "working_dir": {"type": "string"} + }, + "patternProperties": {"^x-": {}}, + "additionalProperties": false + }, + + "healthcheck": { + "id": "#/definitions/healthcheck", + "type": "object", + "additionalProperties": false, + "properties": { + "disable": {"type": "boolean"}, + "interval": {"type": "string", "format": "duration"}, + "retries": {"type": "number"}, + "test": { + "oneOf": [ + {"type": "string"}, + {"type": "array", "items": {"type": "string"}} + ] + }, + "timeout": {"type": "string", "format": "duration"}, + "start_period": {"type": "string", "format": "duration"} + } + }, + "deployment": { + "id": "#/definitions/deployment", + "type": ["object", "null"], + "properties": { + "mode": {"type": "string"}, + "endpoint_mode": {"type": "string"}, + "replicas": {"type": "integer"}, + "labels": {"$ref": "#/definitions/list_or_dict"}, + "rollback_config": { + "type": "object", + "properties": { + "parallelism": {"type": "integer"}, + "delay": {"type": "string", "format": "duration"}, + "failure_action": {"type": "string"}, + "monitor": {"type": "string", "format": "duration"}, + "max_failure_ratio": {"type": "number"}, + "order": {"type": "string", "enum": [ + "start-first", "stop-first" + ]} + }, + "additionalProperties": false + }, + "update_config": { + "type": "object", + "properties": { + "parallelism": {"type": "integer"}, + "delay": {"type": "string", "format": "duration"}, + "failure_action": {"type": "string"}, + "monitor": {"type": "string", "format": "duration"}, + "max_failure_ratio": {"type": "number"}, + "order": {"type": "string", "enum": [ + "start-first", "stop-first" + ]} + }, + "additionalProperties": false + }, + "resources": { + "type": "object", + "properties": { + "limits": { + "type": "object", + "properties": { + "cpus": {"type": "string"}, + "memory": {"type": "string"} + }, + "additionalProperties": false + }, + "reservations": { + "type": "object", + "properties": { + "cpus": {"type": "string"}, + "memory": {"type": "string"}, + "generic_resources": {"$ref": "#/definitions/generic_resources"} + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "restart_policy": { + "type": "object", + "properties": { + "condition": {"type": "string"}, + "delay": {"type": "string", "format": "duration"}, + "max_attempts": {"type": "integer"}, + "window": {"type": "string", "format": "duration"} + }, + "additionalProperties": false + }, + "placement": { + "type": "object", + "properties": { + "constraints": {"type": "array", "items": {"type": "string"}}, + "preferences": { + "type": "array", + "items": { + "type": "object", + "properties": { + "spread": {"type": "string"} + }, + "additionalProperties": false + } + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + + "generic_resources": { + "id": "#/definitions/generic_resources", + "type": "array", + "items": { + "type": "object", + "properties": { + "discrete_resource_spec": { + "type": "object", + "properties": { + "kind": {"type": "string"}, + "value": {"type": "number"} + }, + "additionalProperties": false + } + }, + "additionalProperties": false + } + }, + + "network": { + "id": "#/definitions/network", + "type": ["object", "null"], + "properties": { + "name": {"type": "string"}, + "driver": {"type": "string"}, + "driver_opts": { + "type": "object", + "patternProperties": { + "^.+$": {"type": ["string", "number"]} + } + }, + "ipam": { + "type": "object", + "properties": { + "driver": {"type": "string"}, + "config": { + "type": "array", + "items": { + "type": "object", + "properties": { + "subnet": {"type": "string"} + }, + "additionalProperties": false + } + } + }, + "additionalProperties": false + }, + "external": { + "type": ["boolean", "object"], + "properties": { + "name": {"type": "string"} + }, + "additionalProperties": false + }, + "internal": {"type": "boolean"}, + "attachable": {"type": "boolean"}, + "labels": {"$ref": "#/definitions/list_or_dict"} + }, + "patternProperties": {"^x-": {}}, + "additionalProperties": false + }, + + "volume": { + "id": "#/definitions/volume", + "type": ["object", "null"], + "properties": { + "name": {"type": "string"}, + "driver": {"type": "string"}, + "driver_opts": { + "type": "object", + "patternProperties": { + "^.+$": {"type": ["string", "number"]} + } + }, + "external": { + "type": ["boolean", "object"], + "properties": { + "name": {"type": "string"} + }, + "additionalProperties": false + }, + "labels": {"$ref": "#/definitions/list_or_dict"} + }, + "patternProperties": {"^x-": {}}, + "additionalProperties": false + }, + + "secret": { + "id": "#/definitions/secret", + "type": "object", + "properties": { + "name": {"type": "string"}, + "file": {"type": "string"}, + "external": { + "type": ["boolean", "object"], + "properties": { + "name": {"type": "string"} + } + }, + "labels": {"$ref": "#/definitions/list_or_dict"} + }, + "patternProperties": {"^x-": {}}, + "additionalProperties": false + }, + + "config": { + "id": "#/definitions/config", + "type": "object", + "properties": { + "name": {"type": "string"}, + "file": {"type": "string"}, + "external": { + "type": ["boolean", "object"], + "properties": { + "name": {"type": "string"} + } + }, + "labels": {"$ref": "#/definitions/list_or_dict"} + }, + "patternProperties": {"^x-": {}}, + "additionalProperties": false + }, + + "string_or_list": { + "oneOf": [ + {"type": "string"}, + {"$ref": "#/definitions/list_of_strings"} + ] + }, + + "list_of_strings": { + "type": "array", + "items": {"type": "string"}, + "uniqueItems": true + }, + + "list_or_dict": { + "oneOf": [ + { + "type": "object", + "patternProperties": { + ".+": { + "type": ["string", "number", "null"] + } + }, + "additionalProperties": false + }, + {"type": "array", "items": {"type": "string"}, "uniqueItems": true} + ] + }, + + "constraints": { + "service": { + "id": "#/definitions/constraints/service", + "anyOf": [ + {"required": ["build"]}, + {"required": ["image"]} + ], + "properties": { + "build": { + "required": ["context"] + } + } + } + } + } +} diff --git a/cli/compose/schema/schema.go b/cli/compose/schema/schema.go index 45b719d79d3d..d940f5a54afa 100644 --- a/cli/compose/schema/schema.go +++ b/cli/compose/schema/schema.go @@ -30,10 +30,17 @@ func (checker durationFormatChecker) IsFormat(input string) bool { return err == nil } +type autoRangeFormatChecker struct{} + +func (checker autoRangeFormatChecker) IsFormat(input string) bool { + return true +} + func init() { gojsonschema.FormatCheckers.Add("expose", portsFormatChecker{}) gojsonschema.FormatCheckers.Add("ports", portsFormatChecker{}) gojsonschema.FormatCheckers.Add("duration", durationFormatChecker{}) + gojsonschema.FormatCheckers.Add("autorange", autoRangeFormatChecker{}) } // Version returns the version of the config, defaulting to version 1.0 diff --git a/cli/compose/schema/schema_test.go b/cli/compose/schema/schema_test.go index bb15098b2835..def177832458 100644 --- a/cli/compose/schema/schema_test.go +++ b/cli/compose/schema/schema_test.go @@ -103,6 +103,7 @@ func TestValidateCredentialSpecs(t *testing.T) { {version: "3.5", expectedErr: "config"}, {version: "3.6", expectedErr: "config"}, {version: "3.7", expectedErr: "config"}, + {version: "3.8", expectedErr: "config"}, } for _, tc := range tests { diff --git a/cli/compose/types/types.go b/cli/compose/types/types.go index e427cdba4209..af48e905dd9f 100644 --- a/cli/compose/types/types.go +++ b/cli/compose/types/types.go @@ -153,6 +153,9 @@ func (s Services) MarshalJSON() ([]byte, error) { return json.MarshalIndent(data, "", " ") } +// AutoRange is a map containing the autorange configuration from docker-compose.yml +type AutoRange map[string]map[string]string + // ServiceConfig is the configuration of one service type ServiceConfig struct { Name string `yaml:"-" json:"-"` @@ -208,6 +211,7 @@ type ServiceConfig struct { UserNSMode string `mapstructure:"userns_mode" yaml:"userns_mode,omitempty" json:"userns_mode,omitempty"` Volumes []ServiceVolumeConfig `yaml:",omitempty" json:"volumes,omitempty"` WorkingDir string `mapstructure:"working_dir" yaml:"working_dir,omitempty" json:"working_dir,omitempty"` + AutoRange AutoRange `yaml:",omitempty" json:"autorange,omitempty"` Extras map[string]interface{} `yaml:",inline" json:"-"` } diff --git a/cli/version.go b/cli/version.go new file mode 100644 index 000000000000..c4120b9585fb --- /dev/null +++ b/cli/version.go @@ -0,0 +1,10 @@ +package cli + +// Default build-time variable. +// These values are overridden via ldflags +var ( + PlatformName = "" + Version = "unknown-version" + GitCommit = "unknown-commit" + BuildTime = "unknown-buildtime" +) diff --git a/docs/reference/commandline/build.md b/docs/reference/commandline/build.md index a2f4763f8479..21220c631d86 100644 --- a/docs/reference/commandline/build.md +++ b/docs/reference/commandline/build.md @@ -504,13 +504,13 @@ stable. Squashing layers can be beneficial if your Dockerfile produces multiple layers -modifying the same files, for example, file that are created in one step, and +modifying the same files, for example, files that are created in one step, and removed in another step. For other use-cases, squashing images may actually have a negative impact on performance; when pulling an image consisting of multiple layers, layers can be pulled in parallel, and allows sharing layers between images (saving space). -For most use cases, multi-stage are a better alternative, as they give more +For most use cases, multi-stage builds are a better alternative, as they give more fine-grained control over your build, and can take advantage of future optimizations in the builder. Refer to the [use multi-stage builds](https://docs.docker.com/develop/develop-images/multistage-build/) section in the userguide for more information. @@ -531,7 +531,7 @@ The `--squash` option has a number of known limitations: downloading a single layer cannot be parallelized. - When attempting to squash an image that does not make changes to the filesystem (for example, the Dockerfile only contains `ENV` instructions), - the squash step will fail (see [issue #33823](https://github.com/moby/moby/issues/33823) + the squash step will fail (see [issue #33823](https://github.com/moby/moby/issues/33823)). #### Prerequisites diff --git a/scripts/test/unit b/scripts/test/unit new file mode 100755 index 000000000000..7eb82d0ff037 --- /dev/null +++ b/scripts/test/unit @@ -0,0 +1,4 @@ +#!/usr/bin/env bash +set -eu -o pipefail + +go test -v "$@" diff --git a/scripts/test/unit-with-coverage b/scripts/test/unit-with-coverage new file mode 100755 index 000000000000..db2efe785304 --- /dev/null +++ b/scripts/test/unit-with-coverage @@ -0,0 +1,20 @@ +#!/usr/bin/env bash +set -eu -o pipefail + +# install test dependencies once before running tests for each package. This +# reduces the runtime from 200s down to 23s +go test -i "$@" + +echo "mode: atomic" > coverage.txt +for pkg in "$@"; do + ./scripts/test/unit \ + -cover \ + -coverprofile=profile.out \ + -covermode=atomic \ + "${pkg}" + + if test -f profile.out; then + grep -v "^mode:" < profile.out >> coverage.txt || true + rm profile.out + fi +done diff --git a/vendor.conf b/vendor.conf index c0264a0f1a24..ebce48b2c77f 100755 --- a/vendor.conf +++ b/vendor.conf @@ -14,7 +14,7 @@ github.com/cpuguy83/go-md2man v1.0.8 github.com/davecgh/go-spew 346938d642f2ec3594ed81d874461961cd0faa76 # v1.1.0 github.com/dgrijalva/jwt-go a2c85815a77d0f951e33ba4db5ae93629a1530af github.com/docker/distribution 83389a148052d74ac602f5f1d62f86ff2f3c4aa5 -github.com/docker/docker 50e63adf30d33fc1547527a4097c796cbe4b770f +github.com/docker/docker f7974e5966bd62c078da2431cf2da4bb3e1f6ad2 https://github.com/vdaviot/engine.git github.com/docker/compose-on-kubernetes 356b2919c496f7e988f6e0dfe7e67d919602e14e # master w/ v1alpha3+pullsecrets+pull-policy github.com/docker/docker-credential-helpers 5241b46610f2491efdf9d1c85f1ddf5b02f6d962 # the docker/go package contains a customized version of canonical/json @@ -26,7 +26,7 @@ github.com/docker/go-metrics d466d4f6fd960e01820085bd7e1a24426ee7ef18 github.com/docker/go-units 47565b4f722fb6ceae66b95f853feed578a4a51c # v0.3.3 github.com/docker/libtrust 9cbd2a1374f46905c68a4eb3694a130610adc62a github.com/docker/licensing 1c117a1720cb413dd6a101d36a6c567b1ccb90fe -github.com/docker/swarmkit ebfb0aa1118ebfd35a224d72a5d337ce0addd907 +github.com/docker/swarmkit c846e6ee19759ff97f57f7fcea5de0978ffd6d16 https://github.com/vdaviot/swarmkit.git github.com/flynn-archive/go-shlex 3f9db97f856818214da2e1057f8ad84803971cff github.com/ghodss/yaml 0ca9ea5df5451ffdf184b4428c902747c2c11cd7 # v1.0.0 github.com/gogo/googleapis 08a7655d27152912db7aaf4f983275eaf8d128ef diff --git a/vendor/github.com/docker/docker/api/types/seccomp.go b/vendor/github.com/docker/docker/api/types/seccomp.go index 67a41e1a89e8..2259c6be1e65 100644 --- a/vendor/github.com/docker/docker/api/types/seccomp.go +++ b/vendor/github.com/docker/docker/api/types/seccomp.go @@ -77,8 +77,9 @@ type Arg struct { // Filter is used to conditionally apply Seccomp rules type Filter struct { - Caps []string `json:"caps,omitempty"` - Arches []string `json:"arches,omitempty"` + Caps []string `json:"caps,omitempty"` + Arches []string `json:"arches,omitempty"` + MinKernel string `json:"minKernel,omitempty"` } // Syscall is used to match a group of syscalls in Seccomp diff --git a/vendor/github.com/docker/docker/api/types/stats.go b/vendor/github.com/docker/docker/api/types/stats.go index 20daebed14bd..ca5daad32643 100644 --- a/vendor/github.com/docker/docker/api/types/stats.go +++ b/vendor/github.com/docker/docker/api/types/stats.go @@ -169,6 +169,8 @@ type Stats struct { MemoryStats MemoryStats `json:"memory_stats,omitempty"` } +type AutoRange map[string]map[string]string + // StatsJSON is newly used Networks type StatsJSON struct { Stats @@ -176,6 +178,8 @@ type StatsJSON struct { Name string `json:"name,omitempty"` ID string `json:"id,omitempty"` + AutoRange `json:"autorange,omitempty"` + // Networks request version >=1.21 Networks map[string]NetworkStats `json:"networks,omitempty"` } diff --git a/vendor/github.com/docker/docker/api/types/swarm/service.go b/vendor/github.com/docker/docker/api/types/swarm/service.go index abf192e75941..be44d5097fd2 100644 --- a/vendor/github.com/docker/docker/api/types/swarm/service.go +++ b/vendor/github.com/docker/docker/api/types/swarm/service.go @@ -2,6 +2,8 @@ package swarm // import "github.com/docker/docker/api/types/swarm" import "time" +type AutoRange map[string]map[string]string + // Service represents a service. type Service struct { ID string @@ -28,6 +30,7 @@ type ServiceSpec struct { // This field will be removed in a future release. Networks []NetworkAttachmentConfig `json:",omitempty"` EndpointSpec *EndpointSpec `json:",omitempty"` + AutoRange AutoRange `json:",omitempty"` } // ServiceMode represents the mode of a service. diff --git a/vendor/github.com/docker/docker/api/types/swarm/task.go b/vendor/github.com/docker/docker/api/types/swarm/task.go index d5a57df5db5a..a4174414b8d8 100644 --- a/vendor/github.com/docker/docker/api/types/swarm/task.go +++ b/vendor/github.com/docker/docker/api/types/swarm/task.go @@ -83,6 +83,9 @@ type TaskSpec struct { ForceUpdate uint64 Runtime RuntimeType `json:",omitempty"` + + // Autorange propagation from ServiceSpec to TaskSpec + AutoRange AutoRange `json:",omitempty"` } // Resources represents resources (CPU/Memory). diff --git a/vendor/github.com/docker/docker/api/types/types.go b/vendor/github.com/docker/docker/api/types/types.go index dabcd46056d2..a78c2b3e6132 100644 --- a/vendor/github.com/docker/docker/api/types/types.go +++ b/vendor/github.com/docker/docker/api/types/types.go @@ -58,6 +58,7 @@ type ImageMetadata struct { type Container struct { ID string `json:"Id"` Names []string + AutoRange AutoRange Image string ImageID string Command string diff --git a/vendor/github.com/docker/docker/pkg/homedir/homedir_linux.go b/vendor/github.com/docker/docker/pkg/homedir/homedir_linux.go index ee15ed52b164..47ecd0c092b2 100644 --- a/vendor/github.com/docker/docker/pkg/homedir/homedir_linux.go +++ b/vendor/github.com/docker/docker/pkg/homedir/homedir_linux.go @@ -1,7 +1,10 @@ package homedir // import "github.com/docker/docker/pkg/homedir" import ( + "errors" "os" + "path/filepath" + "strings" "github.com/docker/docker/pkg/idtools" ) @@ -19,3 +22,88 @@ func GetStatic() (string, error) { } return usr.Home, nil } + +// GetRuntimeDir returns XDG_RUNTIME_DIR. +// XDG_RUNTIME_DIR is typically configured via pam_systemd. +// GetRuntimeDir returns non-nil error if XDG_RUNTIME_DIR is not set. +// +// See also https://standards.freedesktop.org/basedir-spec/latest/ar01s03.html +func GetRuntimeDir() (string, error) { + if xdgRuntimeDir := os.Getenv("XDG_RUNTIME_DIR"); xdgRuntimeDir != "" { + return xdgRuntimeDir, nil + } + return "", errors.New("could not get XDG_RUNTIME_DIR") +} + +// StickRuntimeDirContents sets the sticky bit on files that are under +// XDG_RUNTIME_DIR, so that the files won't be periodically removed by the system. +// +// StickyRuntimeDir returns slice of sticked files. +// StickyRuntimeDir returns nil error if XDG_RUNTIME_DIR is not set. +// +// See also https://standards.freedesktop.org/basedir-spec/latest/ar01s03.html +func StickRuntimeDirContents(files []string) ([]string, error) { + runtimeDir, err := GetRuntimeDir() + if err != nil { + // ignore error if runtimeDir is empty + return nil, nil + } + runtimeDir, err = filepath.Abs(runtimeDir) + if err != nil { + return nil, err + } + var sticked []string + for _, f := range files { + f, err = filepath.Abs(f) + if err != nil { + return sticked, err + } + if strings.HasPrefix(f, runtimeDir+"/") { + if err = stick(f); err != nil { + return sticked, err + } + sticked = append(sticked, f) + } + } + return sticked, nil +} + +func stick(f string) error { + st, err := os.Stat(f) + if err != nil { + return err + } + m := st.Mode() + m |= os.ModeSticky + return os.Chmod(f, m) +} + +// GetDataHome returns XDG_DATA_HOME. +// GetDataHome returns $HOME/.local/share and nil error if XDG_DATA_HOME is not set. +// +// See also https://standards.freedesktop.org/basedir-spec/latest/ar01s03.html +func GetDataHome() (string, error) { + if xdgDataHome := os.Getenv("XDG_DATA_HOME"); xdgDataHome != "" { + return xdgDataHome, nil + } + home := os.Getenv("HOME") + if home == "" { + return "", errors.New("could not get either XDG_DATA_HOME or HOME") + } + return filepath.Join(home, ".local", "share"), nil +} + +// GetConfigHome returns XDG_CONFIG_HOME. +// GetConfigHome returns $HOME/.config and nil error if XDG_CONFIG_HOME is not set. +// +// See also https://standards.freedesktop.org/basedir-spec/latest/ar01s03.html +func GetConfigHome() (string, error) { + if xdgConfigHome := os.Getenv("XDG_CONFIG_HOME"); xdgConfigHome != "" { + return xdgConfigHome, nil + } + home := os.Getenv("HOME") + if home == "" { + return "", errors.New("could not get either XDG_CONFIG_HOME or HOME") + } + return filepath.Join(home, ".config"), nil +} diff --git a/vendor/github.com/docker/docker/pkg/homedir/homedir_others.go b/vendor/github.com/docker/docker/pkg/homedir/homedir_others.go index 75ada2fe5460..f0a363dedf34 100644 --- a/vendor/github.com/docker/docker/pkg/homedir/homedir_others.go +++ b/vendor/github.com/docker/docker/pkg/homedir/homedir_others.go @@ -11,3 +11,23 @@ import ( func GetStatic() (string, error) { return "", errors.New("homedir.GetStatic() is not supported on this system") } + +// GetRuntimeDir is unsupported on non-linux system. +func GetRuntimeDir() (string, error) { + return "", errors.New("homedir.GetRuntimeDir() is not supported on this system") +} + +// StickRuntimeDirContents is unsupported on non-linux system. +func StickRuntimeDirContents(files []string) ([]string, error) { + return nil, errors.New("homedir.StickRuntimeDirContents() is not supported on this system") +} + +// GetDataHome is unsupported on non-linux system. +func GetDataHome() (string, error) { + return "", errors.New("homedir.GetDataHome() is not supported on this system") +} + +// GetConfigHome is unsupported on non-linux system. +func GetConfigHome() (string, error) { + return "", errors.New("homedir.GetConfigHome() is not supported on this system") +} diff --git a/vendor/github.com/docker/docker/vendor.conf b/vendor/github.com/docker/docker/vendor.conf index 3ee53cf556a3..4e3b6df0a415 100644 --- a/vendor/github.com/docker/docker/vendor.conf +++ b/vendor/github.com/docker/docker/vendor.conf @@ -1,6 +1,6 @@ # the following lines are in sorted order, FYI github.com/Azure/go-ansiterm d6e3b3328b783f23731bc4d058875b0371ff8109 -github.com/Microsoft/hcsshim v0.8.3 +github.com/Microsoft/hcsshim v0.8.6 github.com/Microsoft/go-winio v0.4.11 github.com/docker/libtrust 9cbd2a1374f46905c68a4eb3694a130610adc62a github.com/go-check/check 4ed411733c5785b40214c70bce814c3a3a689609 https://github.com/cpuguy83/check.git @@ -130,7 +130,7 @@ github.com/containerd/ttrpc 2a805f71863501300ae1976d29f0454ae003e85a github.com/gogo/googleapis 08a7655d27152912db7aaf4f983275eaf8d128ef # cluster -github.com/docker/swarmkit ebfb0aa1118ebfd35a224d72a5d337ce0addd907 +github.com/docker/swarmkit c846e6ee19759ff97f57f7fcea5de0978ffd6d16 https://github.com/vdaviot/swarmkit.git github.com/gogo/protobuf v1.0.0 github.com/cloudflare/cfssl 1.3.2 github.com/fernet/fernet-go 1b2437bc582b3cfbb341ee5a29f8ef5b42912ff2 diff --git a/vendor/github.com/docker/swarmkit/api/ca.pb.go b/vendor/github.com/docker/swarmkit/api/ca.pb.go index 206ba213a5e8..694b6b6ad180 100644 --- a/vendor/github.com/docker/swarmkit/api/ca.pb.go +++ b/vendor/github.com/docker/swarmkit/api/ca.pb.go @@ -145,6 +145,8 @@ Snapshot NodeSpec ServiceSpec + Range + AutoRange ReplicatedService GlobalService TaskSpec diff --git a/vendor/github.com/docker/swarmkit/api/specs.pb.go b/vendor/github.com/docker/swarmkit/api/specs.pb.go index 3adb9129b093..13a09028fcf8 100644 --- a/vendor/github.com/docker/swarmkit/api/specs.pb.go +++ b/vendor/github.com/docker/swarmkit/api/specs.pb.go @@ -100,7 +100,7 @@ func (x ContainerSpec_Isolation) String() string { return proto.EnumName(ContainerSpec_Isolation_name, int32(x)) } func (ContainerSpec_Isolation) EnumDescriptor() ([]byte, []int) { - return fileDescriptorSpecs, []int{8, 0} + return fileDescriptorSpecs, []int{10, 0} } // ResolutionMode specifies the mode of resolution to use for @@ -136,7 +136,7 @@ func (x EndpointSpec_ResolutionMode) String() string { return proto.EnumName(EndpointSpec_ResolutionMode_name, int32(x)) } func (EndpointSpec_ResolutionMode) EnumDescriptor() ([]byte, []int) { - return fileDescriptorSpecs, []int{9, 0} + return fileDescriptorSpecs, []int{11, 0} } type NodeSpec struct { @@ -180,7 +180,8 @@ type ServiceSpec struct { Networks []*NetworkAttachmentConfig `protobuf:"bytes,7,rep,name=networks" json:"networks,omitempty"` // Service endpoint specifies the user provided configuration // to properly discover and load balance a service. - Endpoint *EndpointSpec `protobuf:"bytes,8,opt,name=endpoint" json:"endpoint,omitempty"` + Endpoint *EndpointSpec `protobuf:"bytes,8,opt,name=endpoint" json:"endpoint,omitempty"` + AutoRange *AutoRange `protobuf:"bytes,10,opt,name=AutoRange" json:"AutoRange,omitempty"` } func (m *ServiceSpec) Reset() { *m = ServiceSpec{} } @@ -298,6 +299,22 @@ func _ServiceSpec_OneofSizer(msg proto.Message) (n int) { return n } +type Range struct { + Step map[string]string `protobuf:"bytes,1,rep,name=Step" json:"Step,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (m *Range) Reset() { *m = Range{} } +func (*Range) ProtoMessage() {} +func (*Range) Descriptor() ([]byte, []int) { return fileDescriptorSpecs, []int{2} } + +type AutoRange struct { + Range map[string]*Range `protobuf:"bytes,1,rep,name=Range" json:"Range,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` +} + +func (m *AutoRange) Reset() { *m = AutoRange{} } +func (*AutoRange) ProtoMessage() {} +func (*AutoRange) Descriptor() ([]byte, []int) { return fileDescriptorSpecs, []int{3} } + // ReplicatedService sets the reconciliation target to certain number of replicas. type ReplicatedService struct { Replicas uint64 `protobuf:"varint,1,opt,name=replicas,proto3" json:"replicas,omitempty"` @@ -305,7 +322,7 @@ type ReplicatedService struct { func (m *ReplicatedService) Reset() { *m = ReplicatedService{} } func (*ReplicatedService) ProtoMessage() {} -func (*ReplicatedService) Descriptor() ([]byte, []int) { return fileDescriptorSpecs, []int{2} } +func (*ReplicatedService) Descriptor() ([]byte, []int) { return fileDescriptorSpecs, []int{4} } // GlobalService represents global service. type GlobalService struct { @@ -313,7 +330,7 @@ type GlobalService struct { func (m *GlobalService) Reset() { *m = GlobalService{} } func (*GlobalService) ProtoMessage() {} -func (*GlobalService) Descriptor() ([]byte, []int) { return fileDescriptorSpecs, []int{3} } +func (*GlobalService) Descriptor() ([]byte, []int) { return fileDescriptorSpecs, []int{5} } type TaskSpec struct { // Types that are valid to be assigned to Runtime: @@ -348,11 +365,12 @@ type TaskSpec struct { // // ResourceReferences is a list of ResourceReferences used by the task. ResourceReferences []ResourceReference `protobuf:"bytes,11,rep,name=resource_references,json=resourceReferences" json:"resource_references"` + AutoRange *AutoRange `protobuf:"bytes,12,opt,name=AutoRange" json:"AutoRange,omitempty"` } func (m *TaskSpec) Reset() { *m = TaskSpec{} } func (*TaskSpec) ProtoMessage() {} -func (*TaskSpec) Descriptor() ([]byte, []int) { return fileDescriptorSpecs, []int{4} } +func (*TaskSpec) Descriptor() ([]byte, []int) { return fileDescriptorSpecs, []int{6} } type isTaskSpec_Runtime interface { isTaskSpec_Runtime() @@ -502,7 +520,7 @@ type ResourceReference struct { func (m *ResourceReference) Reset() { *m = ResourceReference{} } func (*ResourceReference) ProtoMessage() {} -func (*ResourceReference) Descriptor() ([]byte, []int) { return fileDescriptorSpecs, []int{5} } +func (*ResourceReference) Descriptor() ([]byte, []int) { return fileDescriptorSpecs, []int{7} } type GenericRuntimeSpec struct { Kind string `protobuf:"bytes,1,opt,name=kind,proto3" json:"kind,omitempty"` @@ -511,7 +529,7 @@ type GenericRuntimeSpec struct { func (m *GenericRuntimeSpec) Reset() { *m = GenericRuntimeSpec{} } func (*GenericRuntimeSpec) ProtoMessage() {} -func (*GenericRuntimeSpec) Descriptor() ([]byte, []int) { return fileDescriptorSpecs, []int{6} } +func (*GenericRuntimeSpec) Descriptor() ([]byte, []int) { return fileDescriptorSpecs, []int{8} } // NetworkAttachmentSpec specifies runtime parameters required to attach // a container to a network. @@ -523,7 +541,7 @@ type NetworkAttachmentSpec struct { func (m *NetworkAttachmentSpec) Reset() { *m = NetworkAttachmentSpec{} } func (*NetworkAttachmentSpec) ProtoMessage() {} -func (*NetworkAttachmentSpec) Descriptor() ([]byte, []int) { return fileDescriptorSpecs, []int{7} } +func (*NetworkAttachmentSpec) Descriptor() ([]byte, []int) { return fileDescriptorSpecs, []int{9} } // Container specifies runtime parameters for a container. type ContainerSpec struct { @@ -642,11 +660,12 @@ type ContainerSpec struct { // to the container OS's default - generally 60, or the value predefined in // the image; set to -1 to unset a previously set value MemorySwappiness *google_protobuf4.Int64Value `protobuf:"bytes,28,opt,name=memory_swappiness,json=memorySwappiness" json:"memory_swappiness,omitempty"` + AutoRange *AutoRange `protobuf:"bytes,29,opt,name=AutoRange" json:"AutoRange,omitempty"` } func (m *ContainerSpec) Reset() { *m = ContainerSpec{} } func (*ContainerSpec) ProtoMessage() {} -func (*ContainerSpec) Descriptor() ([]byte, []int) { return fileDescriptorSpecs, []int{8} } +func (*ContainerSpec) Descriptor() ([]byte, []int) { return fileDescriptorSpecs, []int{10} } // PullOptions allows one to parameterize an image pull. type ContainerSpec_PullOptions struct { @@ -660,7 +679,7 @@ type ContainerSpec_PullOptions struct { func (m *ContainerSpec_PullOptions) Reset() { *m = ContainerSpec_PullOptions{} } func (*ContainerSpec_PullOptions) ProtoMessage() {} func (*ContainerSpec_PullOptions) Descriptor() ([]byte, []int) { - return fileDescriptorSpecs, []int{8, 1} + return fileDescriptorSpecs, []int{10, 1} } // DNSConfig specifies DNS related configurations in resolver configuration file (resolv.conf) @@ -678,7 +697,7 @@ type ContainerSpec_DNSConfig struct { func (m *ContainerSpec_DNSConfig) Reset() { *m = ContainerSpec_DNSConfig{} } func (*ContainerSpec_DNSConfig) ProtoMessage() {} -func (*ContainerSpec_DNSConfig) Descriptor() ([]byte, []int) { return fileDescriptorSpecs, []int{8, 2} } +func (*ContainerSpec_DNSConfig) Descriptor() ([]byte, []int) { return fileDescriptorSpecs, []int{10, 2} } // EndpointSpec defines the properties that can be configured to // access and loadbalance the service. @@ -691,7 +710,7 @@ type EndpointSpec struct { func (m *EndpointSpec) Reset() { *m = EndpointSpec{} } func (*EndpointSpec) ProtoMessage() {} -func (*EndpointSpec) Descriptor() ([]byte, []int) { return fileDescriptorSpecs, []int{9} } +func (*EndpointSpec) Descriptor() ([]byte, []int) { return fileDescriptorSpecs, []int{11} } // NetworkSpec specifies user defined network parameters. type NetworkSpec struct { @@ -726,7 +745,7 @@ type NetworkSpec struct { func (m *NetworkSpec) Reset() { *m = NetworkSpec{} } func (*NetworkSpec) ProtoMessage() {} -func (*NetworkSpec) Descriptor() ([]byte, []int) { return fileDescriptorSpecs, []int{10} } +func (*NetworkSpec) Descriptor() ([]byte, []int) { return fileDescriptorSpecs, []int{12} } type isNetworkSpec_ConfigFrom interface { isNetworkSpec_ConfigFrom() @@ -828,7 +847,7 @@ type ClusterSpec struct { func (m *ClusterSpec) Reset() { *m = ClusterSpec{} } func (*ClusterSpec) ProtoMessage() {} -func (*ClusterSpec) Descriptor() ([]byte, []int) { return fileDescriptorSpecs, []int{11} } +func (*ClusterSpec) Descriptor() ([]byte, []int) { return fileDescriptorSpecs, []int{13} } // SecretSpec specifies a user-provided secret. type SecretSpec struct { @@ -847,7 +866,7 @@ type SecretSpec struct { func (m *SecretSpec) Reset() { *m = SecretSpec{} } func (*SecretSpec) ProtoMessage() {} -func (*SecretSpec) Descriptor() ([]byte, []int) { return fileDescriptorSpecs, []int{12} } +func (*SecretSpec) Descriptor() ([]byte, []int) { return fileDescriptorSpecs, []int{14} } // ConfigSpec specifies user-provided configuration files. type ConfigSpec struct { @@ -866,11 +885,13 @@ type ConfigSpec struct { func (m *ConfigSpec) Reset() { *m = ConfigSpec{} } func (*ConfigSpec) ProtoMessage() {} -func (*ConfigSpec) Descriptor() ([]byte, []int) { return fileDescriptorSpecs, []int{13} } +func (*ConfigSpec) Descriptor() ([]byte, []int) { return fileDescriptorSpecs, []int{15} } func init() { proto.RegisterType((*NodeSpec)(nil), "docker.swarmkit.v1.NodeSpec") proto.RegisterType((*ServiceSpec)(nil), "docker.swarmkit.v1.ServiceSpec") + proto.RegisterType((*Range)(nil), "docker.swarmkit.v1.Range") + proto.RegisterType((*AutoRange)(nil), "docker.swarmkit.v1.AutoRange") proto.RegisterType((*ReplicatedService)(nil), "docker.swarmkit.v1.ReplicatedService") proto.RegisterType((*GlobalService)(nil), "docker.swarmkit.v1.GlobalService") proto.RegisterType((*TaskSpec)(nil), "docker.swarmkit.v1.TaskSpec") @@ -942,6 +963,10 @@ func (m *ServiceSpec) CopyFrom(src interface{}) { m.Endpoint = &EndpointSpec{} deepcopy.Copy(m.Endpoint, o.Endpoint) } + if o.AutoRange != nil { + m.AutoRange = &AutoRange{} + deepcopy.Copy(m.AutoRange, o.AutoRange) + } if o.Mode != nil { switch o.Mode.(type) { case *ServiceSpec_Replicated: @@ -961,6 +986,51 @@ func (m *ServiceSpec) CopyFrom(src interface{}) { } +func (m *Range) Copy() *Range { + if m == nil { + return nil + } + o := &Range{} + o.CopyFrom(m) + return o +} + +func (m *Range) CopyFrom(src interface{}) { + + o := src.(*Range) + *m = *o + if o.Step != nil { + m.Step = make(map[string]string, len(o.Step)) + for k, v := range o.Step { + m.Step[k] = v + } + } + +} + +func (m *AutoRange) Copy() *AutoRange { + if m == nil { + return nil + } + o := &AutoRange{} + o.CopyFrom(m) + return o +} + +func (m *AutoRange) CopyFrom(src interface{}) { + + o := src.(*AutoRange) + *m = *o + if o.Range != nil { + m.Range = make(map[string]*Range, len(o.Range)) + for k, v := range o.Range { + m.Range[k] = &Range{} + deepcopy.Copy(m.Range[k], v) + } + } + +} + func (m *ReplicatedService) Copy() *ReplicatedService { if m == nil { return nil @@ -1030,6 +1100,10 @@ func (m *TaskSpec) CopyFrom(src interface{}) { } } + if o.AutoRange != nil { + m.AutoRange = &AutoRange{} + deepcopy.Copy(m.AutoRange, o.AutoRange) + } if o.Runtime != nil { switch o.Runtime.(type) { case *TaskSpec_Attachment: @@ -1207,6 +1281,10 @@ func (m *ContainerSpec) CopyFrom(src interface{}) { m.MemorySwappiness = &google_protobuf4.Int64Value{} deepcopy.Copy(m.MemorySwappiness, o.MemorySwappiness) } + if o.AutoRange != nil { + m.AutoRange = &AutoRange{} + deepcopy.Copy(m.AutoRange, o.AutoRange) + } } func (m *ContainerSpec_PullOptions) Copy() *ContainerSpec_PullOptions { @@ -1507,6 +1585,16 @@ func (m *ServiceSpec) MarshalTo(dAtA []byte) (int, error) { } i += n7 } + if m.AutoRange != nil { + dAtA[i] = 0x52 + i++ + i = encodeVarintSpecs(dAtA, i, uint64(m.AutoRange.Size())) + n8, err := m.AutoRange.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n8 + } return i, nil } @@ -1516,11 +1604,11 @@ func (m *ServiceSpec_Replicated) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x1a i++ i = encodeVarintSpecs(dAtA, i, uint64(m.Replicated.Size())) - n8, err := m.Replicated.MarshalTo(dAtA[i:]) + n9, err := m.Replicated.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n8 + i += n9 } return i, nil } @@ -1530,14 +1618,95 @@ func (m *ServiceSpec_Global) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x22 i++ i = encodeVarintSpecs(dAtA, i, uint64(m.Global.Size())) - n9, err := m.Global.MarshalTo(dAtA[i:]) + n10, err := m.Global.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n9 + i += n10 + } + return i, nil +} +func (m *Range) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Range) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Step) > 0 { + for k, _ := range m.Step { + dAtA[i] = 0xa + i++ + v := m.Step[k] + mapSize := 1 + len(k) + sovSpecs(uint64(len(k))) + 1 + len(v) + sovSpecs(uint64(len(v))) + i = encodeVarintSpecs(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintSpecs(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x12 + i++ + i = encodeVarintSpecs(dAtA, i, uint64(len(v))) + i += copy(dAtA[i:], v) + } + } + return i, nil +} + +func (m *AutoRange) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *AutoRange) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Range) > 0 { + for k, _ := range m.Range { + dAtA[i] = 0xa + i++ + v := m.Range[k] + msgSize := 0 + if v != nil { + msgSize = v.Size() + msgSize += 1 + sovSpecs(uint64(msgSize)) + } + mapSize := 1 + len(k) + sovSpecs(uint64(len(k))) + msgSize + i = encodeVarintSpecs(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintSpecs(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + if v != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintSpecs(dAtA, i, uint64(v.Size())) + n11, err := v.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n11 + } + } } return i, nil } + func (m *ReplicatedService) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1595,51 +1764,51 @@ func (m *TaskSpec) MarshalTo(dAtA []byte) (int, error) { var l int _ = l if m.Runtime != nil { - nn10, err := m.Runtime.MarshalTo(dAtA[i:]) + nn12, err := m.Runtime.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += nn10 + i += nn12 } if m.Resources != nil { dAtA[i] = 0x12 i++ i = encodeVarintSpecs(dAtA, i, uint64(m.Resources.Size())) - n11, err := m.Resources.MarshalTo(dAtA[i:]) + n13, err := m.Resources.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n11 + i += n13 } if m.Restart != nil { dAtA[i] = 0x22 i++ i = encodeVarintSpecs(dAtA, i, uint64(m.Restart.Size())) - n12, err := m.Restart.MarshalTo(dAtA[i:]) + n14, err := m.Restart.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n12 + i += n14 } if m.Placement != nil { dAtA[i] = 0x2a i++ i = encodeVarintSpecs(dAtA, i, uint64(m.Placement.Size())) - n13, err := m.Placement.MarshalTo(dAtA[i:]) + n15, err := m.Placement.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n13 + i += n15 } if m.LogDriver != nil { dAtA[i] = 0x32 i++ i = encodeVarintSpecs(dAtA, i, uint64(m.LogDriver.Size())) - n14, err := m.LogDriver.MarshalTo(dAtA[i:]) + n16, err := m.LogDriver.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n14 + i += n16 } if len(m.Networks) > 0 { for _, msg := range m.Networks { @@ -1670,6 +1839,16 @@ func (m *TaskSpec) MarshalTo(dAtA []byte) (int, error) { i += n } } + if m.AutoRange != nil { + dAtA[i] = 0x62 + i++ + i = encodeVarintSpecs(dAtA, i, uint64(m.AutoRange.Size())) + n17, err := m.AutoRange.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n17 + } return i, nil } @@ -1679,11 +1858,11 @@ func (m *TaskSpec_Container) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintSpecs(dAtA, i, uint64(m.Container.Size())) - n15, err := m.Container.MarshalTo(dAtA[i:]) + n18, err := m.Container.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n15 + i += n18 } return i, nil } @@ -1693,11 +1872,11 @@ func (m *TaskSpec_Attachment) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x42 i++ i = encodeVarintSpecs(dAtA, i, uint64(m.Attachment.Size())) - n16, err := m.Attachment.MarshalTo(dAtA[i:]) + n19, err := m.Attachment.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n16 + i += n19 } return i, nil } @@ -1707,11 +1886,11 @@ func (m *TaskSpec_Generic) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x52 i++ i = encodeVarintSpecs(dAtA, i, uint64(m.Generic.Size())) - n17, err := m.Generic.MarshalTo(dAtA[i:]) + n20, err := m.Generic.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n17 + i += n20 } return i, nil } @@ -1769,11 +1948,11 @@ func (m *GenericRuntimeSpec) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x12 i++ i = encodeVarintSpecs(dAtA, i, uint64(m.Payload.Size())) - n18, err := m.Payload.MarshalTo(dAtA[i:]) + n21, err := m.Payload.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n18 + i += n21 } return i, nil } @@ -1913,21 +2092,21 @@ func (m *ContainerSpec) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x4a i++ i = encodeVarintSpecs(dAtA, i, uint64(m.StopGracePeriod.Size())) - n19, err := m.StopGracePeriod.MarshalTo(dAtA[i:]) + n22, err := m.StopGracePeriod.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n19 + i += n22 } if m.PullOptions != nil { dAtA[i] = 0x52 i++ i = encodeVarintSpecs(dAtA, i, uint64(m.PullOptions.Size())) - n20, err := m.PullOptions.MarshalTo(dAtA[i:]) + n23, err := m.PullOptions.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n20 + i += n23 } if len(m.Groups) > 0 { for _, s := range m.Groups { @@ -1976,11 +2155,11 @@ func (m *ContainerSpec) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x7a i++ i = encodeVarintSpecs(dAtA, i, uint64(m.DNSConfig.Size())) - n21, err := m.DNSConfig.MarshalTo(dAtA[i:]) + n24, err := m.DNSConfig.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n21 + i += n24 } if m.Healthcheck != nil { dAtA[i] = 0x82 @@ -1988,11 +2167,11 @@ func (m *ContainerSpec) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x1 i++ i = encodeVarintSpecs(dAtA, i, uint64(m.Healthcheck.Size())) - n22, err := m.Healthcheck.MarshalTo(dAtA[i:]) + n25, err := m.Healthcheck.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n22 + i += n25 } if len(m.Hosts) > 0 { for _, s := range m.Hosts { @@ -2063,11 +2242,11 @@ func (m *ContainerSpec) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x1 i++ i = encodeVarintSpecs(dAtA, i, uint64(m.Privileges.Size())) - n23, err := m.Privileges.MarshalTo(dAtA[i:]) + n26, err := m.Privileges.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n23 + i += n26 } if m.Init != nil { dAtA[i] = 0xba @@ -2075,11 +2254,11 @@ func (m *ContainerSpec) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x1 i++ i = encodeVarintSpecs(dAtA, i, uint64(m.Init.Size())) - n24, err := m.Init.MarshalTo(dAtA[i:]) + n27, err := m.Init.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n24 + i += n27 } if m.Isolation != 0 { dAtA[i] = 0xc0 @@ -2127,11 +2306,23 @@ func (m *ContainerSpec) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x1 i++ i = encodeVarintSpecs(dAtA, i, uint64(m.MemorySwappiness.Size())) - n25, err := m.MemorySwappiness.MarshalTo(dAtA[i:]) + n28, err := m.MemorySwappiness.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n25 + i += n28 + } + if m.AutoRange != nil { + dAtA[i] = 0xea + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintSpecs(dAtA, i, uint64(m.AutoRange.Size())) + n29, err := m.AutoRange.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n29 } return i, nil } @@ -2278,20 +2469,20 @@ func (m *NetworkSpec) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintSpecs(dAtA, i, uint64(m.Annotations.Size())) - n26, err := m.Annotations.MarshalTo(dAtA[i:]) + n30, err := m.Annotations.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n26 + i += n30 if m.DriverConfig != nil { dAtA[i] = 0x12 i++ i = encodeVarintSpecs(dAtA, i, uint64(m.DriverConfig.Size())) - n27, err := m.DriverConfig.MarshalTo(dAtA[i:]) + n31, err := m.DriverConfig.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n27 + i += n31 } if m.Ipv6Enabled { dAtA[i] = 0x18 @@ -2317,11 +2508,11 @@ func (m *NetworkSpec) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x2a i++ i = encodeVarintSpecs(dAtA, i, uint64(m.IPAM.Size())) - n28, err := m.IPAM.MarshalTo(dAtA[i:]) + n32, err := m.IPAM.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n28 + i += n32 } if m.Attachable { dAtA[i] = 0x30 @@ -2344,11 +2535,11 @@ func (m *NetworkSpec) MarshalTo(dAtA []byte) (int, error) { i++ } if m.ConfigFrom != nil { - nn29, err := m.ConfigFrom.MarshalTo(dAtA[i:]) + nn33, err := m.ConfigFrom.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += nn29 + i += nn33 } return i, nil } @@ -2379,67 +2570,67 @@ func (m *ClusterSpec) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintSpecs(dAtA, i, uint64(m.Annotations.Size())) - n30, err := m.Annotations.MarshalTo(dAtA[i:]) + n34, err := m.Annotations.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n30 + i += n34 dAtA[i] = 0x12 i++ i = encodeVarintSpecs(dAtA, i, uint64(m.AcceptancePolicy.Size())) - n31, err := m.AcceptancePolicy.MarshalTo(dAtA[i:]) + n35, err := m.AcceptancePolicy.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n31 + i += n35 dAtA[i] = 0x1a i++ i = encodeVarintSpecs(dAtA, i, uint64(m.Orchestration.Size())) - n32, err := m.Orchestration.MarshalTo(dAtA[i:]) + n36, err := m.Orchestration.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n32 + i += n36 dAtA[i] = 0x22 i++ i = encodeVarintSpecs(dAtA, i, uint64(m.Raft.Size())) - n33, err := m.Raft.MarshalTo(dAtA[i:]) + n37, err := m.Raft.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n33 + i += n37 dAtA[i] = 0x2a i++ i = encodeVarintSpecs(dAtA, i, uint64(m.Dispatcher.Size())) - n34, err := m.Dispatcher.MarshalTo(dAtA[i:]) + n38, err := m.Dispatcher.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n34 + i += n38 dAtA[i] = 0x32 i++ i = encodeVarintSpecs(dAtA, i, uint64(m.CAConfig.Size())) - n35, err := m.CAConfig.MarshalTo(dAtA[i:]) + n39, err := m.CAConfig.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n35 + i += n39 dAtA[i] = 0x3a i++ i = encodeVarintSpecs(dAtA, i, uint64(m.TaskDefaults.Size())) - n36, err := m.TaskDefaults.MarshalTo(dAtA[i:]) + n40, err := m.TaskDefaults.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n36 + i += n40 dAtA[i] = 0x42 i++ i = encodeVarintSpecs(dAtA, i, uint64(m.EncryptionConfig.Size())) - n37, err := m.EncryptionConfig.MarshalTo(dAtA[i:]) + n41, err := m.EncryptionConfig.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n37 + i += n41 return i, nil } @@ -2461,11 +2652,11 @@ func (m *SecretSpec) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintSpecs(dAtA, i, uint64(m.Annotations.Size())) - n38, err := m.Annotations.MarshalTo(dAtA[i:]) + n42, err := m.Annotations.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n38 + i += n42 if len(m.Data) > 0 { dAtA[i] = 0x12 i++ @@ -2476,21 +2667,21 @@ func (m *SecretSpec) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x1a i++ i = encodeVarintSpecs(dAtA, i, uint64(m.Templating.Size())) - n39, err := m.Templating.MarshalTo(dAtA[i:]) + n43, err := m.Templating.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n39 + i += n43 } if m.Driver != nil { dAtA[i] = 0x22 i++ i = encodeVarintSpecs(dAtA, i, uint64(m.Driver.Size())) - n40, err := m.Driver.MarshalTo(dAtA[i:]) + n44, err := m.Driver.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n40 + i += n44 } return i, nil } @@ -2513,11 +2704,11 @@ func (m *ConfigSpec) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintSpecs(dAtA, i, uint64(m.Annotations.Size())) - n41, err := m.Annotations.MarshalTo(dAtA[i:]) + n45, err := m.Annotations.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n41 + i += n45 if len(m.Data) > 0 { dAtA[i] = 0x12 i++ @@ -2528,11 +2719,11 @@ func (m *ConfigSpec) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x1a i++ i = encodeVarintSpecs(dAtA, i, uint64(m.Templating.Size())) - n42, err := m.Templating.MarshalTo(dAtA[i:]) + n46, err := m.Templating.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n42 + i += n46 } return i, nil } @@ -2592,6 +2783,10 @@ func (m *ServiceSpec) Size() (n int) { l = m.Rollback.Size() n += 1 + l + sovSpecs(uint64(l)) } + if m.AutoRange != nil { + l = m.AutoRange.Size() + n += 1 + l + sovSpecs(uint64(l)) + } return n } @@ -2613,6 +2808,39 @@ func (m *ServiceSpec_Global) Size() (n int) { } return n } +func (m *Range) Size() (n int) { + var l int + _ = l + if len(m.Step) > 0 { + for k, v := range m.Step { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovSpecs(uint64(len(k))) + 1 + len(v) + sovSpecs(uint64(len(v))) + n += mapEntrySize + 1 + sovSpecs(uint64(mapEntrySize)) + } + } + return n +} + +func (m *AutoRange) Size() (n int) { + var l int + _ = l + if len(m.Range) > 0 { + for k, v := range m.Range { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovSpecs(uint64(l)) + } + mapEntrySize := 1 + len(k) + sovSpecs(uint64(len(k))) + l + n += mapEntrySize + 1 + sovSpecs(uint64(mapEntrySize)) + } + } + return n +} + func (m *ReplicatedService) Size() (n int) { var l int _ = l @@ -2665,6 +2893,10 @@ func (m *TaskSpec) Size() (n int) { n += 1 + l + sovSpecs(uint64(l)) } } + if m.AutoRange != nil { + l = m.AutoRange.Size() + n += 1 + l + sovSpecs(uint64(l)) + } return n } @@ -2865,6 +3097,10 @@ func (m *ContainerSpec) Size() (n int) { l = m.MemorySwappiness.Size() n += 2 + l + sovSpecs(uint64(l)) } + if m.AutoRange != nil { + l = m.AutoRange.Size() + n += 2 + l + sovSpecs(uint64(l)) + } return n } @@ -3051,6 +3287,7 @@ func (this *ServiceSpec) String() string { `Networks:` + strings.Replace(fmt.Sprintf("%v", this.Networks), "NetworkAttachmentConfig", "NetworkAttachmentConfig", 1) + `,`, `Endpoint:` + strings.Replace(fmt.Sprintf("%v", this.Endpoint), "EndpointSpec", "EndpointSpec", 1) + `,`, `Rollback:` + strings.Replace(fmt.Sprintf("%v", this.Rollback), "UpdateConfig", "UpdateConfig", 1) + `,`, + `AutoRange:` + strings.Replace(fmt.Sprintf("%v", this.AutoRange), "AutoRange", "AutoRange", 1) + `,`, `}`, }, "") return s @@ -3075,6 +3312,46 @@ func (this *ServiceSpec_Global) String() string { }, "") return s } +func (this *Range) String() string { + if this == nil { + return "nil" + } + keysForStep := make([]string, 0, len(this.Step)) + for k, _ := range this.Step { + keysForStep = append(keysForStep, k) + } + sortkeys.Strings(keysForStep) + mapStringForStep := "map[string]string{" + for _, k := range keysForStep { + mapStringForStep += fmt.Sprintf("%v: %v,", k, this.Step[k]) + } + mapStringForStep += "}" + s := strings.Join([]string{`&Range{`, + `Step:` + mapStringForStep + `,`, + `}`, + }, "") + return s +} +func (this *AutoRange) String() string { + if this == nil { + return "nil" + } + keysForRange := make([]string, 0, len(this.Range)) + for k, _ := range this.Range { + keysForRange = append(keysForRange, k) + } + sortkeys.Strings(keysForRange) + mapStringForRange := "map[string]*Range{" + for _, k := range keysForRange { + mapStringForRange += fmt.Sprintf("%v: %v,", k, this.Range[k]) + } + mapStringForRange += "}" + s := strings.Join([]string{`&AutoRange{`, + `Range:` + mapStringForRange + `,`, + `}`, + }, "") + return s +} func (this *ReplicatedService) String() string { if this == nil { return "nil" @@ -3107,6 +3384,7 @@ func (this *TaskSpec) String() string { `Networks:` + strings.Replace(fmt.Sprintf("%v", this.Networks), "NetworkAttachmentConfig", "NetworkAttachmentConfig", 1) + `,`, `ForceUpdate:` + fmt.Sprintf("%v", this.ForceUpdate) + `,`, `ResourceReferences:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ResourceReferences), "ResourceReference", "ResourceReference", 1), `&`, ``, 1) + `,`, + `AutoRange:` + strings.Replace(fmt.Sprintf("%v", this.AutoRange), "AutoRange", "AutoRange", 1) + `,`, `}`, }, "") return s @@ -3226,6 +3504,7 @@ func (this *ContainerSpec) String() string { `Sysctls:` + mapStringForSysctls + `,`, `MemorySwap:` + fmt.Sprintf("%v", this.MemorySwap) + `,`, `MemorySwappiness:` + strings.Replace(fmt.Sprintf("%v", this.MemorySwappiness), "Int64Value", "google_protobuf4.Int64Value", 1) + `,`, + `AutoRange:` + strings.Replace(fmt.Sprintf("%v", this.AutoRange), "AutoRange", "AutoRange", 1) + `,`, `}`, }, "") return s @@ -3760,6 +4039,39 @@ func (m *ServiceSpec) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AutoRange", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSpecs + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthSpecs + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.AutoRange == nil { + m.AutoRange = &AutoRange{} + } + if err := m.AutoRange.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipSpecs(dAtA[iNdEx:]) @@ -3781,7 +4093,7 @@ func (m *ServiceSpec) Unmarshal(dAtA []byte) error { } return nil } -func (m *ReplicatedService) Unmarshal(dAtA []byte) error { +func (m *Range) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3804,17 +4116,17 @@ func (m *ReplicatedService) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ReplicatedService: wiretype end group for non-group") + return fmt.Errorf("proto: Range: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ReplicatedService: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Range: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Replicas", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Step", wireType) } - m.Replicas = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSpecs @@ -3824,16 +4136,357 @@ func (m *ReplicatedService) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Replicas |= (uint64(b) & 0x7F) << shift + msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } - default: - iNdEx = preIndex - skippy, err := skipSpecs(dAtA[iNdEx:]) - if err != nil { - return err + if msglen < 0 { + return ErrInvalidLengthSpecs + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Step == nil { + m.Step = make(map[string]string) + } + var mapkey string + var mapvalue string + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSpecs + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSpecs + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthSpecs + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSpecs + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthSpecs + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + } else { + iNdEx = entryPreIndex + skippy, err := skipSpecs(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthSpecs + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Step[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipSpecs(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthSpecs + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AutoRange) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSpecs + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AutoRange: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AutoRange: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Range", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSpecs + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthSpecs + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Range == nil { + m.Range = make(map[string]*Range) + } + var mapkey string + var mapvalue *Range + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSpecs + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSpecs + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthSpecs + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSpecs + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthSpecs + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthSpecs + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &Range{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipSpecs(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthSpecs + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Range[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipSpecs(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthSpecs + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ReplicatedService) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSpecs + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ReplicatedService: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ReplicatedService: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Replicas", wireType) + } + m.Replicas = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSpecs + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Replicas |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipSpecs(dAtA[iNdEx:]) + if err != nil { + return err } if skippy < 0 { return ErrInvalidLengthSpecs @@ -4238,6 +4891,39 @@ func (m *TaskSpec) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AutoRange", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSpecs + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthSpecs + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.AutoRange == nil { + m.AutoRange = &AutoRange{} + } + if err := m.AutoRange.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipSpecs(dAtA[iNdEx:]) @@ -5544,6 +6230,39 @@ func (m *ContainerSpec) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 29: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AutoRange", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSpecs + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthSpecs + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.AutoRange == nil { + m.AutoRange = &AutoRange{} + } + if err := m.AutoRange.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipSpecs(dAtA[iNdEx:]) @@ -6855,144 +7574,150 @@ var ( func init() { proto.RegisterFile("github.com/docker/swarmkit/api/specs.proto", fileDescriptorSpecs) } var fileDescriptorSpecs = []byte{ - // 2213 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x58, 0xcf, 0x6f, 0x1b, 0xb9, - 0xf5, 0xb7, 0x6c, 0x59, 0x3f, 0xde, 0xc8, 0x89, 0xcc, 0xcd, 0xee, 0x8e, 0x95, 0xac, 0xad, 0xd5, - 0x66, 0xf3, 0xf5, 0xee, 0xe2, 0x2b, 0xa3, 0x6e, 0x90, 0x66, 0x93, 0x6e, 0x5b, 0xc9, 0xd2, 0xda, - 0x6a, 0x12, 0x5b, 0xa0, 0x1c, 0xb7, 0x01, 0x0a, 0x08, 0xf4, 0x0c, 0x2d, 0x0d, 0x3c, 0x1a, 0x4e, - 0x49, 0xca, 0x81, 0x6e, 0x3d, 0x2e, 0x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 0x96, 0x60, 0x69, 0xea, 0xd8, 0xa2, 0x3b, 0xb0, 0xe8, 0x0d, 0x48, 0x8f, 0x9a, 0x39, - 0x46, 0x1d, 0xd4, 0x84, 0x8c, 0x4f, 0x0e, 0xa9, 0xaf, 0x0e, 0xaf, 0xda, 0xb8, 0xff, 0xbf, 0xf1, - 0xfc, 0x57, 0x9f, 0x6b, 0x7c, 0x33, 0x90, 0x7c, 0x84, 0x0d, 0x19, 0xd9, 0x90, 0x75, 0xd8, 0x60, - 0x40, 0x02, 0x75, 0x4d, 0x2c, 0xac, 0xe7, 0x71, 0xdc, 0x55, 0x91, 0x21, 0xbc, 0x27, 0xec, 0xb4, - 0x36, 0xeb, 0x36, 0x2a, 0xc2, 0x02, 0x0d, 0x4e, 0xec, 0x45, 0x6d, 0x52, 0x4d, 0x65, 0x71, 0xbd, - 0xe8, 0xf4, 0xe5, 0xb1, 0x6a, 0x2a, 0xde, 0x50, 0x50, 0x6e, 0x67, 0xa3, 0x88, 0xaa, 0x36, 0xfa, - 0x11, 0x64, 0x06, 0x6c, 0x18, 0x48, 0x61, 0xe7, 0xf4, 0x64, 0x57, 0x66, 0x4d, 0xf6, 0x85, 0x42, - 0x18, 0x65, 0x19, 0x38, 0x6a, 0xc2, 0xb2, 0x90, 0x2c, 0xec, 0xf6, 0x38, 0x71, 0x68, 0x37, 0xa4, - 0xdc, 0x63, 0xae, 0x49, 0xc3, 0x2b, 0x57, 0x36, 0xa5, 0x61, 0x0a, 0x3e, 0x7c, 0x5b, 0x71, 0xb6, - 0x15, 0xa5, 0xad, 0x19, 0xa8, 0x0d, 0x85, 0x70, 0xe8, 0xfb, 0x5d, 0x16, 0x46, 0x37, 0x72, 0x74, - 0x76, 0xde, 0x21, 0x64, 0xed, 0xa1, 0xef, 0xef, 0x45, 0x24, 0x6c, 0x85, 0x93, 0x0e, 0xfa, 0x08, - 0x32, 0x3d, 0xce, 0x86, 0x61, 0x74, 0x6e, 0xf2, 0xd8, 0xf4, 0xd0,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4, 0x9a, 0xa2, 0x44, 0x3d, 0x99, - 0x4d, 0xda, 0x8b, 0xb7, 0xb3, 0x20, 0x13, 0x36, 0xf4, 0x0b, 0x58, 0xa6, 0x81, 0xc3, 0x47, 0x5a, - 0xac, 0xf1, 0x0c, 0x73, 0xd7, 0x2f, 0xb6, 0x39, 0x06, 0x4f, 0x2d, 0xb6, 0x48, 0x2f, 0xd9, 0x2b, - 0x7f, 0x4b, 0x01, 0x44, 0x75, 0xde, 0xfb, 0x15, 0x20, 0x82, 0xb4, 0x4b, 0x24, 0xd1, 0x9a, 0x2b, - 0x60, 0xdd, 0x46, 0x4f, 0x00, 0x24, 0x1d, 0x84, 0x2a, 0xf5, 0x06, 0x3d, 0x23, 0x9b, 0xb7, 0xa5, - 0x83, 0x04, 0x1a, 0x6d, 0x42, 0xc6, 0x3c, 0xa1, 0xd3, 0x37, 0xf2, 0x0c, 0xb2, 0xf2, 0x87, 0x14, - 0x40, 0xb4, 0xcc, 0xff, 0xe9, 0xb5, 0xd5, 0xed, 0x37, 0xdf, 0xaf, 0xce, 0xfd, 0xf5, 0xfb, 0xd5, - 0xb9, 0xdf, 0x5c, 0xac, 0xa6, 0xde, 0x5c, 0xac, 0xa6, 0xfe, 0x7c, 0xb1, 0x9a, 0xfa, 0xfb, 0xc5, - 0x6a, 0xea, 0x30, 0xa3, 0x2b, 0x8f, 0x1f, 0xfe, 0x3b, 0x00, 0x00, 0xff, 0xff, 0x67, 0x32, 0x8c, - 0x8f, 0xb8, 0x16, 0x00, 0x00, + // 2318 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x58, 0xcf, 0x6f, 0x1b, 0xc7, + 0xf5, 0xd7, 0x4a, 0x14, 0x7f, 0xbc, 0xa5, 0x64, 0x6a, 0xe2, 0x24, 0x2b, 0xda, 0x96, 0x18, 0xe6, + 0xc7, 0x57, 0x49, 0xf0, 0xa5, 0x50, 0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 0x04, 0xb2, 0xd4, 0x77, 0x02, + 0xe6, 0xfa, 0xc2, 0xca, 0xce, 0x36, 0xa4, 0xa1, 0x31, 0x72, 0x33, 0xf1, 0x88, 0x21, 0xd9, 0x9c, + 0x79, 0xde, 0x11, 0xb1, 0x4f, 0xac, 0xdc, 0x6b, 0xba, 0x31, 0x62, 0xa0, 0xc7, 0x90, 0xab, 0x0e, + 0x04, 0xc3, 0xc4, 0xef, 0x52, 0x0b, 0x14, 0xfd, 0xc1, 0xd4, 0x38, 0x88, 0x41, 0x78, 0x8c, 0xaf, + 0xa5, 0x21, 0xd5, 0x67, 0x0e, 0x2d, 0x0f, 0x61, 0x51, 0x09, 0xd0, 0x57, 0x90, 0x6a, 0x0b, 0x1a, + 0x58, 0x86, 0xda, 0x92, 0x0f, 0xa7, 0x1e, 0xa8, 0x04, 0x56, 0x24, 0xaa, 0xe1, 0x0b, 0x3e, 0xc4, + 0x8a, 0x50, 0xfc, 0x0a, 0x72, 0x23, 0x11, 0x2a, 0xc0, 0xc2, 0x09, 0x1d, 0xaa, 0xa8, 0xcc, 0x61, + 0x39, 0x44, 0x77, 0x61, 0xf1, 0x94, 0x78, 0x83, 0xa8, 0x04, 0xe5, 0x70, 0x34, 0x79, 0x34, 0xff, + 0xd0, 0x28, 0xff, 0xde, 0x48, 0x38, 0x80, 0xbe, 0xd5, 0x86, 0x68, 0x03, 0x36, 0x6e, 0xf4, 0x24, + 0x32, 0x25, 0xb2, 0x22, 0xa2, 0x15, 0xdb, 0x00, 0x63, 0xe1, 0x14, 0x3b, 0x36, 0x93, 0x76, 0x98, + 0x5b, 0xab, 0x33, 0x1d, 0x4c, 0x9a, 0xb8, 0x09, 0x2b, 0xd7, 0xa2, 0x18, 0x15, 0x21, 0xab, 0xa3, + 0x38, 0x4a, 0xbf, 0x14, 0x1e, 0xcd, 0xcb, 0x77, 0x60, 0x69, 0x22, 0x62, 0xcb, 0xff, 0x58, 0x84, + 0x6c, 0x9c, 0x46, 0xa8, 0x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 0x95, 0x52, 0x93, 0x91, 0x05, 0x19, 0x9b, 0xf5, 0xfb, 0xc4, 0x97, 0xd7, 0xf7, 0xc2, 0x46, 0x0e, + 0xc7, 0x53, 0xb9, 0x33, 0x84, 0x77, 0x43, 0x2b, 0xa5, 0xc4, 0x6a, 0x2c, 0x4b, 0x29, 0xf5, 0x4f, + 0xad, 0x45, 0x25, 0x92, 0x43, 0x29, 0x71, 0xdc, 0x28, 0x75, 0x73, 0x58, 0x0e, 0x25, 0x6f, 0x10, + 0x52, 0x6e, 0x65, 0xa2, 0x1d, 0x95, 0x63, 0xf4, 0x15, 0xa4, 0xfb, 0x6c, 0xe0, 0x8b, 0xd0, 0xca, + 0x2a, 0x63, 0xa7, 0x56, 0xdc, 0x67, 0x12, 0xa1, 0xc3, 0x52, 0xc3, 0x51, 0x03, 0x56, 0x42, 0xc1, + 0x82, 0x4e, 0x97, 0x13, 0x9b, 0x76, 0x02, 0xca, 0x5d, 0xe6, 0xe8, 0xeb, 0x71, 0xf5, 0xda, 0xa1, + 0xd4, 0x75, 0x23, 0x8e, 0xef, 0x48, 0xce, 0x8e, 0xa4, 0xb4, 0x14, 0x03, 0xb5, 0x20, 0x1f, 0x0c, + 0x3c, 0xaf, 0xc3, 0x82, 0xa8, 0x53, 0x8a, 0x12, 0xef, 0x35, 0xb6, 0xac, 0x35, 0xf0, 0xbc, 0xfd, + 0x88, 0x84, 0xcd, 0x60, 0x3c, 0x41, 0xef, 0x41, 0xba, 0xcb, 0xd9, 0x20, 0x88, 0x92, 0x2e, 0x87, + 0xf5, 0x0c, 0x7d, 0x03, 0x99, 0x90, 0xda, 0x9c, 0x8a, 0xd0, 0xca, 0xcf, 0xbe, 0x3d, 0xdb, 0x0a, + 0x32, 0xca, 0x09, 0x1c, 0x73, 0xd0, 0x2a, 0x2c, 0x08, 0x31, 0xb4, 0x96, 0x4a, 0xc6, 0x46, 0xb6, + 0x96, 0xb9, 0xbc, 0x58, 0x5f, 0x38, 0x38, 0x78, 0x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x41, 0x54, 0xcc, 0xe5, 0xb1, 0x1a, 0xa3, 0x47, 0x00, 0x82, + 0xf6, 0x03, 0x59, 0x7a, 0xfd, 0xae, 0x0e, 0x9b, 0x9b, 0xca, 0x41, 0x02, 0x8d, 0xb6, 0x20, 0xad, + 0x1f, 0xef, 0xa9, 0x5b, 0x79, 0x1a, 0x59, 0xfe, 0xa3, 0x01, 0x10, 0xb9, 0xf9, 0x3f, 0xed, 0x5b, + 0xcd, 0x7a, 0xf5, 0xc3, 0xda, 0xdc, 0x5f, 0x7e, 0x58, 0x9b, 0xfb, 0xcd, 0xe5, 0x9a, 0xf1, 0xea, + 0x72, 0xcd, 0xf8, 0xf3, 0xe5, 0x9a, 0xf1, 0xf7, 0xcb, 0x35, 0xe3, 0x28, 0xad, 0xda, 0x96, 0x1f, + 0xff, 0x27, 0x00, 0x00, 0xff, 0xff, 0x77, 0xd1, 0xd8, 0x8b, 0x8d, 0x18, 0x00, 0x00, } diff --git a/vendor/github.com/docker/swarmkit/api/specs.proto b/vendor/github.com/docker/swarmkit/api/specs.proto index 069419c8d4c9..02c1926c0ce5 100644 --- a/vendor/github.com/docker/swarmkit/api/specs.proto +++ b/vendor/github.com/docker/swarmkit/api/specs.proto @@ -87,6 +87,16 @@ message ServiceSpec { // Service endpoint specifies the user provided configuration // to properly discover and load balance a service. EndpointSpec endpoint = 8; + + AutoRange AutoRange = 10; +} + +message Range { + map Step = 1; +} + +message AutoRange { + map Range = 1; } // ReplicatedService sets the reconciliation target to certain number of replicas. @@ -139,6 +149,8 @@ message TaskSpec { // // ResourceReferences is a list of ResourceReferences used by the task. repeated ResourceReference resource_references = 11 [(gogoproto.nullable) = false]; + + AutoRange AutoRange = 12; } message ResourceReference { @@ -341,6 +353,8 @@ message ContainerSpec { // to the container OS's default - generally 60, or the value predefined in // the image; set to -1 to unset a previously set value google.protobuf.Int64Value memory_swappiness = 28; + + AutoRange AutoRange = 29; } // EndpointSpec defines the properties that can be configured to