From 0dd075a47bebe6ad40866516dfa8eac2680dc110 Mon Sep 17 00:00:00 2001 From: Michael Crosby Date: Mon, 7 Mar 2016 15:23:52 -0800 Subject: [PATCH] Add update rpc for resource updates Signed-off-by: Michael Crosby --- api/grpc/server/server.go | 34 +++++ api/grpc/types/api.pb.go | 275 +++++++++++++++++++++----------------- api/grpc/types/api.proto | 14 ++ ctr/container.go | 54 ++++++++ runtime/container.go | 21 +++ runtime/runtime.go | 13 ++ supervisor/update.go | 9 +- 7 files changed, 298 insertions(+), 122 deletions(-) diff --git a/api/grpc/server/server.go b/api/grpc/server/server.go index 931d9bc..b30081c 100644 --- a/api/grpc/server/server.go +++ b/api/grpc/server/server.go @@ -174,6 +174,40 @@ func (s *apiServer) UpdateContainer(ctx context.Context, r *types.UpdateContaine e := &supervisor.UpdateTask{} e.ID = r.Id e.State = runtime.State(r.Status) + if r.Resources != nil { + rs := r.Resources + e.Resources = &runtime.Resource{} + if rs.CpuShares != 0 { + e.Resources.CPUShares = int64(rs.CpuShares) + } + if rs.BlkioWeight != 0 { + e.Resources.BlkioWeight = uint16(rs.BlkioWeight) + } + if rs.CpuPeriod != 0 { + e.Resources.CPUPeriod = int64(rs.CpuPeriod) + } + if rs.CpuQuota != 0 { + e.Resources.CPUQuota = int64(rs.CpuQuota) + } + if rs.CpusetCpus != "" { + e.Resources.CpusetCpus = rs.CpusetCpus + } + if rs.CpusetMems != "" { + e.Resources.CpusetMems = rs.CpusetMems + } + if rs.KernelMemoryLimit != 0 { + e.Resources.KernelMemory = int64(rs.KernelMemoryLimit) + } + if rs.MemoryLimit != 0 { + e.Resources.Memory = int64(rs.MemoryLimit) + } + if rs.MemoryReservation != 0 { + e.Resources.MemoryReservation = int64(rs.MemoryReservation) + } + if rs.MemorySwap != 0 { + e.Resources.MemorySwap = int64(rs.MemorySwap) + } + } s.sv.SendTask(e) if err := <-e.ErrorCh(); err != nil { return nil, err diff --git a/api/grpc/types/api.pb.go b/api/grpc/types/api.pb.go index 4f2ab5a..dc77d86 100644 --- a/api/grpc/types/api.pb.go +++ b/api/grpc/types/api.pb.go @@ -32,6 +32,7 @@ It has these top-level messages: Machine StateResponse UpdateContainerRequest + UpdateResource UpdateContainerResponse EventsRequest Event @@ -370,9 +371,10 @@ func (m *StateResponse) GetMachine() *Machine { } type UpdateContainerRequest struct { - Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` - Pid string `protobuf:"bytes,2,opt,name=pid" json:"pid,omitempty"` - Status string `protobuf:"bytes,3,opt,name=status" json:"status,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` + Pid string `protobuf:"bytes,2,opt,name=pid" json:"pid,omitempty"` + Status string `protobuf:"bytes,3,opt,name=status" json:"status,omitempty"` + Resources *UpdateResource `protobuf:"bytes,4,opt,name=resources" json:"resources,omitempty"` } func (m *UpdateContainerRequest) Reset() { *m = UpdateContainerRequest{} } @@ -380,13 +382,38 @@ func (m *UpdateContainerRequest) String() string { return proto.Compa func (*UpdateContainerRequest) ProtoMessage() {} func (*UpdateContainerRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{22} } +func (m *UpdateContainerRequest) GetResources() *UpdateResource { + if m != nil { + return m.Resources + } + return nil +} + +type UpdateResource struct { + BlkioWeight uint32 `protobuf:"varint,1,opt,name=blkioWeight" json:"blkioWeight,omitempty"` + CpuShares uint32 `protobuf:"varint,2,opt,name=cpuShares" json:"cpuShares,omitempty"` + CpuPeriod uint32 `protobuf:"varint,3,opt,name=cpuPeriod" json:"cpuPeriod,omitempty"` + CpuQuota uint32 `protobuf:"varint,4,opt,name=cpuQuota" json:"cpuQuota,omitempty"` + CpusetCpus string `protobuf:"bytes,5,opt,name=cpusetCpus" json:"cpusetCpus,omitempty"` + CpusetMems string `protobuf:"bytes,6,opt,name=cpusetMems" json:"cpusetMems,omitempty"` + MemoryLimit uint32 `protobuf:"varint,7,opt,name=memoryLimit" json:"memoryLimit,omitempty"` + MemorySwap uint32 `protobuf:"varint,8,opt,name=memorySwap" json:"memorySwap,omitempty"` + MemoryReservation uint32 `protobuf:"varint,9,opt,name=memoryReservation" json:"memoryReservation,omitempty"` + KernelMemoryLimit uint32 `protobuf:"varint,10,opt,name=kernelMemoryLimit" json:"kernelMemoryLimit,omitempty"` +} + +func (m *UpdateResource) Reset() { *m = UpdateResource{} } +func (m *UpdateResource) String() string { return proto.CompactTextString(m) } +func (*UpdateResource) ProtoMessage() {} +func (*UpdateResource) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{23} } + type UpdateContainerResponse struct { } func (m *UpdateContainerResponse) Reset() { *m = UpdateContainerResponse{} } func (m *UpdateContainerResponse) String() string { return proto.CompactTextString(m) } func (*UpdateContainerResponse) ProtoMessage() {} -func (*UpdateContainerResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{23} } +func (*UpdateContainerResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{24} } type EventsRequest struct { Timestamp uint64 `protobuf:"varint,1,opt,name=timestamp" json:"timestamp,omitempty"` @@ -395,7 +422,7 @@ type EventsRequest struct { func (m *EventsRequest) Reset() { *m = EventsRequest{} } func (m *EventsRequest) String() string { return proto.CompactTextString(m) } func (*EventsRequest) ProtoMessage() {} -func (*EventsRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{24} } +func (*EventsRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{25} } type Event struct { Type string `protobuf:"bytes,1,opt,name=type" json:"type,omitempty"` @@ -408,7 +435,7 @@ type Event struct { func (m *Event) Reset() { *m = Event{} } func (m *Event) String() string { return proto.CompactTextString(m) } func (*Event) ProtoMessage() {} -func (*Event) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{25} } +func (*Event) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{26} } type NetworkStats struct { Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` @@ -425,7 +452,7 @@ type NetworkStats struct { func (m *NetworkStats) Reset() { *m = NetworkStats{} } func (m *NetworkStats) String() string { return proto.CompactTextString(m) } func (*NetworkStats) ProtoMessage() {} -func (*NetworkStats) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{26} } +func (*NetworkStats) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{27} } type CpuUsage struct { TotalUsage uint64 `protobuf:"varint,1,opt,name=total_usage" json:"total_usage,omitempty"` @@ -437,7 +464,7 @@ type CpuUsage struct { func (m *CpuUsage) Reset() { *m = CpuUsage{} } func (m *CpuUsage) String() string { return proto.CompactTextString(m) } func (*CpuUsage) ProtoMessage() {} -func (*CpuUsage) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{27} } +func (*CpuUsage) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{28} } type ThrottlingData struct { Periods uint64 `protobuf:"varint,1,opt,name=periods" json:"periods,omitempty"` @@ -448,7 +475,7 @@ type ThrottlingData struct { func (m *ThrottlingData) Reset() { *m = ThrottlingData{} } func (m *ThrottlingData) String() string { return proto.CompactTextString(m) } func (*ThrottlingData) ProtoMessage() {} -func (*ThrottlingData) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{28} } +func (*ThrottlingData) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{29} } type CpuStats struct { CpuUsage *CpuUsage `protobuf:"bytes,1,opt,name=cpu_usage" json:"cpu_usage,omitempty"` @@ -459,7 +486,7 @@ type CpuStats struct { func (m *CpuStats) Reset() { *m = CpuStats{} } func (m *CpuStats) String() string { return proto.CompactTextString(m) } func (*CpuStats) ProtoMessage() {} -func (*CpuStats) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{29} } +func (*CpuStats) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{30} } func (m *CpuStats) GetCpuUsage() *CpuUsage { if m != nil { @@ -485,7 +512,7 @@ type MemoryData struct { func (m *MemoryData) Reset() { *m = MemoryData{} } func (m *MemoryData) String() string { return proto.CompactTextString(m) } func (*MemoryData) ProtoMessage() {} -func (*MemoryData) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{30} } +func (*MemoryData) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{31} } type MemoryStats struct { Cache uint64 `protobuf:"varint,1,opt,name=cache" json:"cache,omitempty"` @@ -498,7 +525,7 @@ type MemoryStats struct { func (m *MemoryStats) Reset() { *m = MemoryStats{} } func (m *MemoryStats) String() string { return proto.CompactTextString(m) } func (*MemoryStats) ProtoMessage() {} -func (*MemoryStats) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{31} } +func (*MemoryStats) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{32} } func (m *MemoryStats) GetUsage() *MemoryData { if m != nil { @@ -538,7 +565,7 @@ type BlkioStatsEntry struct { func (m *BlkioStatsEntry) Reset() { *m = BlkioStatsEntry{} } func (m *BlkioStatsEntry) String() string { return proto.CompactTextString(m) } func (*BlkioStatsEntry) ProtoMessage() {} -func (*BlkioStatsEntry) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{32} } +func (*BlkioStatsEntry) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{33} } type BlkioStats struct { IoServiceBytesRecursive []*BlkioStatsEntry `protobuf:"bytes,1,rep,name=io_service_bytes_recursive" json:"io_service_bytes_recursive,omitempty"` @@ -554,7 +581,7 @@ type BlkioStats struct { func (m *BlkioStats) Reset() { *m = BlkioStats{} } func (m *BlkioStats) String() string { return proto.CompactTextString(m) } func (*BlkioStats) ProtoMessage() {} -func (*BlkioStats) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{33} } +func (*BlkioStats) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{34} } func (m *BlkioStats) GetIoServiceBytesRecursive() []*BlkioStatsEntry { if m != nil { @@ -622,7 +649,7 @@ type HugetlbStats struct { func (m *HugetlbStats) Reset() { *m = HugetlbStats{} } func (m *HugetlbStats) String() string { return proto.CompactTextString(m) } func (*HugetlbStats) ProtoMessage() {} -func (*HugetlbStats) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{34} } +func (*HugetlbStats) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{35} } type CgroupStats struct { CpuStats *CpuStats `protobuf:"bytes,1,opt,name=cpu_stats" json:"cpu_stats,omitempty"` @@ -634,7 +661,7 @@ type CgroupStats struct { func (m *CgroupStats) Reset() { *m = CgroupStats{} } func (m *CgroupStats) String() string { return proto.CompactTextString(m) } func (*CgroupStats) ProtoMessage() {} -func (*CgroupStats) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{35} } +func (*CgroupStats) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{36} } func (m *CgroupStats) GetCpuStats() *CpuStats { if m != nil { @@ -673,7 +700,7 @@ type StatsResponse struct { func (m *StatsResponse) Reset() { *m = StatsResponse{} } func (m *StatsResponse) String() string { return proto.CompactTextString(m) } func (*StatsResponse) ProtoMessage() {} -func (*StatsResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{36} } +func (*StatsResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{37} } func (m *StatsResponse) GetNetworkStats() []*NetworkStats { if m != nil { @@ -696,7 +723,7 @@ type StatsRequest struct { func (m *StatsRequest) Reset() { *m = StatsRequest{} } func (m *StatsRequest) String() string { return proto.CompactTextString(m) } func (*StatsRequest) ProtoMessage() {} -func (*StatsRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{37} } +func (*StatsRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{38} } func init() { proto.RegisterType((*UpdateProcessRequest)(nil), "types.UpdateProcessRequest") @@ -722,6 +749,7 @@ func init() { proto.RegisterType((*Machine)(nil), "types.Machine") proto.RegisterType((*StateResponse)(nil), "types.StateResponse") proto.RegisterType((*UpdateContainerRequest)(nil), "types.UpdateContainerRequest") + proto.RegisterType((*UpdateResource)(nil), "types.UpdateResource") proto.RegisterType((*UpdateContainerResponse)(nil), "types.UpdateContainerResponse") proto.RegisterType((*EventsRequest)(nil), "types.EventsRequest") proto.RegisterType((*Event)(nil), "types.Event") @@ -1105,106 +1133,113 @@ var _API_serviceDesc = grpc.ServiceDesc{ } var fileDescriptor0 = []byte{ - // 1605 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xcc, 0x58, 0xeb, 0x6e, 0xdb, 0xc6, - 0x12, 0xb6, 0x2e, 0x96, 0xac, 0xd1, 0xc5, 0x36, 0x7d, 0x93, 0x95, 0x93, 0x13, 0x1f, 0x26, 0xe7, - 0x24, 0x38, 0x08, 0x8c, 0xd4, 0xe9, 0x25, 0x4d, 0x81, 0xa2, 0xa9, 0x13, 0x34, 0x2d, 0x9c, 0xd4, - 0x8d, 0xed, 0x02, 0xfd, 0x25, 0x50, 0xe4, 0x46, 0xda, 0x9a, 0x22, 0x59, 0xee, 0xd2, 0x97, 0x57, - 0x68, 0xd0, 0xfe, 0xec, 0xa3, 0xf4, 0x01, 0xfa, 0x38, 0x7d, 0x8a, 0xce, 0xde, 0x28, 0x92, 0xba, - 0xb8, 0x40, 0x51, 0xa0, 0x7f, 0x04, 0xec, 0xee, 0xcc, 0x37, 0xdf, 0x7e, 0x3b, 0x33, 0xdc, 0x15, - 0x34, 0x9c, 0x88, 0xee, 0x47, 0x71, 0xc8, 0x43, 0x6b, 0x99, 0x5f, 0x47, 0x84, 0xd9, 0x03, 0xd8, - 0x3c, 0x8b, 0x3c, 0x87, 0x93, 0xe3, 0x38, 0x74, 0x09, 0x63, 0x6f, 0xc8, 0x0f, 0x09, 0x61, 0xdc, - 0x02, 0x28, 0x53, 0xaf, 0x5b, 0xda, 0x2b, 0x3d, 0x68, 0x58, 0x4d, 0xa8, 0x44, 0x38, 0x28, 0xcb, - 0x01, 0xae, 0xb8, 0x7e, 0xc8, 0xc8, 0x09, 0xf7, 0x68, 0xd0, 0xad, 0xe0, 0xdc, 0x8a, 0xd5, 0x86, - 0xe5, 0x4b, 0xea, 0xf1, 0x51, 0xb7, 0x8a, 0xc3, 0xb6, 0xd5, 0x81, 0xda, 0x88, 0xd0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ac, 0xe7, 0xe5, 0x5c, 0x29, 0xc8, 0xd9, 0x28, 0xc8, 0x09, 0x72, - 0xbc, 0x09, 0x2d, 0xd7, 0x89, 0x9c, 0x01, 0xf5, 0x29, 0xa7, 0x84, 0x75, 0x9b, 0x12, 0x7e, 0x07, - 0x56, 0x9d, 0x28, 0x72, 0xe2, 0x71, 0x18, 0xe3, 0x66, 0xde, 0x52, 0x9f, 0x74, 0x5b, 0xc6, 0x9c, - 0x11, 0x9f, 0x06, 0xc9, 0xd5, 0x91, 0x38, 0x84, 0x6e, 0x5b, 0xce, 0xa2, 0x79, 0x10, 0xbe, 0x26, - 0x97, 0xc7, 0x31, 0xbd, 0x40, 0xdb, 0x21, 0xe2, 0x74, 0xc4, 0xe6, 0x50, 0xdc, 0xaa, 0xdc, 0x09, - 0x32, 0x4c, 0xb4, 0x06, 0x6d, 0x31, 0x18, 0x6a, 0x51, 0xdb, 0xd6, 0x36, 0x74, 0x1c, 0xcf, 0xc3, - 0xd8, 0x21, 0x4a, 0xf2, 0x05, 0xf5, 0x18, 0x0a, 0x51, 0x41, 0x71, 0x37, 0xc1, 0xca, 0x2a, 0xa9, - 0x05, 0x3e, 0x4a, 0x0f, 0x3b, 0xcd, 0xa2, 0x59, 0x2a, 0xff, 0x37, 0x97, 0x66, 0x65, 0xa9, 0xec, - 0xba, 0x39, 0xf9, 0x74, 0xc1, 0xee, 0x41, 0x77, 0x1a, 0x4d, 0x47, 0x7a, 0x0c, 0x3b, 0xcf, 0x89, - 0x4f, 0x6e, 0x8a, 0x84, 0x47, 0x14, 0x38, 0x63, 0xa2, 0x32, 0x44, 0x00, 0x4e, 0x3b, 0x69, 0xc0, - 0xbb, 0xb0, 0x75, 0x44, 0x19, 0x5f, 0x08, 0x67, 0x7f, 0x07, 0x30, 0x31, 0x48, 0xc1, 0xd3, 0x50, - 0xe4, 0x8a, 0x72, 0x9d, 0x36, 0x28, 0x22, 0x77, 0x23, 0x5d, 0xc9, 0x1b, 0xd0, 0x4c,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 0xad, 0x4d, 0x6d, 0x9b, 0x7b, 0x51, 0xf6, - 0xb6, 0x0a, 0xb3, 0xa9, 0xe3, 0x11, 0xb4, 0x73, 0x4f, 0x6c, 0xeb, 0x56, 0x2e, 0x56, 0xfe, 0x1d, - 0xd9, 0xfb, 0xd7, 0xec, 0xc5, 0x14, 0xed, 0x10, 0x60, 0xf2, 0x64, 0xb2, 0xba, 0xda, 0x7a, 0xea, - 0x3d, 0xda, 0xdb, 0x9d, 0xb1, 0x92, 0x82, 0x9c, 0xc1, 0x5a, 0xf1, 0x4d, 0x64, 0x15, 0x54, 0x2d, - 0xbe, 0x60, 0x7a, 0x77, 0xe6, 0xae, 0x67, 0x61, 0x8b, 0x2f, 0xa3, 0x14, 0x76, 0xce, 0x3b, 0x2b, - 0x85, 0x9d, 0xfb, 0xa4, 0x5a, 0xb2, 0xbe, 0x86, 0x4e, 0xfe, 0x51, 0x63, 0x19, 0x91, 0x66, 0xbe, - 0xb5, 0x7a, 0xb7, 0xe7, 0xac, 0xa6, 0x80, 0xef, 0xc3, 0xb2, 0x7a, 0xbe, 0x98, 0x8c, 0xcf, 0xbe, - 0x78, 0x7a, 0x9b, 0xf9, 0xc9, 0xd4, 0xeb, 0x11, 0xd4, 0xd4, 0xf5, 0x32, 0x4d, 0x80, 0xdc, 0x6d, - 0xb3, 0xd7, 0xca, 0xce, 0xda, 0x4b, 0x8f, 0x4a, 0x26, 0x0e, 0xcb, 0xc5, 0x61, 0xb3, 0xe2, 0x64, - 0x0e, 0x67, 0x50, 0x93, 0x7f, 0x02, 0x3d, 0xfe, 0x23, 0x00, 0x00, 0xff, 0xff, 0xfd, 0x2d, 0x77, - 0x4b, 0x11, 0x12, 0x00, 0x00, + // 1723 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xcc, 0x58, 0xd9, 0x6e, 0xdb, 0x46, + 0x17, 0xb6, 0x76, 0xeb, 0x68, 0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fc, 0xe3, 0x62, 0x10, 0xfb, 0x8e, + 0x47, 0x7a, 0x16, 0xfa, 0x98, 0x84, 0x31, 0x22, 0xf6, 0x79, 0x18, 0xb8, 0x3e, 0x13, 0x61, 0xd4, + 0x79, 0x18, 0x54, 0x44, 0x55, 0x16, 0x4b, 0x0c, 0x03, 0x97, 0x41, 0x2c, 0xc3, 0xd0, 0x6b, 0x12, + 0x45, 0x9d, 0xaa, 0x5e, 0x7b, 0xd6, 0x80, 0x78, 0xb4, 0x53, 0xdb, 0x2d, 0xed, 0xd5, 0xcd, 0x4f, + 0x61, 0x7b, 0x2a, 0x18, 0x19, 0xa8, 0x71, 0x17, 0xea, 0xb6, 0xde, 0x14, 0x41, 0x35, 0x0e, 0x56, + 0xf7, 0x05, 0x80, 0xfb, 0x89, 0xb0, 0xf9, 0x18, 0x5a, 0x27, 0xee, 0xd0, 0xb7, 0xbc, 0x1b, 0x31, + 0xe4, 0x91, 0x08, 0x49, 0x11, 0x78, 0xcb, 0x5c, 0x85, 0xb6, 0xd6, 0x54, 0xc8, 0xfc, 0x5c, 0x84, + 0xb5, 0xa7, 0x8e, 0xb3, 0xa0, 0x28, 0xab, 0xb0, 0xcc, 0x48, 0x34, 0x76, 0xb9, 0x95, 0xa2, 0xa8, + 0xc2, 0x0e, 0x94, 0x63, 0x8a, 0xf1, 0x95, 0x44, 0x7c, 0x0d, 0x15, 0xdf, 0x19, 0x6e, 0x19, 0x4d, + 0x28, 0x5b, 0xd1, 0x90, 0x22, 0x30, 0x25, 0x19, 0x0b, 0xf1, 0x2f, 0x10, 0x15, 0xb5, 0xb0, 0x2f, + 0x1d, 0x05, 0x89, 0x8a, 0xb2, 0x96, 0x85, 0x73, 0x39, 0x07, 0x67, 0x3d, 0x07, 0x27, 0x88, 0xf5, + 0x06, 0x34, 0x6d, 0x2b, 0xb4, 0x06, 0xae, 0xe7, 0x32, 0x97, 0xd0, 0x4e, 0x43, 0x98, 0xdf, 0x86, + 0x15, 0x2b, 0x0c, 0xad, 0x68, 0x1c, 0x44, 0x98, 0xcc, 0x1b, 0xd7, 0x23, 0x9d, 0xa6, 0x16, 0xa7, + 0xc4, 0x73, 0xfd, 0xf8, 0xea, 0x88, 0x17, 0xa1, 0xd3, 0x12, 0xbb, 0x28, 0xee, 0x07, 0xaf, 0xc8, + 0x65, 0x2f, 0x72, 0x2f, 0x50, 0x76, 0x88, 0x76, 0xda, 0x3c, 0x39, 0x04, 0xb7, 0x2c, 0x32, 0xc1, + 0x08, 0x63, 0x85, 0x41, 0x8b, 0x2f, 0x86, 0x0a, 0xd4, 0x96, 0xb1, 0x05, 0x6d, 0xcb, 0x71, 0xd0, + 0x77, 0x80, 0x90, 0x7c, 0xe1, 0x3a, 0x14, 0x81, 0x28, 0x21, 0xb8, 0x1b, 0x60, 0xa4, 0x91, 0x54, + 0x00, 0x1f, 0x25, 0xc5, 0x4e, 0xba, 0x68, 0x16, 0xca, 0xff, 0xcf, 0xb4, 0x59, 0x51, 0x20, 0xbb, + 0xa6, 0x2b, 0x9f, 0x1c, 0x98, 0x5d, 0xe8, 0x4c, 0x5b, 0x53, 0x9e, 0x1e, 0xc1, 0xf6, 0x33, 0xe2, + 0x91, 0x9b, 0x3c, 0x61, 0x89, 0x7c, 0x6b, 0x4c, 0x64, 0x87, 0x70, 0x83, 0xd3, 0x4a, 0xca, 0xe0, + 0x5d, 0xd8, 0x3c, 0x72, 0x29, 0x5b, 0x68, 0xce, 0xfc, 0x0e, 0x60, 0x22, 0x90, 0x18, 0x4f, 0x5c, + 0x91, 0x2b, 0x97, 0xa9, 0xb6, 0x41, 0x10, 0x99, 0x1d, 0x2a, 0x26, 0xaf, 0x43, 0x23, 0xf6, 0xdd, + 0xab, 0x93, 0xc0, 0x3e, 0x27, 0x8c, 0x0a, 0x22, 0x09, 0x7a, 0xd3, 0x11, 0xf1, 0x3c, 0xc1, 0xa3, + 0x65, 0xf3, 0x33, 0xd8, 0xca, 0xfb, 0x57, 0x34, 0x79, 0x07, 0x1a, 0x13, 0xb4, 0x28, 0x7a, 0x2b, + 0xcd, 0x83, 0xab, 0x79, 0xc2, 0x10, 0xad, 0x59, 0x81, 0xef, 0x42, 0x3b, 0xa1, 0x94, 0x10, 0x92, + 0x8d, 0x66, 0xb1, 0x98, 0x2a, 0x89, 0xb7, 0x45, 0xa8, 0xa9, 0x72, 0xea, 0x86, 0xfd, 0x07, 0x29, + 0xb1, 0x06, 0x75, 0x7a, 0x4d, 0x19, 0x19, 0xf7, 0x14, 0x31, 0x5a, 0xff, 0x2e, 0x62, 0xfc, 0x54, + 0x80, 0x7a, 0x02, 0xd8, 0x8d, 0x63, 0xf3, 0x7f, 0x50, 0x0f, 0x25, 0x74, 0x44, 0xf2, 0xa3, 0x71, + 0xd0, 0x56, 0xa8, 0x68, 0x48, 0x27, 0x70, 0x97, 0x73, 0x63, 0x52, 0xa2, 0x83, 0xc0, 0x85, 0x9c, + 0x5d, 0x55, 0xce, 0x2e, 0x63, 0x05, 0x6a, 0x51, 0xec, 0x33, 0x17, 0x9b, 0x4b, 0x4c, 0x0d, 0xf3, + 0x3e, 0xd4, 0x5e, 0x5a, 0xf6, 0x08, 0xa3, 0xe1, 0x92, 0x76, 0xa8, 0xca, 0x26, 0x6e, 0x85, 0x31, + 0xc1, 0x6c, 0xaf, 0x45, 0x28, 0x65, 0xf3, 0x1b, 0x1c, 0x97, 0xb2, 0x09, 0x54, 0xf7, 0xdc, 0x43, + 0xae, 0xe9, 0x44, 0x74, 0xf3, 0x4c, 0x4d, 0x59, 0xe3, 0x0e, 0xd4, 0xc6, 0xd2, 0xbe, 0xa2, 0xa3, + 0x8e, 0x5f, 0x79, 0x35, 0xcf, 0x61, 0x4b, 0xde, 0x36, 0x0b, 0xef, 0x94, 0xa9, 0x79, 0x2c, 0x53, + 0x96, 0x17, 0xc9, 0x1e, 0xd4, 0x23, 0x42, 0x83, 0x38, 0x42, 0x40, 0x04, 0x0a, 0x8d, 0x83, 0x4d, + 0xdd, 0x3b, 0xc2, 0xf4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f, 0x7e, 0x02, 0x76, 0x37, 0xb2, 0x9b, 0x89, 0xd6, 0x43, 0xa8, 0xca, 0xcf, + 0xcb, 0xa4, 0x01, 0x32, 0x5f, 0x9b, 0xdd, 0x66, 0x7a, 0xd7, 0x5c, 0x7a, 0x58, 0xd0, 0x7e, 0x68, + 0xc6, 0x0f, 0x9d, 0xe5, 0x27, 0x55, 0x9c, 0x41, 0x55, 0xfc, 0x2b, 0xf6, 0xe8, 0xcf, 0x00, 0x00, + 0x00, 0xff, 0xff, 0x96, 0xc1, 0x71, 0xd3, 0x22, 0x13, 0x00, 0x00, } diff --git a/api/grpc/types/api.proto b/api/grpc/types/api.proto index 4b67a95..f8b8b77 100644 --- a/api/grpc/types/api.proto +++ b/api/grpc/types/api.proto @@ -159,6 +159,20 @@ message UpdateContainerRequest { string id = 1; // ID of container string pid = 2; string status = 3; // Status to whcih containerd will try to change + UpdateResource resources =4; +} + +message UpdateResource { + uint32 blkioWeight =1; + uint32 cpuShares = 2; + uint32 cpuPeriod = 3; + uint32 cpuQuota = 4; + string cpusetCpus = 5; + string cpusetMems = 6; + uint32 memoryLimit = 7; + uint32 memorySwap = 8; + uint32 memoryReservation = 9; + uint32 kernelMemoryLimit = 10; } message UpdateContainerResponse { diff --git a/ctr/container.go b/ctr/container.go index 4af28eb..809dfff 100644 --- a/ctr/container.go +++ b/ctr/container.go @@ -53,6 +53,7 @@ var containersCommand = cli.Command{ startCommand, statsCommand, watchCommand, + updateCommand, }, Action: listContainers, } @@ -517,6 +518,59 @@ var statsCommand = cli.Command{ }, } +var updateCommand = cli.Command{ + Name: "update", + Usage: "update a containers resources", + Flags: []cli.Flag{ + cli.IntFlag{ + Name: "memory-limit", + }, + cli.IntFlag{ + Name: "memory-reservation", + }, + cli.IntFlag{ + Name: "memory-swap", + }, + cli.IntFlag{ + Name: "cpu-quota", + }, + cli.IntFlag{ + Name: "cpu-period", + }, + cli.IntFlag{ + Name: "kernel-limit", + }, + cli.IntFlag{ + Name: "blkio-weight", + }, + cli.StringFlag{ + Name: "cpuset-cpus", + }, + cli.StringFlag{ + Name: "cpuset-mems", + }, + }, + Action: func(context *cli.Context) { + req := &types.UpdateContainerRequest{ + Id: context.Args().First(), + } + req.Resources = &types.UpdateResource{} + req.Resources.MemoryLimit = uint32(context.Int("memory-limit")) + req.Resources.MemoryReservation = uint32(context.Int("memory-reservation")) + req.Resources.MemorySwap = uint32(context.Int("memory-swap")) + req.Resources.BlkioWeight = uint32(context.Int("blkio-weight")) + req.Resources.CpuPeriod = uint32(context.Int("cpu-period")) + req.Resources.CpuQuota = uint32(context.Int("cpu-quota")) + req.Resources.CpuShares = uint32(context.Int("cpu-shares")) + req.Resources.CpusetCpus = context.String("cpuset-cpus") + req.Resources.CpusetMems = context.String("cpuset-mems") + c := getClient(context) + if _, err := c.UpdateContainer(netcontext.Background(), req); err != nil { + fatal(err.Error(), 1) + } + }, +} + func waitForExit(c types.APIClient, events types.API_EventsClient, id, pid string, closer func()) error { for { e, err := events.Recv() diff --git a/runtime/container.go b/runtime/container.go index e34805e..619200d 100644 --- a/runtime/container.go +++ b/runtime/container.go @@ -48,6 +48,8 @@ type Container interface { Runtime() string // OOM signals the channel if the container received an OOM notification OOM() (OOM, error) + // UpdateResource updates the containers resources to new values + UpdateResources(*Resource) error } type OOM interface { @@ -213,3 +215,22 @@ func (c *container) RemoveProcess(pid string) error { delete(c.processes, pid) return os.RemoveAll(filepath.Join(c.root, c.id, pid)) } + +func (c *container) UpdateResources(r *Resource) error { + container, err := c.getLibctContainer() + if err != nil { + return err + } + config := container.Config() + config.Cgroups.Resources.CpuShares = r.CPUShares + config.Cgroups.Resources.BlkioWeight = r.BlkioWeight + config.Cgroups.Resources.CpuPeriod = r.CPUPeriod + config.Cgroups.Resources.CpuQuota = r.CPUQuota + config.Cgroups.Resources.CpusetCpus = r.CpusetCpus + config.Cgroups.Resources.CpusetMems = r.CpusetMems + config.Cgroups.Resources.KernelMemory = r.KernelMemory + config.Cgroups.Resources.Memory = r.Memory + config.Cgroups.Resources.MemoryReservation = r.MemoryReservation + config.Cgroups.Resources.MemorySwap = r.MemorySwap + return container.Set(config) +} diff --git a/runtime/runtime.go b/runtime/runtime.go index 82685aa..39ed404 100644 --- a/runtime/runtime.go +++ b/runtime/runtime.go @@ -32,6 +32,19 @@ const ( type State string +type Resource struct { + CPUShares int64 + BlkioWeight uint16 + CPUPeriod int64 + CPUQuota int64 + CpusetCpus string + CpusetMems string + KernelMemory int64 + Memory int64 + MemoryReservation int64 + MemorySwap int64 +} + const ( Paused = State("paused") Stopped = State("stopped") diff --git a/supervisor/update.go b/supervisor/update.go index 4ef2360..7d34d82 100644 --- a/supervisor/update.go +++ b/supervisor/update.go @@ -8,8 +8,9 @@ import ( type UpdateTask struct { baseTask - ID string - State runtime.State + ID string + State runtime.State + Resources *runtime.Resource } func (s *Supervisor) updateContainer(t *UpdateTask) error { @@ -41,6 +42,10 @@ func (s *Supervisor) updateContainer(t *UpdateTask) error { default: return ErrUnknownContainerStatus } + return nil + } + if t.Resources != nil { + return container.UpdateResources(t.Resources) } return nil }