diff --git a/api/types/stats.go b/api/types/stats.go index 20daebed14bd2..ca5daad32643b 100644 --- a/api/types/stats.go +++ b/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/api/types/swarm/service.go b/api/types/swarm/service.go index abf192e759414..be44d5097fd2d 100644 --- a/api/types/swarm/service.go +++ b/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/api/types/swarm/task.go b/api/types/swarm/task.go index d5a57df5db5a7..a4174414b8d88 100644 --- a/api/types/swarm/task.go +++ b/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/api/types/types.go b/api/types/types.go index dabcd46056d2a..a78c2b3e61324 100644 --- a/api/types/types.go +++ b/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/container/container.go b/container/container.go index 6a5907c34b4dd..242294adfcb6b 100644 --- a/container/container.go +++ b/container/container.go @@ -69,6 +69,7 @@ type Container struct { Managed bool Path string Args []string + AutoRange swarmtypes.AutoRange Config *containertypes.Config ImageID image.ID `json:"Image"` NetworkSettings *network.Settings diff --git a/daemon/cluster/convert/service.go b/daemon/cluster/convert/service.go index 2b723425900d5..dda136a7f8511 100644 --- a/daemon/cluster/convert/service.go +++ b/daemon/cluster/convert/service.go @@ -119,6 +119,11 @@ func serviceSpecFromGRPC(spec *swarmapi.ServiceSpec) (*types.ServiceSpec, error) EndpointSpec: endpointSpecFromGRPC(spec.Endpoint), } + autoRange := AutoRangeFromGRPC(spec.AutoRange) + if autoRange != nil { + convertedSpec.AutoRange = autoRange + } + // UpdateConfig convertedSpec.UpdateConfig = updateConfigFromGRPC(spec.Update) convertedSpec.RollbackConfig = updateConfigFromGRPC(spec.Rollback) @@ -136,6 +141,46 @@ func serviceSpecFromGRPC(spec *swarmapi.ServiceSpec) (*types.ServiceSpec, error) return convertedSpec, nil } +// AutoRangeFromGRPC converts a AutoRange to a GRPC AutoRange +func AutoRangeFromGRPC(autoRange *swarmapi.AutoRange) types.AutoRange { + if autoRange == nil { + return types.AutoRange{} + } + + sl := make(types.AutoRange) + for k := range autoRange.Range { + sl[k] = make(map[string]string) + for sk, sv := range autoRange.Range[k].Step { + sl[k][sk] = sv + } + } + + return sl +} + +// AutoRangeToGRPC converts a AutoRange from a GRPC AutoRange +func AutoRangeToGRPC(autoRange types.AutoRange) *swarmapi.AutoRange { + if len(autoRange) <= 0 { + return &swarmapi.AutoRange{} + } + + sl := make([]swarmapi.AutoRange, 1) + sa := sl[0] + sa.Range = make(map[string]*swarmapi.Range) + for k := range autoRange { + var rg swarmapi.Range + + rg.Step = make(map[string]string) + + for sk, sv := range autoRange[k] { + rg.Step[sk] = sv + } + sa.Range[k] = &rg + } + + return &sa +} + // ServiceSpecToGRPC converts a ServiceSpec to a grpc ServiceSpec. func ServiceSpecToGRPC(s types.ServiceSpec) (swarmapi.ServiceSpec, error) { name := s.Name @@ -170,6 +215,12 @@ func ServiceSpecToGRPC(s types.ServiceSpec) (swarmapi.ServiceSpec, error) { Networks: serviceNetworks, } + autoRange := AutoRangeToGRPC(s.AutoRange) + if autoRange != nil { + spec.AutoRange = autoRange + spec.Task.AutoRange = autoRange + } + switch s.TaskTemplate.Runtime { case types.RuntimeContainer, "": // if empty runtime default to container if s.TaskTemplate.ContainerSpec != nil { @@ -611,6 +662,11 @@ func taskSpecFromGRPC(taskSpec swarmapi.TaskSpec) (types.TaskSpec, error) { ForceUpdate: taskSpec.ForceUpdate, } + sl := AutoRangeFromGRPC(taskSpec.AutoRange) + if len(sl) > 0 { + t.AutoRange = sl + } + switch taskSpec.GetRuntime().(type) { case *swarmapi.TaskSpec_Container, nil: c := taskSpec.GetContainer() diff --git a/daemon/daemon_unix.go b/daemon/daemon_unix.go index f4b18b3ca5088..7989979ddcf15 100644 --- a/daemon/daemon_unix.go +++ b/daemon/daemon_unix.go @@ -1420,6 +1420,17 @@ func (daemon *Daemon) stats(c *container.Container) (*types.StatsJSON, error) { } } + if len(c.AutoRange) > 0 { + sl := make(types.AutoRange) + for k := range c.AutoRange { + sl[k] = make(map[string]string) + for sk, sv := range c.AutoRange[k] { + sl[k][string(sk)] = sv + } + } + s.AutoRange = sl + } + return s, nil } diff --git a/daemon/stats.go b/daemon/stats.go index eb23e272ae51c..545306227465e 100644 --- a/daemon/stats.go +++ b/daemon/stats.go @@ -5,16 +5,42 @@ import ( "encoding/json" "errors" "runtime" + "strings" "time" "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/backend" + "github.com/docker/docker/api/types/swarm" "github.com/docker/docker/api/types/versions" "github.com/docker/docker/api/types/versions/v1p20" + "github.com/docker/docker/client" "github.com/docker/docker/container" + "github.com/docker/docker/daemon/stats" "github.com/docker/docker/pkg/ioutils" ) +func getAutoRange(ctx context.Context, containerID string) (swarm.AutoRange, string, bool) { + cli, err := client.NewEnvClient() + if err != nil { + return swarm.AutoRange{}, "", false + } + defer cli.Close() + container, err := cli.ContainerInspect(ctx, containerID) + if err != nil { + return swarm.AutoRange{}, "", false + } + + // Swarm labels needed to get AutoRange configuration + serviceID, serviceName := container.Config.Labels["com.docker.swarm.service.id"], container.Config.Labels["com.docker.swarm.service.name"] + if serviceID != "" && serviceName != "" { + resp, _, _ := cli.ServiceInspectWithRaw(ctx, serviceID, types.ServiceInspectOptions{}) + if resp.Spec.AutoRange != nil { + return resp.Spec.AutoRange, serviceName, true + } + } + return swarm.AutoRange{}, "", false +} + // ContainerStats writes information about the container to the stream // given in the config object. func (daemon *Daemon) ContainerStats(ctx context.Context, prefixOrName string, config *backend.ContainerStatsConfig) error { @@ -33,6 +59,29 @@ func (daemon *Daemon) ContainerStats(ctx context.Context, prefixOrName string, c ID: container.ID}) } + // AutoRange initialisation + if autoRange, serviceName, ok := getAutoRange(ctx, container.ID); ok { + if _, exist := daemon.statsCollector.AutoRangeWatcher[container.ID]; !exist { + limit := 50 // Size limit of timeserie + daemon.statsCollector.AutoRangeWatcher[container.ID] = &stats.AutoRangeWatcher{ + Config: autoRange, + TickRate: time.Second, + Target: container, + ServiceName: serviceName[:strings.LastIndex(serviceName, "_")], + Input: make(chan types.StatsJSON, 1), + Output: make(chan types.StatsJSON, 1), + WaitChan: make(chan bool, 1), + Obs: stats.NewObservor(limit), + Ctx: ctx, + Limit: limit, + Finished: false, + } + go daemon.statsCollector.AutoRangeWatcher[container.ID].Watch() + } else if !daemon.statsCollector.AutoRangeWatcher[container.ID].Finished { + daemon.statsCollector.AutoRangeWatcher[container.ID].SetNewContext(ctx) + } + } + outStream := config.OutStream if config.Stream { wf := ioutils.NewWriteFlusher(outStream) @@ -60,6 +109,10 @@ func (daemon *Daemon) ContainerStats(ctx context.Context, prefixOrName string, c defer daemon.unsubscribeToContainerStats(container, updates) noStreamFirstFrame := true + + var oldStats *types.StatsJSON + first := true + for { select { case v, ok := <-updates: @@ -69,6 +122,33 @@ func (daemon *Daemon) ContainerStats(ctx context.Context, prefixOrName string, c var statsJSON interface{} statsJSONPost120 := getStatJSON(v) + if first { + oldStats = statsJSONPost120 + first = false + } + if _, exist := daemon.statsCollector.AutoRangeWatcher[container.ID]; exist { + if !daemon.statsCollector.AutoRangeWatcher[container.ID].Finished { + select { + case daemon.statsCollector.AutoRangeWatcher[container.ID].Input <- *statsJSONPost120: + default: + } + + select { + case up, ok := <-daemon.statsCollector.AutoRangeWatcher[container.ID].Output: + if !ok { + return nil + } + + statsJSONPost120 = &up + oldStats = statsJSONPost120 + default: + statsJSONPost120 = oldStats + } + } else { + statsJSONPost120.AutoRange = stats.ConvertAutoRange(daemon.statsCollector.AutoRangeWatcher[container.ID].Config) + } + } + if versions.LessThan(apiVersion, "1.21") { if runtime.GOOS == "windows" { return errors.New("API versions pre v1.21 do not support stats on Windows") diff --git a/daemon/stats/autorange.go b/daemon/stats/autorange.go new file mode 100644 index 0000000000000..41d672dd80445 --- /dev/null +++ b/daemon/stats/autorange.go @@ -0,0 +1,539 @@ +package stats // import "github.com/docker/docker/daemon/stats" + +// #AutoRange +// a feature that help the user predict and apply the best limits to his services. +// Why? +// This collector extension was thought as a way to monitor and predict the optimal configuration +// for a service. +// The goal was to find the point where a service could function properly, but still save as much +// resources as possible, by monitoring activity and deducing optimal values. +// It was written as a way to answer the question +// `How to optimise the number of services running on our infrastructure without losing quality of service?` + +// How? +// It uses swarm labels and require swarm mode to be enabled (see #improvements). +// The logic behind the feature can be described in 3 points: + // - First, we collect the metrics and apply transformations on it to generate two values. + // Those values represent a “box” around the actual consumption. + // - Then, we transform these values into timeseries, using some of the keydata collected previously to weight our operations. + // The amplitude of change between values is monitored to know if it’s a good time to stop measurements. + // - Finally, we obtain refined values that we apply as limitation to the service. + // The data is then kept in a reduced form to limit memory usage. +// The functionnality is declared by adding the autorange key to the docker-compose.yml. +// The mechanism works for cpu% and memory, with or without basevalues. +// Below is an example of both. +// autorange: + // memory: + // cpu%: +// The available keys are:- min (in octets)- max (in octets)- threshold% (only for memory, represents a security margin that will be refined by the algorithm) +// autorange: + // memory: +// min: "110000" +// max: "120000" +// threshold%: "10" + // cpu%: +// min: "60" +// max: "70" +// This functionality is deployed with docker stack deploy --compose-file=/your/compose/file and +// then docker container stats --format AutoRange(format is not necessary but shows the predicted values). +// The `docker container stats` command is mandatory to start and keep running the collector. +// You can always leave the docker container stats screen and +// come back later, the mechanism will be paused and the accumulated datas won’t be lost. + + +import ( + _ "fmt" + "math" + "strconv" + "strings" + "time" + + "context" + ctn "github.com/docker/docker/api/types/container" + "github.com/docker/docker/client" + + "github.com/docker/docker/api/types" + "github.com/docker/docker/api/types/swarm" + "github.com/docker/docker/container" + "github.com/sirupsen/logrus" +) + +const ( + KiB = 1024 + MiB = 1024 * KiB + GiB = 1024 * MiB + TiB = 1024 * GiB + PiB = 1024 * TiB + minAllowedMemoryLimit = 5 * MiB +) + +type PredictedValueRam struct { + min, max, threshold []uint64 +} + +type TimeSerieRam struct { + min, max, usage, highest, lowest, amplitude []uint64 + timestamps []time.Time + started time.Time + PredictedValues PredictedValueRam + MemoryPrediction bool +} + +type PredictedValueCPU struct { + percent, usage []float64 +} + +type TimeSerieCPU struct { + percent, usage []float64 + timestamps []time.Time + started time.Time + PredictedValues PredictedValueCPU + CpuPrediction bool +} + +type Observor struct { + TimeSerieRam + TimeSerieCPU +} + +type AutoRangeWatcher struct { + Output, Input chan types.StatsJSON + WaitChan chan bool + TickRate time.Duration + Config swarm.AutoRange + Target *container.Container + ServiceName string + Obs *Observor + Ctx context.Context + Limit int + Finished bool +} + +func NewObservor(size int) *Observor { + return &Observor{ + TimeSerieRam: TimeSerieRam{ + min: make([]uint64, 0, size), + max: make([]uint64, 0, size), + usage: make([]uint64, 0, size), + highest: make([]uint64, 0, size), + lowest: make([]uint64, 0, size), + amplitude: make([]uint64, 0, size), + MemoryPrediction: false, + PredictedValues: PredictedValueRam{ + min: make([]uint64, 0, size), + max: make([]uint64, 0, size), + threshold: make([]uint64, 0, size), + }, + }, + TimeSerieCPU: TimeSerieCPU{ + percent: make([]float64, 0, size), + usage: make([]float64, 0, size), + CpuPrediction: false, + PredictedValues: PredictedValueCPU{ + percent: make([]float64, 0, size), + usage: make([]float64, 0, size), + }, + }, + } +} + +func fifoUint(arr []uint64, newv uint64, limit int) []uint64 { + if len(arr) < limit { + arr = append(arr, newv) + return arr + } + _, arr = arr[0], arr[1:] + arr = append(arr, newv) + return arr +} + +func fifoFloat(arr []float64, newv float64, limit int) []float64 { + if len(arr) < limit { + arr = append(arr, newv) + return arr + } + _, arr = arr[0], arr[1:] + arr = append(arr, newv) + return arr +} + +func lowestOf(arr []uint64) uint64 { + lowest := arr[0] + + for _, val := range arr { + if val < lowest { + lowest = val + } + } + return lowest +} + +func highestOf(arr []uint64) int { + highest := arr[0] + + for _, val := range arr { + if val > highest { + highest = val + } + } + return int(highest) +} + +func percent(value int) int { + return int(value / 100) +} + +func percentageBetween(old, new int) (delta int) { + diff := float64(new - old) + delta = int((diff / float64(old)) * 100) + return +} + +func percentOf(f, s int) int { + return int(s / f) +} + +func (ar *AutoRangeWatcher) SetNewContext(ctx context.Context) { + ar.Ctx = ctx + ar.WaitChan <- true +} + +func (ar *AutoRangeWatcher) UpdateResources() error { + var update ctn.UpdateConfig + + if _, exist := ar.Config["memoryAR"]; exist { + + sugMin, _ := strconv.Atoi(ar.Config["memoryAR"]["nmin"]) + sugMax, _ := strconv.Atoi(ar.Config["memoryAR"]["nmax"]) + threshold, _ := strconv.Atoi(ar.Config["memoryAR"]["opti"]) + + // One last sum with the highest usage to smooth the prediction and reduce the + // error probability. It's generaly a subtle ajustement. + // The docker daemon does not permit memory limit lesser than 6mb + + update.Resources.Memory = int64((sugMax + highestOf(ar.Obs.TimeSerieRam.highest)) / 2) + if update.Resources.Memory < minAllowedMemoryLimit { + update.Resources.Memory = minAllowedMemoryLimit + MiB + } + + // Memoryswap should always be greater than memory limit, but can be illimited (-1) + if int64(sugMax*threshold) <= update.Resources.Memory { + update.Resources.MemorySwap = update.Resources.Memory + 1 + } else { + update.Resources.MemorySwap = int64(sugMax + (percent(sugMax) * threshold)) + } + + // Here we do pretty much the same as above, to further refine the limit and better fit + // the observed consumption + update.Resources.MemoryReservation = int64((uint64(sugMin) + lowestOf(ar.Obs.TimeSerieRam.lowest))) + if update.Resources.MemoryReservation/2 < minAllowedMemoryLimit { + update.Resources.MemoryReservation = minAllowedMemoryLimit + 5*MiB + } + + if update.Resources.MemoryReservation > update.Resources.Memory { + update.Resources.MemoryReservation, update.Resources.Memory = update.Resources.Memory, update.Resources.MemoryReservation + } + + if update.Resources.MemorySwap < update.Resources.Memory { + update.Resources.MemorySwap = -1 + } + + ar.Config["memoryAR"]["sugmin"] = strconv.Itoa(int(update.Resources.MemoryReservation)) + ar.Config["memoryAR"]["sugmax"] = strconv.Itoa(int(update.Resources.Memory)) + + } + + if _, exist := ar.Config["cpuAR"]; exist { + + sugMax, _ := strconv.Atoi(ar.Config["cpuAR"]["usageOpti"]) + + update.Resources.CPURealtimeRuntime = int64(sugMax) + update.Resources.CpusetCpus, ar.Config["cpuAR"]["numCPU"] = nSetCPU(ar.Config["cpuAR"]["percentOpti"]) + + } + + ar.Obs = nil + + // Updating is done using the docker client API + cli, err := client.NewEnvClient() + if err != nil { + return err + } + + _, err = cli.ContainerUpdate(ar.Ctx, ar.Target.ID, update) + if err != nil { + return err + } + logrus.Infof("Container: %s (Service: %s) now has limits applicated\n", ar.Target.Name, ar.ServiceName) + + return nil +} + +func nSetCPU(cpus string) (string, string) { + var cpuConfig string + + pcpus, _ := strconv.ParseFloat(cpus, 32) + n := int(pcpus / 100) + 1 + for i := 0; i < n; i++ { + cpuConfig += strconv.Itoa(i) + if i + 1 < n { + cpuConfig += "," + } + } + + return cpuConfig, strconv.Itoa(n) +} + +func (ar *AutoRangeWatcher) Watch() { + + var ( + input types.StatsJSON + lowest, highest, oldUsage, oldSystem uint64 = 0, 0, 0, 0 + cpuMin, cpuMax, min, max, threshold, cpuTurn, memoryTurn int = 0, 0, 0, 0, 0, 0, 0 + ) + + // Recover base config, those values will be used as base values + if _, exist := ar.Config["memory"]; exist { + min, _ = strconv.Atoi(ar.Config["memory"]["min"]) + if min == 0 { + min = 1 + } + + max, _ = strconv.Atoi(ar.Config["memory"]["max"]) + if max == 0 { + max = 1 + } + + threshold, _ = strconv.Atoi(ar.Config["memory"]["threshold"]) + if threshold == 0 { + threshold = 10 + } + ar.Config["memoryAR"] = make(map[string]string) + } + + if _, exist := ar.Config["cpu%"]; exist { + cpuMin, _ = strconv.Atoi(ar.Config["cpu%"]["min"]) + cpuMax, _ = strconv.Atoi(ar.Config["cpu%"]["max"]) + if cpuMin != 0 && cpuMax != 0 { + fifoFloat(ar.Obs.TimeSerieCPU.percent, float64((cpuMin+cpuMax)/2), ar.Limit) + } + ar.Config["cpuAR"] = make(map[string]string) + } + + // Initialisation time + ticker := time.NewTicker(ar.TickRate) + time.Sleep(ar.TickRate) + started := false + + logrus.Infof("Container: %s (Service: %s) started with activated AutoRanges\n", ar.Target.Name, ar.ServiceName) + for range ticker.C { + select { + case in, _ := <-ar.Input: + input = in + case <-ar.Ctx.Done(): // Handler for signal interrupt + <-ar.WaitChan + continue + } + + // Healthchecking is required before every loops to ensure data integrity + // We don't want false prediction because the container was offline + if !ar.Target.IsRunning() || ar.Target.IsDead() { + logrus.Infof("Container: %s (Service: %s) exited, removing AutoRange\n", ar.Target.Name, ar.ServiceName) + return + } + + // Initalisation / End routines + if !started { + input.Stats.MemoryStats.MaxUsage, lowest = input.Stats.MemoryStats.Usage, input.Stats.MemoryStats.Usage + started = true + } else if ar.Obs.TimeSerieRam.MemoryPrediction && ar.Obs.TimeSerieCPU.CpuPrediction && !ar.Finished { + ar.Finished = true + + err := ar.UpdateResources() + if err != nil { + logrus.Errorf("err: %v\n", err) + } + return + } + + for category := range ar.Config { + if strings.Compare(category, "memory") == 0 && !ar.Obs.TimeSerieRam.MemoryPrediction { + + // Follow memory usage and change min and max accordingly. + // These values represent the "bearings" around the usage value + min, max = processMemoryStats(input.Stats.MemoryStats, min, max, threshold) + + // Always get the lowest and highest point in the serie, + // as we'll use them for weighting purposes + if input.Stats.MemoryStats.Usage < lowest { + lowest = input.Stats.MemoryStats.Usage + } else if input.Stats.MemoryStats.Usage > highest { + highest = input.Stats.MemoryStats.Usage + } + + ar.Obs.TimeSerieRam.min = fifoUint(ar.Obs.TimeSerieRam.min, uint64(min), ar.Limit) + ar.Obs.TimeSerieRam.max = fifoUint(ar.Obs.TimeSerieRam.max, uint64(max), ar.Limit) + ar.Obs.TimeSerieRam.usage = fifoUint(ar.Obs.TimeSerieRam.usage, input.Stats.MemoryStats.Usage, ar.Limit) + + // Timeserie arrays are ready to be processed + if memoryTurn >= ar.Limit { + memoryTurn = 0 + + // Stats about the serie + // Amplitude represent the space between lowest and highest + ar.Obs.TimeSerieRam.highest = fifoUint(ar.Obs.TimeSerieRam.highest, highest, ar.Limit) + ar.Obs.TimeSerieRam.lowest = fifoUint(ar.Obs.TimeSerieRam.lowest, lowest, ar.Limit) + ar.Obs.TimeSerieRam.amplitude = fifoUint(ar.Obs.TimeSerieRam.amplitude, uint64(percentOf(int(lowest), int(highest))), ar.Limit) + + // Generate predicted values + aMin, aMax := averrage(ar.Obs.TimeSerieRam.min), averrage(ar.Obs.TimeSerieRam.max) + aMin = aMin + (aMin/100)*uint64(percentageBetween(int(aMin), int(lowest))) + aMax = aMax + (aMax/100)*uint64(percentageBetween(int(aMax), int(highest))) + + // Stock predicted values + ar.Obs.TimeSerieRam.PredictedValues.min = fifoUint(ar.Obs.TimeSerieRam.PredictedValues.min, aMin, ar.Limit) + ar.Obs.TimeSerieRam.PredictedValues.max = fifoUint(ar.Obs.TimeSerieRam.PredictedValues.max, aMax, ar.Limit) + + highest, lowest = 0, input.Stats.MemoryStats.Usage + + // When the number of timeseries is big enough, or if the rate of change <= 2 + // we can assume that the optimal limits can be calculated + medAmplitude, lenSerie := averrage(ar.Obs.TimeSerieRam.amplitude), len(ar.Obs.TimeSerieRam.PredictedValues.min) + ar.Obs.TimeSerieRam.PredictedValues.threshold = fifoUint(ar.Obs.TimeSerieRam.PredictedValues.threshold, medAmplitude, ar.Limit) + if lenSerie >= ar.Limit || (lenSerie > ar.Limit/2 && medAmplitude <= 2) { + + // This flag is set to stop data gathering and enable limit application + ar.Obs.TimeSerieRam.MemoryPrediction = true + } + + // Display result + ar.Config["memoryAR"]["nmin"] = strconv.Itoa(wAverrage(ar.Obs.TimeSerieRam.PredictedValues.min, generateMemoryWeight(ar.Obs.TimeSerieRam.PredictedValues.min, ar.Obs.TimeSerieRam.lowest))) + ar.Config["memoryAR"]["nmax"] = strconv.Itoa(wAverrage(ar.Obs.TimeSerieRam.PredictedValues.max, generateMemoryWeight(ar.Obs.TimeSerieRam.PredictedValues.max, ar.Obs.TimeSerieRam.highest))) + ar.Config["memoryAR"]["opti"] = strconv.Itoa(int(averrage(ar.Obs.TimeSerieRam.PredictedValues.threshold))) + ar.Config["memoryAR"]["usage"] = strconv.Itoa(int(input.Stats.MemoryStats.Usage)) + } else { + memoryTurn++ + } + + } else if strings.Compare(category, "cpu%") == 0 && !ar.Obs.TimeSerieCPU.CpuPrediction { + + // The logic for the cpu loop is pretty much the same as memory, but more focused + // on cpu cores + + // Generate CPU percent + deltaUsage := float64(input.Stats.CPUStats.CPUUsage.TotalUsage) - float64(oldUsage) + deltaSystem := float64(input.Stats.CPUStats.SystemUsage) - float64(oldSystem) + numCPUs := float64(input.Stats.CPUStats.OnlineCPUs) + CPUPercent := (deltaUsage / deltaSystem) * numCPUs * 100.0 + + ar.Obs.TimeSerieCPU.percent = fifoFloat(ar.Obs.TimeSerieCPU.percent, CPUPercent, ar.Limit) + ar.Obs.TimeSerieCPU.usage = fifoFloat(ar.Obs.TimeSerieCPU.usage, deltaUsage, ar.Limit) + + // Timeserie arrays are ready to be processed + if cpuTurn > ar.Limit { + cpuTurn = 0 + + avPercent, avUsage := averrageF(ar.Obs.TimeSerieCPU.percent), averrageF(ar.Obs.TimeSerieCPU.usage) + + ar.Obs.TimeSerieCPU.PredictedValues.percent = fifoFloat(ar.Obs.TimeSerieCPU.PredictedValues.percent, avPercent, ar.Limit) + ar.Obs.TimeSerieCPU.PredictedValues.usage = fifoFloat(ar.Obs.TimeSerieCPU.PredictedValues.usage, avUsage, ar.Limit) + + if len(ar.Obs.TimeSerieCPU.PredictedValues.percent) >= ar.Limit { + cBestPercent := averrageF(ar.Obs.TimeSerieCPU.PredictedValues.percent) + cBestUsage := averrageF(ar.Obs.TimeSerieCPU.PredictedValues.usage) + + // Display + ar.Config["cpuAR"]["percentOpti"] = strconv.FormatFloat(cBestPercent, 'f', 3, 64) + ar.Config["cpuAR"]["usageOpti"] = strconv.FormatFloat(cBestUsage, 'f', 0, 64) + + ar.Obs.TimeSerieCPU.CpuPrediction = true + + } + } else { + cpuTurn++ + } + oldSystem, oldUsage = input.Stats.CPUStats.SystemUsage, input.Stats.CPUStats.CPUUsage.TotalUsage + } + } + + input.AutoRange = ConvertAutoRange(ar.Config) + select { + case ar.Output <- input: + default: + } + } +} + +func generateMemoryWeight(arr, h []uint64) []float32 { + highest := highestOf(h) + + weight := make([]float32, 0, len(arr)) + + for _, n := range arr { + distance := float32((uint64(highest) / n)) + toAdd := 1 / distance + if math.IsInf(float64(toAdd), 1) { + toAdd = 1.0 + } + weight = append(weight, toAdd) + } + return weight +} + +func wAverrage(arr []uint64, weight []float32) int { + var total int + + for i, n := range arr { + total += int(float32(n) / weight[i]) + } + return total / len(arr) +} + +func averrageF(arr []float64) float64 { + var total float64 + + for _, n := range arr { + total += n + } + return float64(total / float64(len(arr))) +} + +func averrage(arr []uint64) uint64 { + var total uint64 + + for _, n := range arr { + total += n + } + return total / uint64(len(arr)) +} + +func processMemoryStats(mstats types.MemoryStats, min, max, threshold int) (int, int) { + usage := int(mstats.Usage) + + if usage > min + percent(max - min) * threshold { + + distance := percentageBetween(min, usage) + + min += distance * percent(min) + max = min + threshold * percent(min) + + } else if usage < (min - percent(max - min)) * threshold { + + min = usage + threshold * percent(usage) + max = min + threshold * percent(min) + + } + + return min, max +} + +func ConvertAutoRange(autoRange swarm.AutoRange) types.AutoRange { + sl := make(types.AutoRange) + for key := range autoRange { + sl[key] = make(map[string]string) + for subKey, subValue := range autoRange[key] { + sl[key][subKey] = subValue + } + } + return sl +} diff --git a/daemon/stats/collector.go b/daemon/stats/collector.go index 88e20984bc7a1..8ee213bc78c09 100644 --- a/daemon/stats/collector.go +++ b/daemon/stats/collector.go @@ -13,11 +13,12 @@ import ( // Collector manages and provides container resource stats type Collector struct { - m sync.Mutex - supervisor supervisor - interval time.Duration - publishers map[*container.Container]*pubsub.Publisher - bufReader *bufio.Reader + m sync.Mutex + supervisor supervisor + interval time.Duration + publishers map[*container.Container]*pubsub.Publisher + bufReader *bufio.Reader + AutoRangeWatcher map[string]*AutoRangeWatcher // The following fields are not set on Windows currently. clockTicksPerSecond uint64 @@ -26,10 +27,11 @@ type Collector struct { // NewCollector creates a stats collector that will poll the supervisor with the specified interval func NewCollector(supervisor supervisor, interval time.Duration) *Collector { s := &Collector{ - interval: interval, - supervisor: supervisor, - publishers: make(map[*container.Container]*pubsub.Publisher), - bufReader: bufio.NewReaderSize(nil, 128), + interval: interval, + supervisor: supervisor, + publishers: make(map[*container.Container]*pubsub.Publisher), + bufReader: bufio.NewReaderSize(nil, 128), + AutoRangeWatcher: make(map[string]*AutoRangeWatcher), } platformNewStatsCollector(s) diff --git a/vendor.conf b/vendor.conf index 2022f13770c95..4e3b6df0a4156 100644 --- a/vendor.conf +++ b/vendor.conf @@ -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 206ba213a5e8f..694b6b6ad1803 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 3adb9129b0939..13a09028fcf85 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, 0xdc, 0xbf, 0xc1, 0xe8, 0xa1, 0xe8, 0xbd, 0xfd, 0x2f, 0x72, - 0x6c, 0x6f, 0xed, 0xc5, 0xe8, 0xfa, 0x5f, 0xe8, 0xad, 0x97, 0x16, 0xe4, 0x70, 0xa4, 0x91, 0x2d, - 0xc7, 0x29, 0x9a, 0x43, 0x6f, 0xe4, 0x9b, 0xcf, 0xe7, 0x91, 0x7c, 0xfc, 0xf0, 0xf1, 0x71, 0xe0, - 0xcb, 0x9e, 0x27, 0xfb, 0xc3, 0xc3, 0xaa, 0xc3, 0x06, 0x1b, 0x2e, 0x73, 0x8e, 0x29, 0xdf, 0x10, - 0xaf, 0x09, 0x1f, 0x1c, 0x7b, 0x72, 0x83, 0x84, 0xde, 0x86, 0x08, 0xa9, 0x23, 0xaa, 0x21, 0x67, - 0x92, 0x21, 0x14, 0x01, 0xaa, 0x31, 0xa0,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xb1, 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, 0x37, 0x90, 0x15, 0xd4, 0xe1, - 0x54, 0x0a, 0xbb, 0xa0, 0x97, 0xfa, 0xd9, 0xac, 0x41, 0x3a, 0x1a, 0x32, 0x3e, 0x13, 0x38, 0xe6, - 0xa0, 0x15, 0x58, 0x90, 0x72, 0x64, 0x2f, 0x95, 0x53, 0xeb, 0xb9, 0x7a, 0xf6, 0xe2, 0x7c, 0x6d, - 0x61, 0x7f, 0xff, 0x15, 0x56, 0x36, 0x75, 0x5b, 0xf4, 0x99, 0x90, 0x01, 0x19, 0x50, 0xfb, 0x96, - 0x8e, 0xed, 0xb8, 0x8f, 0x5e, 0x01, 0xb8, 0x81, 0xe8, 0x3a, 0x3a, 0x3d, 0xd9, 0xb7, 0xf5, 0xea, - 0xbe, 0xba, 0x79, 0x75, 0x8d, 0xdd, 0x8e, 0xb9, 0x31, 0x97, 0x2e, 0xce, 0xd7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c, 0x1b, 0x78, 0xd2, 0x5e, 0x29, 0xa7, 0xd6, 0x17, 0xf0, 0xc4, 0x80, 0x76, 0x20, 0x2b, - 0x46, 0xc2, 0x91, 0xbe, 0xb0, 0x4b, 0x3a, 0x2e, 0xd5, 0x9b, 0x87, 0xe9, 0x44, 0x84, 0x28, 0x71, - 0xc4, 0x74, 0xb5, 0x05, 0x03, 0x3a, 0x60, 0x7c, 0xd4, 0x15, 0xaf, 0x49, 0x68, 0xdf, 0xd5, 0x23, - 0x41, 0x64, 0xea, 0xbc, 0x26, 0x21, 0xda, 0x81, 0xe5, 0x04, 0x20, 0xf4, 0x02, 0x2a, 0x84, 0x7d, - 0x4f, 0x07, 0xe4, 0xee, 0x95, 0x80, 0xb4, 0x02, 0xf9, 0xe8, 0x61, 0x14, 0x91, 0xe2, 0xc4, 0x47, - 0x44, 0x2a, 0x7d, 0x0d, 0x56, 0x22, 0x77, 0xa9, 0x9c, 0x73, 0x4c, 0x47, 0x26, 0x1d, 0xaa, 0xa6, - 0x12, 0xd8, 0x89, 0xe2, 0xea, 0x7c, 0x9d, 0xc7, 0x51, 0xe7, 0xc9, 0xfc, 0xe3, 0x54, 0x69, 0x13, - 0xac, 0xc4, 0x19, 0x46, 0x9f, 0xa9, 0xbb, 0xa4, 0xe7, 0x09, 0xc9, 0x47, 0x5d, 0x32, 0x94, 0x7d, - 0xfb, 0x67, 0x9a, 0x50, 0x88, 0x8d, 0xb5, 0xa1, 0xec, 0x97, 0xba, 0x30, 0x39, 0x0a, 0xa8, 0x0c, - 0x96, 0x3a, 0x62, 0x82, 0xf2, 0x13, 0xca, 0x55, 0x9d, 0xa6, 0x14, 0x9c, 0x34, 0xa9, 0x54, 0x20, - 0x28, 0xe1, 0x4e, 0x5f, 0x67, 0xe2, 0x3c, 0x36, 0x3d, 0x95, 0x5a, 0xe3, 0x7c, 0x63, 0x52, 0xab, - 0xe9, 0x96, 0x9e, 0x40, 0x21, 0x19, 0xd3, 0xff, 0x64, 0x41, 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0c, 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, 0x35, 0x48, 0x1c, 0xbb, 0x49, 0x4b, 0x8a, 0x8c, 0xc4, 0xda, + 0x96, 0x88, 0xa1, 0xac, 0xd6, 0x40, 0x01, 0x62, 0xb4, 0x3b, 0x22, 0x17, 0x5a, 0xee, 0x6c, 0x67, + 0x87, 0x32, 0x78, 0xeb, 0x31, 0x50, 0x81, 0xfe, 0x07, 0x02, 0x0a, 0x14, 0xfd, 0x03, 0xfa, 0x5f, + 0xf8, 0xd8, 0x63, 0x0b, 0x14, 0x42, 0xa3, 0x7b, 0x4f, 0xbd, 0xf5, 0xd2, 0x62, 0x66, 0x67, 0xc9, + 0xa5, 0x44, 0x4a, 0x36, 0xea, 0x43, 0x6f, 0x33, 0x6f, 0x3e, 0x9f, 0xb7, 0xef, 0xcd, 0xbc, 0xf7, + 0xe6, 0xcd, 0xc2, 0x67, 0x5d, 0x57, 0xf4, 0x06, 0x47, 0x15, 0x9b, 0xf5, 0x37, 0x1d, 0x66, 0x9f, + 0x50, 0xbe, 0x19, 0xbe, 0x24, 0xbc, 0x7f, 0xe2, 0x8a, 0x4d, 0x12, 0xb8, 0x9b, 0x61, 0x40, 0xed, + 0xb0, 0x12, 0x70, 0x26, 0x18, 0x42, 0x11, 0xa0, 0x12, 0x03, 0x2a, 0xa7, 0x3f, 0x2a, 0xde, 0xc6, + 0x17, 0xc3, 0x80, 0x6a, 0x7e, 0xf1, 0x6e, 0x97, 0x75, 0x99, 0x1a, 0x6e, 0xca, 0x91, 0x96, 0xae, + 0x75, 0x19, 0xeb, 0x7a, 0x74, 0x53, 0xcd, 0x8e, 0x06, 0xc7, 0x9b, 0xce, 0x80, 0x13, 0xe1, 0x32, + 0x5f, 0xaf, 0xaf, 0x5e, 0x5d, 0x27, 0xfe, 0x70, 0x16, 0xf5, 0x25, 0x27, 0x41, 0x40, 0xb9, 0xfe, + 0x60, 0xf9, 0x3c, 0x05, 0xd9, 0x3d, 0xe6, 0xd0, 0x76, 0x40, 0x6d, 0xb4, 0x03, 0x26, 0xf1, 0x7d, + 0x26, 0x94, 0xee, 0xd0, 0x32, 0x4a, 0xc6, 0x86, 0xb9, 0xb5, 0x5e, 0xb9, 0xee, 0x53, 0xa5, 0x3a, + 0x86, 0xd5, 0x52, 0xaf, 0x2e, 0xd6, 0xe7, 0x70, 0x92, 0x89, 0x7e, 0x0a, 0x79, 0x87, 0x86, 0x2e, + 0xa7, 0x4e, 0x87, 0x33, 0x8f, 0x5a, 0xf3, 0x25, 0x63, 0x63, 0x79, 0xeb, 0xfe, 0x34, 0x4d, 0xf2, + 0xe3, 0x98, 0x79, 0x14, 0x9b, 0x9a, 0x21, 0x27, 0x68, 0x07, 0xa0, 0x4f, 0xfb, 0x47, 0x94, 0x87, + 0x3d, 0x37, 0xb0, 0x16, 0x14, 0xfd, 0xff, 0x66, 0xd1, 0xa5, 0xed, 0x95, 0x67, 0x23, 0x38, 0x4e, + 0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x0b, 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, 0x0a, 0x39, 0x9b, 0xf9, 0x82, 0xb8, 0x3e, 0xe5, 0x3a, 0x73, 0xa7, 0x06, + 0xfd, 0x76, 0x0c, 0x92, 0xac, 0xdd, 0x39, 0x3c, 0x66, 0xa1, 0xef, 0x20, 0xc7, 0x69, 0xc8, 0x06, + 0xdc, 0xa6, 0xa1, 0x76, 0x65, 0x63, 0x7a, 0xf2, 0x45, 0x20, 0x4c, 0x7f, 0x3d, 0x70, 0x39, 0x95, + 0x01, 0x1c, 0xe2, 0x31, 0x15, 0x3d, 0x86, 0x0c, 0xa7, 0xa1, 0x20, 0x5c, 0xdc, 0x94, 0x7d, 0x38, + 0x82, 0xb4, 0x98, 0xe7, 0xda, 0x43, 0x1c, 0x33, 0x64, 0xe4, 0x05, 0x1e, 0xb1, 0x95, 0x56, 0x6b, + 0x71, 0x76, 0xe4, 0xb5, 0x62, 0x10, 0x1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d1, 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 069419c8d4c9e..02c1926c0ce57 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