From a3fae97ad4234cb11e68ab5a23e1fdb63991fe64 Mon Sep 17 00:00:00 2001 From: carolyn Date: Wed, 23 Aug 2017 15:38:15 -0700 Subject: [PATCH 1/2] rancher-compose-executor v0.14.17 --- vendor.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vendor.conf b/vendor.conf index 8982ee266..4d5e54e18 100644 --- a/vendor.conf +++ b/vendor.conf @@ -17,7 +17,7 @@ github.com/patrickmn/go-cache 1881a9bccb818787f68c52bfba648c6cf34c34fa github.com/pkg/errors 1d2e60385a13aaa66134984235061c2f9302520e github.com/rancher/go-rancher 8416cdbe06e6015287a06425e11598235b73a045 github.com/rancher/rancher-catalog-service a3a8b500adceb82b3a0387b2c7b06a60e7eeee9a -github.com/rancher/rancher-compose-executor v0.14.16 +github.com/rancher/rancher-compose-executor v0.14.17 github.com/rancher/rancher-docker-api-proxy 461b5e7022698283030495cf5693680699ce9c28 github.com/Sirupsen/logrus 26709e2714106fb8ad40b773b711ebce25b78914 github.com/spf13/pflag cb88ea77998c3f024757528e3305022ab50b43be From aff567871125eff3db9415d693966de98f1bfc98 Mon Sep 17 00:00:00 2001 From: carolyn Date: Wed, 23 Aug 2017 15:38:33 -0700 Subject: [PATCH 2/2] Update vendor --- .../rancher-compose-executor/config/schema.go | 2 + .../rancher-compose-executor/config/types.go | 272 +++++++++--------- .../rancher/configs.go | 1 + 3 files changed, 140 insertions(+), 135 deletions(-) diff --git a/vendor/github.com/rancher/rancher-compose-executor/config/schema.go b/vendor/github.com/rancher/rancher-compose-executor/config/schema.go index 8908805f2..60faed61c 100644 --- a/vendor/github.com/rancher/rancher-compose-executor/config/schema.go +++ b/vendor/github.com/rancher/rancher-compose-executor/config/schema.go @@ -107,6 +107,7 @@ var schemaDataV1 = `{ "mem_reservation": {"type": ["number", "string"]}, "memswap_limit": {"type": ["number", "string"]}, "mem_swappiness": {"type": "integer"}, + "milli_cpu_reservation": {"type": ["number", "string"]}, "metadata": {"type": "object"}, "net": {"type": "string"}, "network_driver": {"type": "object"}, @@ -363,6 +364,7 @@ var servicesSchemaDataV2 = `{ "mem_reservation": {"type": ["number", "string"]}, "memswap_limit": {"type": ["number", "string"]}, "mem_swappiness": {"type": "integer"}, + "milli_cpu_reservation": {"type": ["number", "string"]}, "metadata": {"type": "object"}, "network_driver": {"type": "object"}, "network_mode": {"type": "string"}, diff --git a/vendor/github.com/rancher/rancher-compose-executor/config/types.go b/vendor/github.com/rancher/rancher-compose-executor/config/types.go index bc760f1a9..80d7e64aa 100644 --- a/vendor/github.com/rancher/rancher-compose-executor/config/types.go +++ b/vendor/github.com/rancher/rancher-compose-executor/config/types.go @@ -22,73 +22,74 @@ type ResourceLookup interface { // ServiceConfigV1 holds version 1 of libcompose service configuration type ServiceConfigV1 struct { - BlkioWeight yaml.StringorInt `yaml:"blkio_weight,omitempty"` - BlkioWeightDevice []string `yaml:"blkio_weight_device,omitempty"` - Build string `yaml:"build,omitempty"` - CapAdd []string `yaml:"cap_add,omitempty"` - CapDrop []string `yaml:"cap_drop,omitempty"` - CgroupParent string `yaml:"cgroup_parent,omitempty"` - CPUPeriod yaml.StringorInt `yaml:"cpu_period,omitempty"` - CPUQuota yaml.StringorInt `yaml:"cpu_quota,omitempty"` - CPUSet string `yaml:"cpuset,omitempty"` - CPUShares yaml.StringorInt `yaml:"cpu_shares,omitempty"` - Command yaml.Command `yaml:"command,flow,omitempty"` - ContainerName string `yaml:"container_name,omitempty"` - DeviceReadBps yaml.MaporColonSlice `yaml:"device_read_bps,omitempty"` - DeviceReadIOps yaml.MaporColonSlice `yaml:"device_read_iops,omitempty"` - Devices []string `yaml:"devices,omitempty"` - DeviceWriteBps yaml.MaporColonSlice `yaml:"device_write_bps,omitempty"` - DeviceWriteIOps yaml.MaporColonSlice `yaml:"device_write_iops,omitempty"` - DNS yaml.Stringorslice `yaml:"dns,omitempty"` - DNSOpt []string `yaml:"dns_opt,omitempty"` - DNSSearch yaml.Stringorslice `yaml:"dns_search,omitempty"` - Dockerfile string `yaml:"dockerfile,omitempty"` - DomainName string `yaml:"domainname,omitempty"` - Entrypoint yaml.Command `yaml:"entrypoint,flow,omitempty"` - EnvFile yaml.Stringorslice `yaml:"env_file,omitempty"` - Environment yaml.MaporEqualSlice `yaml:"environment,omitempty"` - GroupAdd []string `yaml:"group_add,omitempty"` - Hostname string `yaml:"hostname,omitempty"` - Image string `yaml:"image,omitempty"` - Isolation string `yaml:"isolation,omitempty"` - Labels yaml.SliceorMap `yaml:"labels,omitempty"` - Links yaml.MaporColonSlice `yaml:"links,omitempty"` - LogDriver string `yaml:"log_driver,omitempty"` - MacAddress string `yaml:"mac_address,omitempty"` - MemLimit yaml.MemStringorInt `yaml:"mem_limit,omitempty"` - MemSwapLimit yaml.MemStringorInt `yaml:"memswap_limit,omitempty"` - MemSwappiness yaml.StringorInt `yaml:"mem_swappiness,omitempty"` - Name string `yaml:"name,omitempty"` - Net string `yaml:"net,omitempty"` - OomKillDisable bool `yaml:"oom_kill_disable,omitempty"` - OomScoreAdj yaml.StringorInt `yaml:"oom_score_adj,omitempty"` - Pid string `yaml:"pid,omitempty"` - Uts string `yaml:"uts,omitempty"` - Ipc string `yaml:"ipc,omitempty"` - Ports []string `yaml:"ports,omitempty"` - Privileged bool `yaml:"privileged,omitempty"` - Restart string `yaml:"restart,omitempty"` - ReadOnly bool `yaml:"read_only,omitempty"` - Secrets SecretReferences `yaml:"secrets,omitempty"` - ShmSize yaml.MemStringorInt `yaml:"shm_size,omitempty"` - StdinOpen bool `yaml:"stdin_open,omitempty"` - SecurityOpt []string `yaml:"security_opt,omitempty"` - StopSignal string `yaml:"stop_signal,omitempty"` - StopGracePeriod yaml.DurationStringorInt `yaml:"stop_grace_period,omitempty"` - Sysctls yaml.SliceorMap `yaml:"sysctls,omitempty"` - Init bool `yaml:"init,omitempty"` - Tmpfs yaml.Stringorslice `yaml:"tmpfs,omitempty"` - Tty bool `yaml:"tty,omitempty"` - User string `yaml:"user,omitempty"` - VolumeDriver string `yaml:"volume_driver,omitempty"` - Volumes []string `yaml:"volumes,omitempty"` - VolumesFrom []string `yaml:"volumes_from,omitempty"` - WorkingDir string `yaml:"working_dir,omitempty"` - Expose []string `yaml:"expose,omitempty"` - ExternalLinks []string `yaml:"external_links,omitempty"` - LogOpt map[string]string `yaml:"log_opt,omitempty"` - ExtraHosts []string `yaml:"extra_hosts,omitempty"` - Ulimits yaml.Ulimits `yaml:"ulimits,omitempty"` + BlkioWeight yaml.StringorInt `yaml:"blkio_weight,omitempty"` + BlkioWeightDevice []string `yaml:"blkio_weight_device,omitempty"` + Build string `yaml:"build,omitempty"` + CapAdd []string `yaml:"cap_add,omitempty"` + CapDrop []string `yaml:"cap_drop,omitempty"` + CgroupParent string `yaml:"cgroup_parent,omitempty"` + CPUPeriod yaml.StringorInt `yaml:"cpu_period,omitempty"` + CPUQuota yaml.StringorInt `yaml:"cpu_quota,omitempty"` + CPUSet string `yaml:"cpuset,omitempty"` + CPUShares yaml.StringorInt `yaml:"cpu_shares,omitempty"` + Command yaml.Command `yaml:"command,flow,omitempty"` + ContainerName string `yaml:"container_name,omitempty"` + DeviceReadBps yaml.MaporColonSlice `yaml:"device_read_bps,omitempty"` + DeviceReadIOps yaml.MaporColonSlice `yaml:"device_read_iops,omitempty"` + Devices []string `yaml:"devices,omitempty"` + DeviceWriteBps yaml.MaporColonSlice `yaml:"device_write_bps,omitempty"` + DeviceWriteIOps yaml.MaporColonSlice `yaml:"device_write_iops,omitempty"` + DNS yaml.Stringorslice `yaml:"dns,omitempty"` + DNSOpt []string `yaml:"dns_opt,omitempty"` + DNSSearch yaml.Stringorslice `yaml:"dns_search,omitempty"` + Dockerfile string `yaml:"dockerfile,omitempty"` + DomainName string `yaml:"domainname,omitempty"` + Entrypoint yaml.Command `yaml:"entrypoint,flow,omitempty"` + EnvFile yaml.Stringorslice `yaml:"env_file,omitempty"` + Environment yaml.MaporEqualSlice `yaml:"environment,omitempty"` + GroupAdd []string `yaml:"group_add,omitempty"` + Hostname string `yaml:"hostname,omitempty"` + Image string `yaml:"image,omitempty"` + Isolation string `yaml:"isolation,omitempty"` + Labels yaml.SliceorMap `yaml:"labels,omitempty"` + Links yaml.MaporColonSlice `yaml:"links,omitempty"` + LogDriver string `yaml:"log_driver,omitempty"` + MacAddress string `yaml:"mac_address,omitempty"` + MemLimit yaml.MemStringorInt `yaml:"mem_limit,omitempty"` + MemSwapLimit yaml.MemStringorInt `yaml:"memswap_limit,omitempty"` + MemSwappiness yaml.StringorInt `yaml:"mem_swappiness,omitempty"` + MilliCpuReservation yaml.StringorInt `yaml:"milli_cpu_reservation,omitempty"` + Name string `yaml:"name,omitempty"` + Net string `yaml:"net,omitempty"` + OomKillDisable bool `yaml:"oom_kill_disable,omitempty"` + OomScoreAdj yaml.StringorInt `yaml:"oom_score_adj,omitempty"` + Pid string `yaml:"pid,omitempty"` + Uts string `yaml:"uts,omitempty"` + Ipc string `yaml:"ipc,omitempty"` + Ports []string `yaml:"ports,omitempty"` + Privileged bool `yaml:"privileged,omitempty"` + Restart string `yaml:"restart,omitempty"` + ReadOnly bool `yaml:"read_only,omitempty"` + Secrets SecretReferences `yaml:"secrets,omitempty"` + ShmSize yaml.MemStringorInt `yaml:"shm_size,omitempty"` + StdinOpen bool `yaml:"stdin_open,omitempty"` + SecurityOpt []string `yaml:"security_opt,omitempty"` + StopSignal string `yaml:"stop_signal,omitempty"` + StopGracePeriod yaml.DurationStringorInt `yaml:"stop_grace_period,omitempty"` + Sysctls yaml.SliceorMap `yaml:"sysctls,omitempty"` + Init bool `yaml:"init,omitempty"` + Tmpfs yaml.Stringorslice `yaml:"tmpfs,omitempty"` + Tty bool `yaml:"tty,omitempty"` + User string `yaml:"user,omitempty"` + VolumeDriver string `yaml:"volume_driver,omitempty"` + Volumes []string `yaml:"volumes,omitempty"` + VolumesFrom []string `yaml:"volumes_from,omitempty"` + WorkingDir string `yaml:"working_dir,omitempty"` + Expose []string `yaml:"expose,omitempty"` + ExternalLinks []string `yaml:"external_links,omitempty"` + LogOpt map[string]string `yaml:"log_opt,omitempty"` + ExtraHosts []string `yaml:"extra_hosts,omitempty"` + Ulimits yaml.Ulimits `yaml:"ulimits,omitempty"` LbConfig *LBConfig `yaml:"lb_config"` LegacyLoadBalancerConfig *legacyClient.LoadBalancerConfig `yaml:"load_balancer_config,omitempty"` @@ -124,74 +125,75 @@ type Log struct { // ServiceConfig holds version 2 of libcompose service configuration type ServiceConfig struct { - BlkioWeight yaml.StringorInt `yaml:"blkio_weight,omitempty"` - BlkioWeightDevice []string `yaml:"blkio_weight_device,omitempty"` - Build yaml.Build `yaml:"build,omitempty"` - CapAdd []string `yaml:"cap_add,omitempty"` - CapDrop []string `yaml:"cap_drop,omitempty"` - CPUPeriod yaml.StringorInt `yaml:"cpu_period,omitempty"` - CPUSet string `yaml:"cpuset,omitempty"` - CPUShares yaml.StringorInt `yaml:"cpu_shares,omitempty"` - CPUQuota yaml.StringorInt `yaml:"cpu_quota,omitempty"` - Command yaml.Command `yaml:"command,flow,omitempty"` - CgroupParent string `yaml:"cgroup_parent,omitempty"` - ContainerName string `yaml:"container_name,omitempty"` - DeviceReadBps yaml.MaporColonSlice `yaml:"device_read_bps,omitempty"` - DeviceReadIOps yaml.MaporColonSlice `yaml:"device_read_iops,omitempty"` - Devices []string `yaml:"devices,omitempty"` - DeviceWriteBps yaml.MaporColonSlice `yaml:"device_write_bps,omitempty"` - DeviceWriteIOps yaml.MaporColonSlice `yaml:"device_write_iops,omitempty"` - DependsOn []string `yaml:"depends_on,omitempty"` - DNS yaml.Stringorslice `yaml:"dns,omitempty"` - DNSOpt []string `yaml:"dns_opt,omitempty"` - DNSSearch yaml.Stringorslice `yaml:"dns_search,omitempty"` - DomainName string `yaml:"domainname,omitempty"` - Entrypoint yaml.Command `yaml:"entrypoint,flow,omitempty"` - EnvFile yaml.Stringorslice `yaml:"env_file,omitempty"` - Environment yaml.MaporEqualSlice `yaml:"environment,omitempty"` - Expose []string `yaml:"expose,omitempty"` - Extends yaml.MaporEqualSlice `yaml:"extends,omitempty"` - ExternalLinks []string `yaml:"external_links,omitempty"` - ExtraHosts []string `yaml:"extra_hosts,omitempty"` - GroupAdd []string `yaml:"group_add,omitempty"` - Image string `yaml:"image,omitempty"` - Init bool `yaml:"init,omitempty"` - Isolation string `yaml:"isolation,omitempty"` - Hostname string `yaml:"hostname,omitempty"` - Ipc string `yaml:"ipc,omitempty"` - Labels yaml.SliceorMap `yaml:"labels,omitempty"` - Links yaml.MaporColonSlice `yaml:"links,omitempty"` - Logging Log `yaml:"logging,omitempty"` - MacAddress string `yaml:"mac_address,omitempty"` - MemLimit yaml.MemStringorInt `yaml:"mem_limit,omitempty"` - MemReservation yaml.MemStringorInt `yaml:"mem_reservation,omitempty"` - MemSwapLimit yaml.MemStringorInt `yaml:"memswap_limit,omitempty"` - MemSwappiness yaml.StringorInt `yaml:"mem_swappiness,omitempty"` - NetworkMode string `yaml:"network_mode,omitempty"` - Networks *yaml.Networks `yaml:"networks,omitempty"` - OomKillDisable bool `yaml:"oom_kill_disable,omitempty"` - OomScoreAdj yaml.StringorInt `yaml:"oom_score_adj,omitempty"` - Pid string `yaml:"pid,omitempty"` - Ports []string `yaml:"ports,omitempty"` - Privileged bool `yaml:"privileged,omitempty"` - Secrets SecretReferences `yaml:"secrets,omitempty"` - SecurityOpt []string `yaml:"security_opt,omitempty"` - ShmSize yaml.MemStringorInt `yaml:"shm_size,omitempty"` - StopSignal string `yaml:"stop_signal,omitempty"` - StopGracePeriod yaml.DurationStringorInt `yaml:"stop_grace_period,omitempty"` - Sysctls yaml.SliceorMap `yaml:"sysctls,omitempty"` - Tmpfs yaml.Stringorslice `yaml:"tmpfs,omitempty"` - VolumeDriver string `yaml:"volume_driver,omitempty"` - Volumes *yaml.Volumes `yaml:"volumes,omitempty"` - VolumesFrom []string `yaml:"volumes_from,omitempty"` - Uts string `yaml:"uts,omitempty"` - Restart string `yaml:"restart,omitempty"` - ReadOnly bool `yaml:"read_only,omitempty"` - StdinOpen bool `yaml:"stdin_open,omitempty"` - Tty bool `yaml:"tty,omitempty"` - User string `yaml:"user,omitempty"` - WorkingDir string `yaml:"working_dir,omitempty"` - Ulimits yaml.Ulimits `yaml:"ulimits,omitempty"` + BlkioWeight yaml.StringorInt `yaml:"blkio_weight,omitempty"` + BlkioWeightDevice []string `yaml:"blkio_weight_device,omitempty"` + Build yaml.Build `yaml:"build,omitempty"` + CapAdd []string `yaml:"cap_add,omitempty"` + CapDrop []string `yaml:"cap_drop,omitempty"` + CPUPeriod yaml.StringorInt `yaml:"cpu_period,omitempty"` + CPUSet string `yaml:"cpuset,omitempty"` + CPUShares yaml.StringorInt `yaml:"cpu_shares,omitempty"` + CPUQuota yaml.StringorInt `yaml:"cpu_quota,omitempty"` + Command yaml.Command `yaml:"command,flow,omitempty"` + CgroupParent string `yaml:"cgroup_parent,omitempty"` + ContainerName string `yaml:"container_name,omitempty"` + DeviceReadBps yaml.MaporColonSlice `yaml:"device_read_bps,omitempty"` + DeviceReadIOps yaml.MaporColonSlice `yaml:"device_read_iops,omitempty"` + Devices []string `yaml:"devices,omitempty"` + DeviceWriteBps yaml.MaporColonSlice `yaml:"device_write_bps,omitempty"` + DeviceWriteIOps yaml.MaporColonSlice `yaml:"device_write_iops,omitempty"` + DependsOn []string `yaml:"depends_on,omitempty"` + DNS yaml.Stringorslice `yaml:"dns,omitempty"` + DNSOpt []string `yaml:"dns_opt,omitempty"` + DNSSearch yaml.Stringorslice `yaml:"dns_search,omitempty"` + DomainName string `yaml:"domainname,omitempty"` + Entrypoint yaml.Command `yaml:"entrypoint,flow,omitempty"` + EnvFile yaml.Stringorslice `yaml:"env_file,omitempty"` + Environment yaml.MaporEqualSlice `yaml:"environment,omitempty"` + Expose []string `yaml:"expose,omitempty"` + Extends yaml.MaporEqualSlice `yaml:"extends,omitempty"` + ExternalLinks []string `yaml:"external_links,omitempty"` + ExtraHosts []string `yaml:"extra_hosts,omitempty"` + GroupAdd []string `yaml:"group_add,omitempty"` + Image string `yaml:"image,omitempty"` + Init bool `yaml:"init,omitempty"` + Isolation string `yaml:"isolation,omitempty"` + Hostname string `yaml:"hostname,omitempty"` + Ipc string `yaml:"ipc,omitempty"` + Labels yaml.SliceorMap `yaml:"labels,omitempty"` + Links yaml.MaporColonSlice `yaml:"links,omitempty"` + Logging Log `yaml:"logging,omitempty"` + MacAddress string `yaml:"mac_address,omitempty"` + MemLimit yaml.MemStringorInt `yaml:"mem_limit,omitempty"` + MemReservation yaml.MemStringorInt `yaml:"mem_reservation,omitempty"` + MemSwapLimit yaml.MemStringorInt `yaml:"memswap_limit,omitempty"` + MemSwappiness yaml.StringorInt `yaml:"mem_swappiness,omitempty"` + MilliCpuReservation yaml.StringorInt `yaml:"milli_cpu_reservation,omitempty"` + NetworkMode string `yaml:"network_mode,omitempty"` + Networks *yaml.Networks `yaml:"networks,omitempty"` + OomKillDisable bool `yaml:"oom_kill_disable,omitempty"` + OomScoreAdj yaml.StringorInt `yaml:"oom_score_adj,omitempty"` + Pid string `yaml:"pid,omitempty"` + Ports []string `yaml:"ports,omitempty"` + Privileged bool `yaml:"privileged,omitempty"` + Secrets SecretReferences `yaml:"secrets,omitempty"` + SecurityOpt []string `yaml:"security_opt,omitempty"` + ShmSize yaml.MemStringorInt `yaml:"shm_size,omitempty"` + StopSignal string `yaml:"stop_signal,omitempty"` + StopGracePeriod yaml.DurationStringorInt `yaml:"stop_grace_period,omitempty"` + Sysctls yaml.SliceorMap `yaml:"sysctls,omitempty"` + Tmpfs yaml.Stringorslice `yaml:"tmpfs,omitempty"` + VolumeDriver string `yaml:"volume_driver,omitempty"` + Volumes *yaml.Volumes `yaml:"volumes,omitempty"` + VolumesFrom []string `yaml:"volumes_from,omitempty"` + Uts string `yaml:"uts,omitempty"` + Restart string `yaml:"restart,omitempty"` + ReadOnly bool `yaml:"read_only,omitempty"` + StdinOpen bool `yaml:"stdin_open,omitempty"` + Tty bool `yaml:"tty,omitempty"` + User string `yaml:"user,omitempty"` + WorkingDir string `yaml:"working_dir,omitempty"` + Ulimits yaml.Ulimits `yaml:"ulimits,omitempty"` RancherConfig `yaml:",inline"` } diff --git a/vendor/github.com/rancher/rancher-compose-executor/rancher/configs.go b/vendor/github.com/rancher/rancher-compose-executor/rancher/configs.go index 9183dbd3b..ad2dd6116 100644 --- a/vendor/github.com/rancher/rancher-compose-executor/rancher/configs.go +++ b/vendor/github.com/rancher/rancher-compose-executor/rancher/configs.go @@ -97,6 +97,7 @@ func createLaunchConfig(r *RancherService, name string, serviceConfig *config.Se } result.VolumeDriver = hostConfig.VolumeDriver + result.MilliCpuReservation = int64(serviceConfig.MilliCpuReservation) setupNetworking(serviceConfig.NetworkMode, &result) setupVolumesFrom(serviceConfig.VolumesFrom, &result)