From 0887e264799e6ba6f68b80f87b8930957b19e2d9 Mon Sep 17 00:00:00 2001 From: Justin Chadwell Date: Mon, 24 Jun 2024 15:52:18 +0100 Subject: [PATCH] config: add freeBytes gc policy entry Signed-off-by: Justin Chadwell --- api/services/control/control.pb.go | 322 ++++++++++-------- api/services/control/control.proto | 1 + api/types/worker.pb.go | 90 +++-- api/types/worker.proto | 1 + cache/manager.go | 58 +++- client/prune.go | 5 +- client/workers.go | 1 + cmd/buildctl/debug/workers.go | 3 + cmd/buildctl/prune.go | 10 +- cmd/buildkitd/config/config.go | 1 + cmd/buildkitd/config/gcpolicy.go | 3 +- cmd/buildkitd/config/gcpolicy_unix.go | 16 - cmd/buildkitd/config/gcpolicy_windows.go | 26 -- cmd/buildkitd/main.go | 1 + control/control.go | 2 + .../disk/disk_openbsd.go | 11 +- util/disk/disk_unix.go | 18 + util/disk/disk_windows.go | 27 ++ 18 files changed, 358 insertions(+), 238 deletions(-) rename cmd/buildkitd/config/gcpolicy_openbsd.go => util/disk/disk_openbsd.go (51%) create mode 100644 util/disk/disk_unix.go create mode 100644 util/disk/disk_windows.go diff --git a/api/services/control/control.pb.go b/api/services/control/control.pb.go index 3c24ebb5b5ccd..603658e6cf7f8 100644 --- a/api/services/control/control.pb.go +++ b/api/services/control/control.pb.go @@ -70,6 +70,7 @@ type PruneRequest struct { All bool `protobuf:"varint,2,opt,name=all,proto3" json:"all,omitempty"` KeepDuration int64 `protobuf:"varint,3,opt,name=keepDuration,proto3" json:"keepDuration,omitempty"` KeepBytes int64 `protobuf:"varint,4,opt,name=keepBytes,proto3" json:"keepBytes,omitempty"` + FreeBytes int64 `protobuf:"varint,5,opt,name=freeBytes,proto3" json:"freeBytes,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -136,6 +137,13 @@ func (m *PruneRequest) GetKeepBytes() int64 { return 0 } +func (m *PruneRequest) GetFreeBytes() int64 { + if m != nil { + return m.FreeBytes + } + return 0 +} + type DiskUsageRequest struct { Filter []string `protobuf:"bytes,1,rep,name=filter,proto3" json:"filter,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` @@ -2009,152 +2017,153 @@ func init() { func init() { proto.RegisterFile("control.proto", fileDescriptor_0c5120591600887d) } var fileDescriptor_0c5120591600887d = []byte{ - // 2315 bytes of a gzipped FileDescriptorProto + // 2325 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x59, 0x4f, 0x73, 0x1b, 0x49, - 0x15, 0xcf, 0x48, 0xb2, 0x2c, 0x3d, 0xc9, 0x8e, 0xdc, 0xc9, 0x86, 0x61, 0xc8, 0xda, 0xce, 0x6c, + 0x15, 0xcf, 0xc8, 0xb2, 0x2c, 0x3d, 0xc9, 0x8e, 0xdc, 0xc9, 0x86, 0x61, 0xc8, 0xda, 0xce, 0x6c, 0x02, 0xae, 0x90, 0x8c, 0xbc, 0x82, 0x90, 0xac, 0x03, 0x21, 0xb6, 0x25, 0x36, 0x0e, 0x49, 0xc5, 0xdb, 0x76, 0x36, 0xd4, 0x56, 0x05, 0x6a, 0x2c, 0xb5, 0x95, 0x29, 0x8f, 0x66, 0x86, 0xee, 0x96, - 0x37, 0xde, 0x13, 0x27, 0xaa, 0xb8, 0x50, 0x5c, 0x28, 0x2e, 0xdc, 0x39, 0x71, 0xe6, 0xcc, 0x81, - 0xaa, 0x1c, 0x39, 0xef, 0x21, 0x50, 0xf9, 0x00, 0x14, 0x47, 0xb8, 0x6d, 0xf5, 0x9f, 0x91, 0x46, - 0x9a, 0x91, 0x2d, 0x25, 0x39, 0xa9, 0x5f, 0xf7, 0xfb, 0xbd, 0x79, 0xef, 0xf5, 0xeb, 0xd7, 0xef, - 0xb5, 0x60, 0xa1, 0x1d, 0x06, 0x9c, 0x86, 0xbe, 0x13, 0xd1, 0x90, 0x87, 0xa8, 0xd6, 0x0b, 0x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x9f, 0x32, 0x29, 0x64, - 0xfe, 0x4c, 0x21, 0x05, 0x29, 0x20, 0x81, 0x41, 0xcb, 0x00, 0xd2, 0x09, 0xdb, 0x61, 0x3f, 0xe0, - 0x66, 0x49, 0xea, 0x9e, 0x98, 0x41, 0xab, 0x50, 0x69, 0x12, 0xd6, 0xa6, 0x5e, 0x24, 0xb7, 0xba, - 0x2c, 0xdd, 0x93, 0x9c, 0x12, 0x12, 0x94, 0x07, 0xf7, 0x4f, 0x22, 0x62, 0x82, 0x64, 0x48, 0xcc, - 0x88, 0xbd, 0xdc, 0x7b, 0xe1, 0x52, 0xd2, 0x31, 0x2b, 0xd2, 0x5d, 0x9a, 0x12, 0xfe, 0x55, 0x9e, - 0x60, 0x66, 0x55, 0x6e, 0x72, 0x4c, 0xda, 0xbf, 0x29, 0x41, 0x75, 0x4f, 0x1c, 0x85, 0x38, 0x1c, - 0x6a, 0x90, 0xc7, 0xe4, 0x50, 0xef, 0x8d, 0x18, 0x22, 0x07, 0xa0, 0x49, 0x0e, 0xbd, 0xc0, 0x93, - 0x5a, 0xe5, 0xa4, 0xe1, 0x8b, 0x4e, 0x74, 0xe0, 0x0c, 0x67, 0x71, 0x82, 0x03, 0x39, 0x80, 0x5a, - 0x2f, 0xa3, 0x90, 0x72, 0x42, 0x9b, 0x24, 0xa2, 0xa4, 0x2d, 0x1c, 0x28, 0xf7, 0xaf, 0x8c, 0x33, - 0x56, 0x50, 0x1f, 0xbe, 0x15, 0xcf, 0x6e, 0x72, 0x4e, 0x59, 0x02, 0x54, 0x90, 0x41, 0x76, 0x37, - 0x1d, 0x64, 0x49, 0x95, 0x9d, 0x09, 0xe8, 0x56, 0xc0, 0xe9, 0x09, 0x9e, 0x24, 0x5b, 0xf8, 0x64, - 0x8f, 0x30, 0x26, 0x6c, 0x92, 0x01, 0x83, 0x63, 0x12, 0x59, 0x50, 0xfa, 0x19, 0x0d, 0x03, 0x4e, - 0x82, 0x8e, 0x0c, 0x96, 0x32, 0x1e,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, 0xdb, 0x71, 0x5c, 0x8d, 0xb1, 0xce, 0xa4, 0xf9, 0x15, 0x58, 0xd8, 0x93, 0x75, - 0xea, 0xc4, 0x6b, 0xd1, 0xfe, 0xaf, 0x01, 0x8b, 0x31, 0x8f, 0xb6, 0xee, 0x87, 0x50, 0x3a, 0x26, - 0x94, 0x93, 0x97, 0x84, 0x69, 0xab, 0xcc, 0xb4, 0x55, 0x9f, 0x4b, 0x0e, 0x3c, 0xe0, 0x44, 0x1b, - 0x50, 0x52, 0x35, 0x31, 0x89, 0x37, 0x6a, 0x79, 0x12, 0x4a, 0x7f, 0x6f, 0xc0, 0x8f, 0xea, 0x50, - 0xf0, 0xc3, 0x2e, 0xd3, 0x67, 0xe6, 0x3b, 0x93, 0x70, 0x8f, 0xc2, 0x2e, 0x96, 0x8c, 0xe8, 0x2e, - 0x94, 0xbe, 0x74, 0x69, 0xe0, 0x05, 0xdd, 0xf8, 0x14, 0xac, 0x4c, 0x02, 0x3d, 0x53, 0x7c, 0x78, - 0x00, 0x10, 0x65, 0x5c, 0x51, 0xad, 0xa1, 0x87, 0x50, 0xec, 0x78, 0x5d, 0xc2, 0xb8, 0x72, 0xc9, - 0x56, 0x43, 0xdc, 0x47, 0x5f, 0xbf, 0x5e, 0xb9, 0x9e, 0xb8, 0x70, 0xc2, 0x88, 0x04, 0xa2, 0x69, - 0x70, 0xbd, 0x80, 0x50, 0xd1, 0x03, 0xdc, 0x54, 0x10, 0xa7, 0x29, 0x7f, 0xb0, 0x96, 0x20, 0x64, - 0x79, 0xea, 0x5a, 0x91, 0xf9, 0xe2, 0xed, 0x64, 0x29, 0x09, 0xe2, 0x18, 0x04, 0x6e, 0x8f, 0xe8, - 0x72, 0x43, 0x8e, 0x45, 0x55, 0xd4, 0x16, 0x71, 0xde, 0x91, 0xf5, 0x62, 0x09, 0x6b, 0x0a, 0x6d, - 0xc0, 0x3c, 0xe3, 0x2e, 0x15, 0x39, 0x67, 0x6e, 0xca, 0x72, 0x2e, 0x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x5c, 0x33, 0xf6, 0xdf, 0x8b, 0xf5, 0xd1, 0xa9, 0x3c, 0xfa, - 0xc2, 0x79, 0x00, 0x73, 0xf2, 0xcf, 0x23, 0x94, 0xf1, 0x2c, 0x90, 0xfc, 0x57, 0xc9, 0x3a, 0xfd, - 0xcf, 0x98, 0x75, 0x43, 0x48, 0x92, 0x6f, 0x2a, 0x59, 0x92, 0x92, 0x0f, 0xb7, 0xd6, 0xca, 0x19, - 0x8f, 0x31, 0xe8, 0x31, 0x14, 0x75, 0xa3, 0x99, 0xc5, 0x9a, 0x7c, 0x39, 0xb1, 0x56, 0x27, 0x33, - 0x28, 0x61, 0xeb, 0x06, 0x7a, 0x3c, 0x78, 0x8b, 0xcf, 0x52, 0x2d, 0x59, 0xa5, 0x5b, 0x67, 0xac, - 0xaf, 0x19, 0xeb, 0x06, 0xfa, 0x02, 0x2a, 0x89, 0x3a, 0x1c, 0x65, 0x54, 0x81, 0xe9, 0xa2, 0xde, - 0xba, 0x76, 0x06, 0x97, 0xb6, 0xbc, 0x05, 0x05, 0x99, 0x00, 0x32, 0x9c, 0x9d, 0x28, 0xd3, 0xb3, - 0xd4, 0x1c, 0x29, 0xdb, 0x0f, 0x54, 0x63, 0x41, 0x82, 0x64, 0xf4, 0xa1, 0x6b, 0x67, 0xd5, 0x03, - 0x13, 0xc3, 0x26, 0x15, 0xc4, 0xeb, 0x06, 0x0a, 0x01, 0xa5, 0x93, 0x3e, 0xfa, 0x7e, 0x46, 0x94, - 0x4c, 0xba, 0x79, 0xac, 0x1b, 0xd3, 0x31, 0x2b, 0xa3, 0xb6, 0xaa, 0xaf, 0xde, 0x2c, 0x1b, 0xff, - 0x7c, 0xb3, 0x6c, 0xfc, 0xfb, 0xcd, 0xb2, 0x71, 0x50, 0x94, 0x95, 0xde, 0x0f, 0xbe, 0x09, 0x00, - 0x00, 0xff, 0xff, 0x16, 0xc8, 0xe5, 0x4c, 0x39, 0x1e, 0x00, 0x00, + 0x37, 0xde, 0x13, 0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 0x77, 0x13, 0xc5, 0xe0, 0xfe, 0xc5, + 0x82, 0xca, 0x0e, 0xed, 0x45, 0x04, 0x93, 0x5f, 0xf7, 0x08, 0xe3, 0xe8, 0x12, 0x14, 0x0e, 0x82, + 0x90, 0x13, 0x6a, 0x5b, 0x2b, 0x33, 0xab, 0x25, 0xac, 0x29, 0x54, 0x85, 0x19, 0x3f, 0x0c, 0xed, + 0xdc, 0x8a, 0xb5, 0x5a, 0xc4, 0x62, 0x88, 0x56, 0xa1, 0x72, 0x48, 0x48, 0xd2, 0xe8, 0x51, 0x9f, + 0x07, 0x71, 0x64, 0xcf, 0xac, 0x58, 0xab, 0x33, 0x9b, 0xf9, 0x57, 0xaf, 0x97, 0x2d, 0x3c, 0xb4, + 0x82, 0x5c, 0x28, 0x09, 0x7a, 0xf3, 0x98, 0x13, 0x66, 0xe7, 0x0d, 0xb6, 0xc1, 0xb4, 0xe0, 0x39, + 0xa0, 0x84, 0x28, 0x9e, 0x59, 0x93, 0xa7, 0x3f, 0xed, 0x5e, 0x87, 0x6a, 0x23, 0x60, 0x87, 0x4f, + 0x99, 0xdf, 0x39, 0x4d, 0x5f, 0xf7, 0x21, 0x2c, 0x1a, 0xbc, 0x2c, 0x89, 0x23, 0x46, 0xd0, 0x2d, + 0x28, 0x50, 0xd2, 0x8a, 0x69, 0x5b, 0x32, 0x97, 0xeb, 0x1f, 0x7a, 0xa3, 0xa1, 0xe2, 0x69, 0x80, + 0x60, 0xc2, 0x9a, 0xd9, 0xfd, 0xe3, 0x0c, 0x94, 0x8d, 0x79, 0xb4, 0x00, 0xb9, 0xed, 0x86, 0x6d, + 0xad, 0x58, 0xab, 0x25, 0x9c, 0xdb, 0x6e, 0x20, 0x1b, 0xe6, 0x1e, 0xf7, 0xb8, 0xbf, 0x1f, 0x12, + 0xed, 0x9f, 0x94, 0x44, 0x17, 0x61, 0x76, 0x3b, 0x7a, 0xca, 0x88, 0x74, 0x4e, 0x11, 0x2b, 0x02, + 0x21, 0xc8,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0xf5, + 0xeb, 0xe5, 0xeb, 0xc6, 0x85, 0x13, 0x27, 0x24, 0x12, 0x8d, 0x85, 0x1f, 0x44, 0x84, 0x8a, 0x3e, + 0xe1, 0xa6, 0x82, 0x78, 0x0d, 0xf9, 0x83, 0xb5, 0x04, 0x21, 0x2b, 0x50, 0xd7, 0x8a, 0xcc, 0x17, + 0x6f, 0x27, 0x4b, 0x49, 0x10, 0xc7, 0x20, 0xf2, 0xbb, 0x44, 0x97, 0x1b, 0x72, 0x2c, 0xaa, 0xa2, + 0x96, 0x88, 0xf3, 0xb6, 0xac, 0x17, 0x8b, 0x58, 0x53, 0x68, 0x1d, 0xe6, 0x18, 0xf7, 0xa9, 0xc8, + 0x39, 0xb3, 0x53, 0x96, 0x73, 0x29, 0x00, 0xdd, 0x83, 0x52, 0x2b, 0xee, 0x26, 0x21, 0x11, 0xe8, + 0xc2, 0x94, 0xe8, 0x01, 0x44, 0x84, 0x1e, 0xa1, 0x34, 0xa6, 0xb2, 0x90, 0x2c, 0x61, 0x45, 0xa0, + 0xdb, 0x30, 0x9f, 0xd0, 0xb8, 0x43, 0x09, 0x63, 0x9f, 0xd2, 0xb8, 0x97, 0xe8, 0x62, 0x60, 0x51, + 0x24, 0xef, 0x1d, 0x73, 0x01, 0x0f, 0xf3, 0xb9, 0xff, 0xc9, 0x41, 0xc5, 0x0c, 0x91, 0xb1, 0x0a, + 0xfb, 0x21, 0x14, 0x54, 0xc0, 0xa9, 0x58, 0x7f, 0x3b, 0x1f, 0x2b, 0x09, 0x99, 0x3e, 0xb6, 0x61, + 0xae, 0xd5, 0xa3, 0xb2, 0xfc, 0x56, 0x45, 0x79, 0x4a, 0x0a, 0x4b, 0x79, 0xcc, 0xfd, 0x50, 0xf5, + 0x24, 0x58, 0x11, 0xa2, 0x22, 0xef, 0x77, 0x52, 0x67, 0xab, 0xc8, 0xfb, 0x30, 0x73, 0xff, 0xe6, + 0xde, 0x69, 0xff, 0x8a, 0x67, 0xde, 0x3f, 0xf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62, 0xd8, 0x8c, 0x05, 0xf1, 0x9a, + 0x85, 0x62, 0x40, 0xe3, 0x49, 0x1f, 0x7d, 0x3f, 0x23, 0x4a, 0x26, 0xdd, 0x3c, 0xce, 0x8d, 0xe9, + 0x98, 0x95, 0x51, 0x9b, 0x95, 0x57, 0x6f, 0x96, 0xac, 0x7f, 0xbe, 0x59, 0xb2, 0xfe, 0xfd, 0x66, + 0xc9, 0xda, 0x2f, 0xc8, 0x4a, 0xef, 0x07, 0xdf, 0x04, 0x00, 0x00, 0xff, 0xff, 0x7a, 0xa5, 0x45, + 0x1d, 0x5d, 0x1e, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -2663,6 +2672,11 @@ func (m *PruneRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i -= len(m.XXX_unrecognized) copy(dAtA[i:], m.XXX_unrecognized) } + if m.FreeBytes != 0 { + i = encodeVarintControl(dAtA, i, uint64(m.FreeBytes)) + i-- + dAtA[i] = 0x28 + } if m.KeepBytes != 0 { i = encodeVarintControl(dAtA, i, uint64(m.KeepBytes)) i-- @@ -4517,6 +4531,9 @@ func (m *PruneRequest) Size() (n int) { if m.KeepBytes != 0 { n += 1 + sovControl(uint64(m.KeepBytes)) } + if m.FreeBytes != 0 { + n += 1 + sovControl(uint64(m.FreeBytes)) + } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } @@ -5451,6 +5468,25 @@ func (m *PruneRequest) Unmarshal(dAtA []byte) error { break } } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FreeBytes", wireType) + } + m.FreeBytes = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowControl + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.FreeBytes |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipControl(dAtA[iNdEx:]) diff --git a/api/services/control/control.proto b/api/services/control/control.proto index 919b1dd8c3872..07a11a40b9180 100644 --- a/api/services/control/control.proto +++ b/api/services/control/control.proto @@ -32,6 +32,7 @@ message PruneRequest { bool all = 2; int64 keepDuration = 3 [(gogoproto.nullable) = true]; int64 keepBytes = 4 [(gogoproto.nullable) = true]; + int64 freeBytes = 5 [(gogoproto.nullable) = true]; } message DiskUsageRequest { diff --git a/api/types/worker.pb.go b/api/types/worker.pb.go index e1b3928cba520..18e183131e8a9 100644 --- a/api/types/worker.pb.go +++ b/api/types/worker.pb.go @@ -108,6 +108,7 @@ type GCPolicy struct { KeepDuration int64 `protobuf:"varint,2,opt,name=keepDuration,proto3" json:"keepDuration,omitempty"` KeepBytes int64 `protobuf:"varint,3,opt,name=keepBytes,proto3" json:"keepBytes,omitempty"` Filters []string `protobuf:"bytes,4,rep,name=filters,proto3" json:"filters,omitempty"` + FreeBytes int64 `protobuf:"varint,5,opt,name=freeBytes,proto3" json:"freeBytes,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -174,6 +175,13 @@ func (m *GCPolicy) GetFilters() []string { return nil } +func (m *GCPolicy) GetFreeBytes() int64 { + if m != nil { + return m.FreeBytes + } + return 0 +} + type BuildkitVersion struct { Package string `protobuf:"bytes,1,opt,name=package,proto3" json:"package,omitempty"` Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` @@ -247,33 +255,34 @@ func init() { func init() { proto.RegisterFile("worker.proto", fileDescriptor_e4ff6184b07e587a) } var fileDescriptor_e4ff6184b07e587a = []byte{ - // 416 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x52, 0xc1, 0x8e, 0xd3, 0x30, - 0x10, 0x25, 0xc9, 0xee, 0xd2, 0xb8, 0x11, 0x20, 0x0b, 0xa1, 0x28, 0x42, 0x25, 0xca, 0x85, 0x1e, - 0xc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33, 0x87, 0x9e, 0xd9, 0xaf, - 0xf5, 0xf2, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x01, 0x19, 0xcf, 0xd5, 0xdf, 0x02, 0x00, 0x00, + // 430 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x92, 0xc1, 0x8e, 0xd3, 0x30, + 0x10, 0x86, 0x71, 0xb2, 0x5d, 0x5a, 0x37, 0x02, 0x64, 0x21, 0x14, 0x55, 0xa8, 0x54, 0xbd, 0xd0, + 0x03, 0x38, 0xcb, 0x72, 0x01, 0xc4, 0xa9, 0x14, 0xc1, 0x4a, 0x1c, 0x16, 0x1f, 0xe0, 0x6c, 0x77, + 0x27, 0x21, 0x8a, 0xbb, 0xb6, 0x1c, 0x27, 0x28, 0x2f, 0xc2, 0x33, 0xed, 0x91, 0x27, 0x40, 0xa8, + 0x07, 0x9e, 0x03, 0xd9, 0x49, 0xda, 0xb2, 0xec, 0xde, 0xfc, 0xcf, 0xfc, 0xdf, 0x9f, 0x99, 0x51, + 0x70, 0xf4, 0x5d, 0x99, 0x02, 0x0c, 0xd5, 0x46, 0x59, 0x45, 0x1e, 0x6d, 0x94, 0x68, 0xa8, 0xa8, + 0x72, 0x79, 0x51, 0xe4, 0x96, 0xd6, 0x2f, 0xa8, 0x6d, 0x34, 0x94, 0x93, 0xe7, 0x59, 0x6e, 0xbf, + 0x55, 0x82, 0xae, 0xd5, 0x26, 0xc9, 0x54, 0xa6, 0x12, 0x6f, 0x17, 0x55, 0xea, 0x95, 0x17, 0xfe, + 0xd5, 0xc6, 0x4c, 0x9e, 0x1d, 0xd8, 0x5d, 0x62, 0xd2, 0x27, 0x26, 0xa5, 0x92, 0x35, 0x98, 0x44, + 0x8b, 0x44, 0xe9, 0xb2, 0x75, 0xcf, 0xff, 0x04, 0x38, 0xfa, 0xea, 0xa7, 0x60, 0xb0, 0x56, 0xe6, + 0x82,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 0xd8, 0x17, 0x48, 0x8c, 0xef, 0xa6, 0xb9, 0xb4, 0x60, 0x4a, + 0x7f, 0xab, 0x11, 0xeb, 0xa5, 0xe3, 0x52, 0x03, 0xd0, 0x72, 0x83, 0x96, 0xdb, 0x15, 0xe6, 0xfc, + 0xbf, 0x33, 0xb9, 0x28, 0xcd, 0xd7, 0x05, 0xcf, 0xa0, 0xdb, 0xad, 0x97, 0xae, 0x53, 0x77, 0xb7, + 0x6c, 0x37, 0xec, 0x25, 0x99, 0xe0, 0xa1, 0x81, 0x3a, 0xf7, 0xad, 0xd0, 0xb7, 0x76, 0x7a, 0x19, + 0x5d, 0x6d, 0xa7, 0xe8, 0xe7, 0x76, 0x8a, 0x7e, 0x6f, 0xa7, 0x48, 0x1c, 0xfb, 0x3f, 0xef, 0xe5, + 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x4e, 0x12, 0x40, 0x0f, 0xfe, 0x02, 0x00, 0x00, } func (m *WorkerRecord) Marshal() (dAtA []byte, err error) { @@ -393,6 +402,11 @@ func (m *GCPolicy) MarshalToSizedBuffer(dAtA []byte) (int, error) { i -= len(m.XXX_unrecognized) copy(dAtA[i:], m.XXX_unrecognized) } + if m.FreeBytes != 0 { + i = encodeVarintWorker(dAtA, i, uint64(m.FreeBytes)) + i-- + dAtA[i] = 0x28 + } if len(m.Filters) > 0 { for iNdEx := len(m.Filters) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.Filters[iNdEx]) @@ -545,6 +559,9 @@ func (m *GCPolicy) Size() (n int) { n += 1 + l + sovWorker(uint64(l)) } } + if m.FreeBytes != 0 { + n += 1 + sovWorker(uint64(m.FreeBytes)) + } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } @@ -1014,6 +1031,25 @@ func (m *GCPolicy) Unmarshal(dAtA []byte) error { } m.Filters = append(m.Filters, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FreeBytes", wireType) + } + m.FreeBytes = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowWorker + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.FreeBytes |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipWorker(dAtA[iNdEx:]) diff --git a/api/types/worker.proto b/api/types/worker.proto index 476fcc62e1048..3925bb8f06b8d 100644 --- a/api/types/worker.proto +++ b/api/types/worker.proto @@ -22,6 +22,7 @@ message GCPolicy { int64 keepDuration = 2; int64 keepBytes = 3; repeated string filters = 4; + int64 freeBytes = 5; } message BuildkitVersion { diff --git a/cache/manager.go b/cache/manager.go index 1c35de8a04d44..78daad130367f 100644 --- a/cache/manager.go +++ b/cache/manager.go @@ -22,6 +22,7 @@ import ( "github.com/moby/buildkit/session" "github.com/moby/buildkit/snapshot" "github.com/moby/buildkit/util/bklog" + "github.com/moby/buildkit/util/disk" "github.com/moby/buildkit/util/flightcontrol" "github.com/moby/buildkit/util/progress" digest "github.com/opencontainers/go-digest" @@ -1053,26 +1054,46 @@ func (cm *cacheManager) pruneOnce(ctx context.Context, ch chan client.UsageInfo, } } + // TODO: pick a better path here + totalFree, _, err := disk.GetDiskSize(cm.mountPool.tmpdirRoot) + if err != nil { + return err + } + return cm.prune(ctx, ch, pruneOpt{ - filter: filter, - all: opt.All, - checkShared: check, - keepDuration: opt.KeepDuration, - keepBytes: opt.KeepBytes, - totalSize: totalSize, + filter: filter, + all: opt.All, + checkShared: check, + keepDuration: opt.KeepDuration, + keepBytes: opt.KeepBytes, + totalKeptBytes: totalSize, + freeBytes: opt.FreeBytes, + totalFreeBytes: totalFree, }) } func (cm *cacheManager) prune(ctx context.Context, ch chan client.UsageInfo, opt pruneOpt) (err error) { - var toDelete []*deleteRecord - - if opt.keepBytes != 0 && opt.totalSize < opt.keepBytes { + var gcMode, gcNeeded bool + if opt.keepBytes != 0 { + gcMode = true + if opt.totalKeptBytes >= opt.keepBytes { + gcNeeded = true + } + } + if opt.freeBytes != 0 { + gcMode = true + if opt.totalFreeBytes >= opt.freeBytes { + gcNeeded = true + } + } + if gcMode && !gcNeeded { return nil } + var toDelete []*deleteRecord + cm.mu.Lock() - gcMode := opt.keepBytes != 0 cutOff := time.Now().Add(-opt.keepDuration) locked := map[*sync.Mutex]struct{}{} @@ -1240,7 +1261,7 @@ func (cm *cacheManager) prune(ctx context.Context, ch chan client.UsageInfo, opt c.Size = cr.equalImmutable.getSize() // benefit from DiskUsage calc } - opt.totalSize -= c.Size + opt.totalKeptBytes -= c.Size if cr.equalImmutable != nil { if err1 := cr.equalImmutable.remove(ctx, false); err == nil { @@ -1606,12 +1627,15 @@ func adaptUsageInfo(info *client.UsageInfo) filters.Adaptor { } type pruneOpt struct { - filter filters.Filter - all bool - checkShared ExternalRefChecker - keepDuration time.Duration - keepBytes int64 - totalSize int64 + filter filters.Filter + all bool + checkShared ExternalRefChecker + + keepDuration time.Duration + keepBytes int64 + totalKeptBytes int64 + freeBytes int64 + totalFreeBytes int64 } type deleteRecord struct { diff --git a/client/prune.go b/client/prune.go index af8491385558b..733913b0baa20 100644 --- a/client/prune.go +++ b/client/prune.go @@ -19,6 +19,7 @@ func (c *Client) Prune(ctx context.Context, ch chan UsageInfo, opts ...PruneOpti Filter: info.Filter, KeepDuration: int64(info.KeepDuration), KeepBytes: int64(info.KeepBytes), + FreeBytes: int64(info.FreeBytes), } if info.All { req.All = true @@ -63,6 +64,7 @@ type PruneInfo struct { All bool `json:"all"` KeepDuration time.Duration `json:"keepDuration"` KeepBytes int64 `json:"keepBytes"` + FreeBytes int64 `json:"freeBytes"` } type pruneOptionFunc func(*PruneInfo) @@ -75,9 +77,10 @@ var PruneAll = pruneOptionFunc(func(pi *PruneInfo) { pi.All = true }) -func WithKeepOpt(duration time.Duration, bytes int64) PruneOption { +func WithKeepOpt(duration time.Duration, bytes int64, freeBytes int64) PruneOption { return pruneOptionFunc(func(pi *PruneInfo) { pi.KeepDuration = duration pi.KeepBytes = bytes + pi.FreeBytes = freeBytes }) } diff --git a/client/workers.go b/client/workers.go index b7f6f6725d901..7650db0f1b0a4 100644 --- a/client/workers.go +++ b/client/workers.go @@ -66,6 +66,7 @@ func fromAPIGCPolicy(in []*apitypes.GCPolicy) []PruneInfo { Filter: p.Filters, KeepDuration: time.Duration(p.KeepDuration), KeepBytes: p.KeepBytes, + FreeBytes: p.FreeBytes, }) } return out diff --git a/cmd/buildctl/debug/workers.go b/cmd/buildctl/debug/workers.go index 0a692eb0c6d0e..0b5db55477736 100644 --- a/cmd/buildctl/debug/workers.go +++ b/cmd/buildctl/debug/workers.go @@ -94,6 +94,9 @@ func printWorkersVerbose(tw *tabwriter.Writer, winfo []*client.WorkerInfo) { if rule.KeepBytes > 0 { fmt.Fprintf(tw, "\tKeep Bytes:\t%g\n", units.Bytes(rule.KeepBytes)) } + if rule.FreeBytes > 0 { + fmt.Fprintf(tw, "\tFree Bytes:\t%g\n", units.Bytes(rule.FreeBytes)) + } } fmt.Fprintf(tw, "\n") } diff --git a/cmd/buildctl/prune.go b/cmd/buildctl/prune.go index 25aa27c55c7f9..5ba1cb08af122 100644 --- a/cmd/buildctl/prune.go +++ b/cmd/buildctl/prune.go @@ -25,6 +25,10 @@ var pruneCommand = cli.Command{ Name: "keep-storage", Usage: "Keep data below this limit (in MB)", }, + cli.Float64Flag{ + Name: "free-storage", + Usage: "Keep free data below this limit (in MB)", + }, cli.StringSliceFlag{ Name: "filter, f", Usage: "Filter records", @@ -56,7 +60,11 @@ func prune(clicontext *cli.Context) error { opts := []client.PruneOption{ client.WithFilter(clicontext.StringSlice("filter")), - client.WithKeepOpt(clicontext.Duration("keep-duration"), int64(clicontext.Float64("keep-storage")*1e6)), + client.WithKeepOpt( + clicontext.Duration("keep-duration"), + int64(clicontext.Float64("keep-storage")*1e6), + int64(clicontext.Float64("free-storage")*1e6), + ), } if clicontext.Bool("all") { diff --git a/cmd/buildkitd/config/config.go b/cmd/buildkitd/config/config.go index 32eaa7bd615b5..6417d63083f26 100644 --- a/cmd/buildkitd/config/config.go +++ b/cmd/buildkitd/config/config.go @@ -157,6 +157,7 @@ type GCPolicy struct { All bool `toml:"all"` KeepBytes DiskSpace `toml:"keepBytes"` KeepDuration Duration `toml:"keepDuration"` + FreeBytes DiskSpace `toml:"freeBytes"` Filters []string `toml:"filters"` } diff --git a/cmd/buildkitd/config/gcpolicy.go b/cmd/buildkitd/config/gcpolicy.go index 5e9ac6ac5c02d..02b0e84c13fb2 100644 --- a/cmd/buildkitd/config/gcpolicy.go +++ b/cmd/buildkitd/config/gcpolicy.go @@ -8,6 +8,7 @@ import ( "github.com/docker/go-units" "github.com/moby/buildkit/util/bklog" + "github.com/moby/buildkit/util/disk" "github.com/pkg/errors" ) @@ -118,7 +119,7 @@ func (d DiskSpace) AsBytes(root string) int64 { return 0 } - diskSize, err := getDiskSize(root) + _, diskSize, err := disk.GetDiskSize(root) if err != nil { bklog.L.Warnf("failed to get disk size: %v", err) return defaultCap diff --git a/cmd/buildkitd/config/gcpolicy_unix.go b/cmd/buildkitd/config/gcpolicy_unix.go index b88e2172fff15..b4e0efff30664 100644 --- a/cmd/buildkitd/config/gcpolicy_unix.go +++ b/cmd/buildkitd/config/gcpolicy_unix.go @@ -1,19 +1,3 @@ -//go:build !windows && !openbsd -// +build !windows,!openbsd - package config -import ( - "syscall" -) - var DiskSpacePercentage int64 = 10 - -func getDiskSize(root string) (int64, error) { - var st syscall.Statfs_t - if err := syscall.Statfs(root, &st); err != nil { - return 0, err - } - diskSize := int64(st.Bsize) * int64(st.Blocks) - return diskSize, nil -} diff --git a/cmd/buildkitd/config/gcpolicy_windows.go b/cmd/buildkitd/config/gcpolicy_windows.go index 77c7099de5f8a..ff2bd84bca5f5 100644 --- a/cmd/buildkitd/config/gcpolicy_windows.go +++ b/cmd/buildkitd/config/gcpolicy_windows.go @@ -1,31 +1,5 @@ -//go:build windows -// +build windows - package config -import ( - "golang.org/x/sys/windows" -) - // set as double that for Linux since // Windows images are generally larger. var DiskSpacePercentage int64 = 20 - -func getDiskSize(root string) (int64, error) { - rootUTF16, err := windows.UTF16FromString(root) - if err != nil { - return 0, err - } - var freeAvailableBytes uint64 - var totalBytes uint64 - var totalFreeBytes uint64 - - if err := windows.GetDiskFreeSpaceEx( - &rootUTF16[0], - &freeAvailableBytes, - &totalBytes, - &totalFreeBytes); err != nil { - return 0, err - } - return int64(totalBytes), nil -} diff --git a/cmd/buildkitd/main.go b/cmd/buildkitd/main.go index c6c9828760ac1..2a5cfe3814eca 100644 --- a/cmd/buildkitd/main.go +++ b/cmd/buildkitd/main.go @@ -928,6 +928,7 @@ func getGCPolicy(cfg config.GCConfig, root string) []client.PruneInfo { All: rule.All, KeepBytes: rule.KeepBytes.AsBytes(root), KeepDuration: rule.KeepDuration.Duration, + FreeBytes: rule.FreeBytes.AsBytes(root), }) } return out diff --git a/control/control.go b/control/control.go index f90367efdfb4f..035080222c98f 100644 --- a/control/control.go +++ b/control/control.go @@ -216,6 +216,7 @@ func (c *Controller) Prune(req *controlapi.PruneRequest, stream controlapi.Contr All: req.All, KeepDuration: time.Duration(req.KeepDuration), KeepBytes: req.KeepBytes, + FreeBytes: req.FreeBytes, }) }) }(w) @@ -629,6 +630,7 @@ func toPBGCPolicy(in []client.PruneInfo) []*apitypes.GCPolicy { All: p.All, KeepBytes: p.KeepBytes, KeepDuration: int64(p.KeepDuration), + FreeBytes: p.FreeBytes, Filters: p.Filter, }) } diff --git a/cmd/buildkitd/config/gcpolicy_openbsd.go b/util/disk/disk_openbsd.go similarity index 51% rename from cmd/buildkitd/config/gcpolicy_openbsd.go rename to util/disk/disk_openbsd.go index 341ac2cd7c889..542af87b6d271 100644 --- a/cmd/buildkitd/config/gcpolicy_openbsd.go +++ b/util/disk/disk_openbsd.go @@ -1,19 +1,18 @@ //go:build openbsd // +build openbsd -package config +package disk import ( "syscall" ) -var DiskSpacePercentage int64 = 10 - -func getDiskSize(root string) (int64, error) { +func GetDiskSize(root string) (free int64, total int64, err error) { var st syscall.Statfs_t if err := syscall.Statfs(root, &st); err != nil { - return 0, err + return 0, 0, err } diskSize := int64(st.F_bsize) * int64(st.F_blocks) - return diskSize, nil + freeSize := int64(st.F_bsize) * int64(st.F_bfree) + return diskSize, freeSize, nil } diff --git a/util/disk/disk_unix.go b/util/disk/disk_unix.go new file mode 100644 index 0000000000000..602790e5e2226 --- /dev/null +++ b/util/disk/disk_unix.go @@ -0,0 +1,18 @@ +//go:build !windows && !openbsd +// +build !windows,!openbsd + +package disk + +import ( + "syscall" +) + +func GetDiskSize(root string) (free int64, total int64, err error) { + var st syscall.Statfs_t + if err := syscall.Statfs(root, &st); err != nil { + return 0, 0, err + } + diskSize := int64(st.Bsize) * int64(st.Blocks) + freeSize := int64(st.Bsize) * int64(st.Bfree) + return diskSize, freeSize, nil +} diff --git a/util/disk/disk_windows.go b/util/disk/disk_windows.go new file mode 100644 index 0000000000000..d7e01f83447f1 --- /dev/null +++ b/util/disk/disk_windows.go @@ -0,0 +1,27 @@ +//go:build windows +// +build windows + +package disk + +import ( + "golang.org/x/sys/windows" +) + +func GetDiskSize(root string) (free int64, total int64, err error) { + rootUTF16, err := windows.UTF16FromString(root) + if err != nil { + return 0, 0, err + } + var freeAvailableBytes uint64 + var totalBytes uint64 + var totalFreeBytes uint64 + + if err := windows.GetDiskFreeSpaceEx( + &rootUTF16[0], + &freeAvailableBytes, + &totalBytes, + &totalFreeBytes); err != nil { + return 0, 0, err + } + return int64(totalBytes), int64(totalFreeBytes), nil +}