diff --git a/controller/backing_image_controller.go b/controller/backing_image_controller.go index 3b7c59cc6e..1df1c34b79 100644 --- a/controller/backing_image_controller.go +++ b/controller/backing_image_controller.go @@ -663,7 +663,28 @@ func (bic *BackingImageController) syncBackingImageFileInfo(bi *longhorn.Backing bic.eventRecorder.Eventf(bi, corev1.EventTypeNormal, constant.EventReasonUpdate, "Set size to %v", bi.Status.Size) } if bi.Status.Size != info.Size { - return fmt.Errorf("found mismatching size %v reported by backing image manager %v in disk %v, the size recorded in status is %v", info.Size, bim.Name, bim.Spec.DiskUUID, bi.Status.Size) + if bi.Status.DiskFileStatusMap[bim.Spec.DiskUUID].State != longhorn.BackingImageStateFailed { + msg := fmt.Sprintf("found mismatching size %v reported by backing image manager %v in disk %v, the size recorded in status is %v", + info.Size, bim.Name, bim.Spec.DiskUUID, bi.Status.Size) + log.Error(msg) + bi.Status.DiskFileStatusMap[bim.Spec.DiskUUID].State = longhorn.BackingImageStateFailed + bi.Status.DiskFileStatusMap[bim.Spec.DiskUUID].Message = msg + } + } + } + if info.VirtualSize > 0 { + if bi.Status.VirtualSize == 0 { + bi.Status.VirtualSize = info.VirtualSize + bic.eventRecorder.Eventf(bi, corev1.EventTypeNormal, constant.EventReasonUpdate, "Set virtualSize to %v", bi.Status.VirtualSize) + } + if bi.Status.VirtualSize != info.VirtualSize { + if bi.Status.DiskFileStatusMap[bim.Spec.DiskUUID].State != longhorn.BackingImageStateFailed { + msg := fmt.Sprintf("found mismatching virtualSize %v reported by backing image manager %v in disk %v, the virtualSize recorded in status is %v", + info.VirtualSize, bim.Name, bim.Spec.DiskUUID, bi.Status.VirtualSize) + log.Error(msg) + bi.Status.DiskFileStatusMap[bim.Spec.DiskUUID].State = longhorn.BackingImageStateFailed + bi.Status.DiskFileStatusMap[bim.Spec.DiskUUID].Message = msg + } } } } diff --git a/engineapi/backing_image_manager.go b/engineapi/backing_image_manager.go index d32c24ca5b..14419d26ee 100644 --- a/engineapi/backing_image_manager.go +++ b/engineapi/backing_image_manager.go @@ -54,9 +54,10 @@ func (c *BackingImageManagerClient) parseBackingImageFileInfo(bi *bimapi.Backing return nil } return &longhorn.BackingImageFileInfo{ - Name: bi.Name, - UUID: bi.UUID, - Size: bi.Size, + Name: bi.Name, + UUID: bi.UUID, + Size: bi.Size, + VirtualSize: bi.VirtualSize, State: longhorn.BackingImageState(bi.Status.State), CurrentChecksum: bi.Status.CurrentChecksum, diff --git a/go.mod b/go.mod index 38f47a3465..f52f1240f3 100644 --- a/go.mod +++ b/go.mod @@ -44,7 +44,11 @@ require ( github.com/gorilla/websocket v1.5.1 github.com/jinzhu/copier v0.3.5 github.com/kubernetes-csi/csi-lib-utils v0.6.1 +<<<<<<< HEAD github.com/longhorn/backing-image-manager v1.5.4 +======= + github.com/longhorn/backing-image-manager v1.7.0-dev.0.20240326182459-c5288d745f4a +>>>>>>> ffe9a837 (vendor: Update longhorn/backing-image-manager to get VirtualSize) github.com/longhorn/backupstore v0.0.0-20240219094812-3a87ee02df77 github.com/longhorn/go-common-libs v0.0.0-20240319112414-b75404dc7fbc github.com/longhorn/go-iscsi-helper v0.0.0-20240308033847-bc3aab599425 @@ -98,7 +102,11 @@ require ( require ( github.com/Microsoft/go-winio v0.6.0 // indirect github.com/NYTimes/gziphandler v1.1.1 // indirect +<<<<<<< HEAD github.com/RoaringBitmap/roaring v1.2.3 // indirect +======= + github.com/RoaringBitmap/roaring v1.9.1 // indirect +>>>>>>> ffe9a837 (vendor: Update longhorn/backing-image-manager to get VirtualSize) github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a // indirect github.com/avast/retry-go v3.0.0+incompatible github.com/beorn7/perks v1.0.1 // indirect diff --git a/go.sum b/go.sum index 3c909d1a98..d3cf651ba8 100644 --- a/go.sum +++ b/go.sum @@ -611,8 +611,15 @@ github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb0 github.com/NYTimes/gziphandler v1.1.1 h1:ZUDjpQae29j0ryrS0u/B8HZfJBtBQHjqw2rQ2cqUQ3I= github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +<<<<<<< HEAD github.com/RoaringBitmap/roaring v1.2.3 h1:yqreLINqIrX22ErkKI0vY47/ivtJr6n+kMhVOVmhWBY= github.com/RoaringBitmap/roaring v1.2.3/go.mod h1:plvDsJQpxOC5bw8LRteu/MLWHsHez/3y6cubLI4/1yE= +======= +github.com/RoaringBitmap/roaring v1.9.0 h1:lwKhr90/j0jVXJyh5X+vQN1VVn77rQFfYnh6RDRGCcE= +github.com/RoaringBitmap/roaring v1.9.0/go.mod h1:6AXUsoIEzDTFFQCe1RbGA6uFONMhvejWj5rqITANK90= +github.com/RoaringBitmap/roaring v1.9.1 h1:LXcSqGGGMKm+KAzUyWn7ZeREqoOkoMX+KwLOK1thc4I= +github.com/RoaringBitmap/roaring v1.9.1/go.mod h1:6AXUsoIEzDTFFQCe1RbGA6uFONMhvejWj5rqITANK90= +>>>>>>> ffe9a837 (vendor: Update longhorn/backing-image-manager to get VirtualSize) github.com/ajstarks/deck v0.0.0-20200831202436-30c9fc6549a9/go.mod h1:JynElWSGnm/4RlzPXRlREEwqTHAN3T56Bv2ITsFT3gY= github.com/ajstarks/deck/generate v0.0.0-20210309230005-c3f852c02e19/go.mod h1:T13YZdzov6OU0A1+RfKZiZN9ca6VeKdBdyDV+BY97Tk= github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= @@ -1034,8 +1041,15 @@ github.com/kubernetes-csi/csi-lib-utils v0.6.1 h1:+AZ58SRSRWh2vmMoWAAGcv7x6fIyBM github.com/kubernetes-csi/csi-lib-utils v0.6.1/go.mod h1:GVmlUmxZ+SUjVLXicRFjqWUUvWez0g0Y78zNV9t7KfQ= github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de h1:9TO3cAIGXtEhnIaL+V+BEER86oLrvS+kWobKpbJuye0= github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de/go.mod h1:zAbeS9B/r2mtpb6U+EI2rYA5OAXxsYw6wTamcNW+zcE= +<<<<<<< HEAD github.com/longhorn/backing-image-manager v1.5.4 h1:z5eQ3r39q3VyuCSNtX2S++2tPaorsnOopKf3cjjvNzE= github.com/longhorn/backing-image-manager v1.5.4/go.mod h1:M28iC1bpVgefAt8E72ozeE9aSwxXcoXmmIClj5zC7bo= +======= +github.com/longhorn/backing-image-manager v1.6.0 h1:Jmlc8+W63l0VZoVhPwNLniAk+eBC4CNaadoqpqA51KE= +github.com/longhorn/backing-image-manager v1.6.0/go.mod h1:IH0mgbK+Dr13xkY+LhDaufyd9YIpiKqYo1AeRLFYGrk= +github.com/longhorn/backing-image-manager v1.7.0-dev.0.20240326182459-c5288d745f4a h1:Z/vdszQazSZJ51IlJvtEuDViNn6AShJx6xGcOwwa9Ho= +github.com/longhorn/backing-image-manager v1.7.0-dev.0.20240326182459-c5288d745f4a/go.mod h1:LuPH4YQ7+phuzSXEPT8b1/iBUsOvmnsCaogU4EImy+k= +>>>>>>> ffe9a837 (vendor: Update longhorn/backing-image-manager to get VirtualSize) github.com/longhorn/backupstore v0.0.0-20240219094812-3a87ee02df77 h1:iJRq59kA22f9HIjFtY/lz5rKCorZJrrYXju70XoWdmE= github.com/longhorn/backupstore v0.0.0-20240219094812-3a87ee02df77/go.mod h1:4cbJWtlrD2cGTQxQLtdlPTYopiJiusXH7CpOBrn/s3k= github.com/longhorn/go-common-libs v0.0.0-20240319112414-b75404dc7fbc h1:Eh9Npc5yBcVD8E4zVQIGUtC62HcfqevrHjQ2kh7fJ/E= diff --git a/k8s/crds.yaml b/k8s/crds.yaml index 03478c4921..0f6bd558da 100644 --- a/k8s/crds.yaml +++ b/k8s/crds.yaml @@ -314,6 +314,9 @@ spec: type: string uuid: type: string + virtualSize: + format: int64 + type: integer type: object nullable: true type: object @@ -412,6 +415,10 @@ spec: jsonPath: .status.size name: Size type: string + - description: The virtual size of the image (may be larger than file size) + jsonPath: .status.virtualSize + name: VirtualSize + type: string - jsonPath: .metadata.creationTimestamp name: Age type: date @@ -479,6 +486,10 @@ spec: type: integer uuid: type: string + virtualSize: + description: Virtual size of image, which may be larger than physical size. Will be zero until known (e.g. while a backing image is uploading) + format: int64 + type: integer type: object type: object served: true diff --git a/k8s/pkg/apis/longhorn/v1beta2/backingimage.go b/k8s/pkg/apis/longhorn/v1beta2/backingimage.go index 15cf0c12a3..a68fc3e2d4 100644 --- a/k8s/pkg/apis/longhorn/v1beta2/backingimage.go +++ b/k8s/pkg/apis/longhorn/v1beta2/backingimage.go @@ -56,6 +56,9 @@ type BackingImageStatus struct { UUID string `json:"uuid"` // +optional Size int64 `json:"size"` + // Virtual size of image, which may be larger than physical size. Will be zero until known (e.g. while a backing image is uploading) + // +optional + VirtualSize int64 `json:"virtualSize"` // +optional Checksum string `json:"checksum"` // +optional @@ -74,6 +77,7 @@ type BackingImageStatus struct { // +kubebuilder:printcolumn:name="UUID",type=string,JSONPath=`.status.uuid`,description="The system generated UUID" // +kubebuilder:printcolumn:name="SourceType",type=string,JSONPath=`.spec.sourceType`,description="The source of the backing image file data" // +kubebuilder:printcolumn:name="Size",type=string,JSONPath=`.status.size`,description="The backing image file size in each disk" +// +kubebuilder:printcolumn:name="VirtualSize",type=string,JSONPath=`.status.virtualSize`,description="The virtual size of the image (may be larger than file size)" // +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp` // BackingImage is where Longhorn stores backing image object. diff --git a/k8s/pkg/apis/longhorn/v1beta2/backingimagemanager.go b/k8s/pkg/apis/longhorn/v1beta2/backingimagemanager.go index a7dfa00073..303b2f81ae 100644 --- a/k8s/pkg/apis/longhorn/v1beta2/backingimagemanager.go +++ b/k8s/pkg/apis/longhorn/v1beta2/backingimagemanager.go @@ -20,6 +20,8 @@ type BackingImageFileInfo struct { // +optional Size int64 `json:"size"` // +optional + VirtualSize int64 `json:"virtualSize"` + // +optional State BackingImageState `json:"state"` // +optional CurrentChecksum string `json:"currentChecksum"` diff --git a/scripts/validate b/scripts/validate index 534cab4c80..0988ab7b7f 100755 --- a/scripts/validate +++ b/scripts/validate @@ -11,6 +11,7 @@ PACKAGES="$(find . -name '*.go' | grep -Ev '.pb.go' | xargs -I{} dirname {} | \ echo Packages: ${PACKAGES} echo Running: go vet go vet ${PACKAGES} +<<<<<<< HEAD echo Running: golint for i in ${PACKAGES}; do if [ -n "$(golint $i | grep -v 'should have comment.*or be unexported' | grep -v 'just return error instead.' | tee /dev/stderr)" ]; then @@ -18,5 +19,23 @@ for i in ${PACKAGES}; do fi done test -z "$failed" +======= + +if [ ! -z "${DRONE_REPO}" ] && [ ! -z "${DRONE_PULL_REQUEST}" ]; then + wget https://github.com/$DRONE_REPO/pull/$DRONE_PULL_REQUEST.patch + echo "Running: golangci-lint run --new-from-patch=${DRONE_PULL_REQUEST}.patch" + golangci-lint run --new-from-patch="${DRONE_PULL_REQUEST}.patch" + rm "${DRONE_PULL_REQUEST}.patch" +elif [ ! -z "${DRONE_COMMIT_REF}" ]; then + echo "Running: golangci-lint run --new-from-rev=${DRONE_COMMIT_REF}" + golangci-lint run --new-from-rev=${DRONE_COMMIT_REF} +else + git symbolic-ref -q HEAD && REV="HEAD" || REV="HEAD^" + headSHA=$(git rev-parse --short=12 ${REV}) + echo "Running: golangci-lint run --new-from-rev=${headSHA}" + golangci-lint run --new-from-rev=${headSHA} +fi + +>>>>>>> 9707ff03 (scripts/validate: Fix `git rev-parse` when doing local builds) echo Running: go fmt test -z "$(go fmt ${PACKAGES} | tee /dev/stderr)" diff --git a/vendor/github.com/RoaringBitmap/roaring/README.md b/vendor/github.com/RoaringBitmap/roaring/README.md index 753b8068b4..54ac16c656 100644 --- a/vendor/github.com/RoaringBitmap/roaring/README.md +++ b/vendor/github.com/RoaringBitmap/roaring/README.md @@ -41,7 +41,7 @@ The ``roaring`` Go library is used by * [M3](https://github.com/m3db/m3) * [trident](https://github.com/NetApp/trident) * [Husky](https://www.datadoghq.com/blog/engineering/introducing-husky/) - +* [FrostDB](https://github.com/polarsignals/frostdb) This library is used in production in several systems, it is part of the [Awesome Go collection](https://awesome-go.com). diff --git a/vendor/github.com/RoaringBitmap/roaring/arraycontainer.go b/vendor/github.com/RoaringBitmap/roaring/arraycontainer.go index 9541fd5369..6eea4a2292 100644 --- a/vendor/github.com/RoaringBitmap/roaring/arraycontainer.go +++ b/vendor/github.com/RoaringBitmap/roaring/arraycontainer.go @@ -655,10 +655,54 @@ func (ac *arrayContainer) iandNot(a container) container { } func (ac *arrayContainer) iandNotRun16(rc *runContainer16) container { - rcb := rc.toBitmapContainer() - acb := ac.toBitmapContainer() - acb.iandNotBitmapSurely(rcb) - *ac = *(acb.toArrayContainer()) + // Fast path: if either the array container or the run container is empty, the result is the array. + if ac.isEmpty() || rc.isEmpty() { + // Empty + return ac + } + // Fast path: if the run container is full, the result is empty. + if rc.isFull() { + ac.content = ac.content[:0] + return ac + } + current_run := 0 + // All values in [start_run, end_end] are part of the run + start_run := rc.iv[current_run].start + end_end := start_run + rc.iv[current_run].length + // We are going to read values in the array at index i, and we are + // going to write them at index pos. So we do in-place processing. + // We always have that pos <= i by construction. So we can either + // overwrite a value just read, or a value that was previous read. + pos := 0 + i := 0 + for ; i < len(ac.content); i++ { + if ac.content[i] < start_run { + // the value in the array appears before the run [start_run, end_end] + ac.content[pos] = ac.content[i] + pos++ + } else if ac.content[i] <= end_end { + // nothing to do, the value is in the array but also in the run. + } else { + // We have the value in the array after the run. We cannot tell + // whether we need to keep it or not. So let us move to another run. + if current_run+1 < len(rc.iv) { + current_run++ + start_run = rc.iv[current_run].start + end_end = start_run + rc.iv[current_run].length + i-- // retry with the same i + } else { + // We have exhausted the number of runs. We can keep the rest of the values + // from i to len(ac.content) - 1 inclusively. + break // We are done, the rest of the array will be kept + } + } + } + for ; i < len(ac.content); i++ { + ac.content[pos] = ac.content[i] + pos++ + } + // We 'shink' the slice. + ac.content = ac.content[:pos] return ac } diff --git a/vendor/github.com/RoaringBitmap/roaring/runcontainer.go b/vendor/github.com/RoaringBitmap/roaring/runcontainer.go index 4ce48a294c..698f63c9f5 100644 --- a/vendor/github.com/RoaringBitmap/roaring/runcontainer.go +++ b/vendor/github.com/RoaringBitmap/roaring/runcontainer.go @@ -47,6 +47,7 @@ import ( // runContainer16 does run-length encoding of sets of // uint16 integers. type runContainer16 struct { + // iv is a slice of sorted, non-overlapping, non-adjacent intervals. iv []interval16 } diff --git a/vendor/github.com/longhorn/backing-image-manager/api/types.go b/vendor/github.com/longhorn/backing-image-manager/api/types.go index 8ae1759eb8..95fd779d9f 100644 --- a/vendor/github.com/longhorn/backing-image-manager/api/types.go +++ b/vendor/github.com/longhorn/backing-image-manager/api/types.go @@ -13,6 +13,7 @@ type BackingImage struct { Name string `json:"name"` UUID string `json:"uuid"` Size int64 `json:"size"` + VirtualSize int64 `json:"virtualSize"` ExpectedChecksum string `json:"expectedChecksum"` Status BackingImageStatus `json:"status"` @@ -32,6 +33,7 @@ func RPCToBackingImage(obj *rpc.BackingImageResponse) *BackingImage { Name: obj.Spec.Name, UUID: obj.Spec.Uuid, Size: obj.Spec.Size, + VirtualSize: obj.Spec.VirtualSize, ExpectedChecksum: obj.Spec.Checksum, Status: BackingImageStatus{ @@ -96,6 +98,7 @@ type FileInfo struct { FilePath string `json:"filePath"` UUID string `json:"uuid"` Size int64 `json:"size"` + VirtualSize int64 `json:"virtualSize"` State string `json:"state"` Progress int `json:"progress"` ProcessedSize int64 `json:"processedSize"` diff --git a/vendor/github.com/longhorn/backing-image-manager/pkg/rpc/rpc.pb.go b/vendor/github.com/longhorn/backing-image-manager/pkg/rpc/rpc.pb.go index 89b0e20271..93c5e96f42 100644 --- a/vendor/github.com/longhorn/backing-image-manager/pkg/rpc/rpc.pb.go +++ b/vendor/github.com/longhorn/backing-image-manager/pkg/rpc/rpc.pb.go @@ -1,4 +1,10 @@ // Code generated by protoc-gen-go. DO NOT EDIT. +<<<<<<< HEAD +======= +// versions: +// protoc-gen-go v1.26.0 +// protoc v4.25.1 +>>>>>>> ffe9a837 (vendor: Update longhorn/backing-image-manager to get VirtualSize) // source: github.com/longhorn/backing-image-manager/pkg/rpc/rpc.proto package rpc @@ -26,6 +32,7 @@ var _ = math.Inf const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package type BackingImageSpec struct { +<<<<<<< HEAD Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Uuid string `protobuf:"bytes,2,opt,name=uuid,proto3" json:"uuid,omitempty"` Size int64 `protobuf:"varint,3,opt,name=size,proto3" json:"size,omitempty"` @@ -33,6 +40,17 @@ type BackingImageSpec struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` +======= + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Uuid string `protobuf:"bytes,2,opt,name=uuid,proto3" json:"uuid,omitempty"` + Size int64 `protobuf:"varint,3,opt,name=size,proto3" json:"size,omitempty"` + Checksum string `protobuf:"bytes,4,opt,name=checksum,proto3" json:"checksum,omitempty"` + VirtualSize int64 `protobuf:"varint,5,opt,name=virtualSize,proto3" json:"virtualSize,omitempty"` +>>>>>>> ffe9a837 (vendor: Update longhorn/backing-image-manager to get VirtualSize) } func (m *BackingImageSpec) Reset() { *m = BackingImageSpec{} } @@ -88,6 +106,13 @@ func (m *BackingImageSpec) GetChecksum() string { return "" } +func (x *BackingImageSpec) GetVirtualSize() int64 { + if x != nil { + return x.VirtualSize + } + return 0 +} + type BackingImageStatus struct { State string `protobuf:"bytes,1,opt,name=state,proto3" json:"state,omitempty"` ErrorMsg string `protobuf:"bytes,2,opt,name=error_msg,json=errorMsg,proto3" json:"error_msg,omitempty"` @@ -681,6 +706,7 @@ func init() { proto.RegisterFile("github.com/longhorn/backing-image-manager/pkg/rpc/rpc.proto", fileDescriptor_cdf73a3350f27fd7) } +<<<<<<< HEAD var fileDescriptor_cdf73a3350f27fd7 = []byte{ // 871 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x55, 0x41, 0x6f, 0x1b, 0x45, @@ -738,6 +764,714 @@ var fileDescriptor_cdf73a3350f27fd7 = []byte{ 0xb5, 0xf4, 0x14, 0x5a, 0x67, 0xa1, 0x56, 0x63, 0xd9, 0xcc, 0x2c, 0x15, 0xf2, 0x81, 0x73, 0xd8, 0xfa, 0xa1, 0x21, 0xb2, 0x68, 0xb8, 0x61, 0x52, 0x0f, 0xff, 0x09, 0x00, 0x00, 0xff, 0xff, 0x55, 0xf9, 0xcf, 0x15, 0xbf, 0x0a, 0x00, 0x00, +======= +func (x *BackupCreateRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BackupCreateRequest) ProtoMessage() {} + +func (x *BackupCreateRequest) ProtoReflect() protoreflect.Message { + mi := &file_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BackupCreateRequest.ProtoReflect.Descriptor instead. +func (*BackupCreateRequest) Descriptor() ([]byte, []int) { + return file_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto_rawDescGZIP(), []int{12} +} + +func (x *BackupCreateRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *BackupCreateRequest) GetUuid() string { + if x != nil { + return x.Uuid + } + return "" +} + +func (x *BackupCreateRequest) GetChecksum() string { + if x != nil { + return x.Checksum + } + return "" +} + +func (x *BackupCreateRequest) GetBackupTarget() string { + if x != nil { + return x.BackupTarget + } + return "" +} + +func (x *BackupCreateRequest) GetLabels() []string { + if x != nil { + return x.Labels + } + return nil +} + +func (x *BackupCreateRequest) GetCredential() map[string]string { + if x != nil { + return x.Credential + } + return nil +} + +func (x *BackupCreateRequest) GetCompressionMethod() string { + if x != nil { + return x.CompressionMethod + } + return "" +} + +func (x *BackupCreateRequest) GetConcurrentLimit() int32 { + if x != nil { + return x.ConcurrentLimit + } + return 0 +} + +type BackupStatusRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *BackupStatusRequest) Reset() { + *x = BackupStatusRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BackupStatusRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BackupStatusRequest) ProtoMessage() {} + +func (x *BackupStatusRequest) ProtoReflect() protoreflect.Message { + mi := &file_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BackupStatusRequest.ProtoReflect.Descriptor instead. +func (*BackupStatusRequest) Descriptor() ([]byte, []int) { + return file_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto_rawDescGZIP(), []int{13} +} + +func (x *BackupStatusRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +type BackupStatusResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Progress int32 `protobuf:"varint,1,opt,name=progress,proto3" json:"progress,omitempty"` + BackupUrl string `protobuf:"bytes,2,opt,name=backup_url,json=backupUrl,proto3" json:"backup_url,omitempty"` + Error string `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"` + State string `protobuf:"bytes,4,opt,name=state,proto3" json:"state,omitempty"` +} + +func (x *BackupStatusResponse) Reset() { + *x = BackupStatusResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BackupStatusResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BackupStatusResponse) ProtoMessage() {} + +func (x *BackupStatusResponse) ProtoReflect() protoreflect.Message { + mi := &file_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BackupStatusResponse.ProtoReflect.Descriptor instead. +func (*BackupStatusResponse) Descriptor() ([]byte, []int) { + return file_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto_rawDescGZIP(), []int{14} +} + +func (x *BackupStatusResponse) GetProgress() int32 { + if x != nil { + return x.Progress + } + return 0 +} + +func (x *BackupStatusResponse) GetBackupUrl() string { + if x != nil { + return x.BackupUrl + } + return "" +} + +func (x *BackupStatusResponse) GetError() string { + if x != nil { + return x.Error + } + return "" +} + +func (x *BackupStatusResponse) GetState() string { + if x != nil { + return x.State + } + return "" +} + +var File_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto protoreflect.FileDescriptor + +var file_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto_rawDesc = []byte{ + 0x0a, 0x3b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6c, 0x6f, 0x6e, + 0x67, 0x68, 0x6f, 0x72, 0x6e, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x2d, 0x69, 0x6d, + 0x61, 0x67, 0x65, 0x2d, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2f, 0x70, 0x6b, 0x67, 0x2f, + 0x72, 0x70, 0x63, 0x2f, 0x72, 0x70, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x24, 0x6c, + 0x6f, 0x6e, 0x67, 0x68, 0x6f, 0x72, 0x6e, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x69, + 0x6d, 0x61, 0x67, 0x65, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x70, 0x6b, 0x67, 0x2e, + 0x72, 0x70, 0x63, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x22, 0x8c, 0x01, 0x0a, 0x10, 0x42, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x49, 0x6d, 0x61, 0x67, + 0x65, 0x53, 0x70, 0x65, 0x63, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x12, 0x12, 0x0a, + 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x73, 0x69, 0x7a, + 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x12, 0x20, 0x0a, + 0x0b, 0x76, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x0b, 0x76, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x53, 0x69, 0x7a, 0x65, 0x22, + 0xe2, 0x01, 0x0a, 0x12, 0x42, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x49, 0x6d, 0x61, 0x67, 0x65, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1b, 0x0a, 0x09, + 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x73, 0x67, 0x12, 0x2b, 0x0a, 0x11, 0x73, 0x65, 0x6e, + 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x10, 0x73, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x66, + 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x34, 0x0a, 0x16, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, + 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x4d, 0x61, + 0x6e, 0x61, 0x67, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1a, 0x0a, 0x08, + 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, + 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x68, 0x65, 0x63, + 0x6b, 0x73, 0x75, 0x6d, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x68, 0x65, 0x63, + 0x6b, 0x73, 0x75, 0x6d, 0x22, 0xb4, 0x01, 0x0a, 0x14, 0x42, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, + 0x49, 0x6d, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4a, 0x0a, + 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x6c, 0x6f, + 0x6e, 0x67, 0x68, 0x6f, 0x72, 0x6e, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x69, 0x6d, + 0x61, 0x67, 0x65, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x70, 0x6b, 0x67, 0x2e, 0x72, + 0x70, 0x63, 0x2e, 0x42, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x53, + 0x70, 0x65, 0x63, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x12, 0x50, 0x0a, 0x06, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x6c, 0x6f, 0x6e, 0x67, + 0x68, 0x6f, 0x72, 0x6e, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x69, 0x6d, 0x61, 0x67, + 0x65, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x70, 0x6b, 0x67, 0x2e, 0x72, 0x70, 0x63, + 0x2e, 0x42, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x37, 0x0a, 0x0d, 0x44, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x75, 0x75, 0x69, 0x64, 0x22, 0x34, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x22, 0xfa, 0x01, 0x0a, 0x0c, 0x4c, + 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6c, 0x0a, 0x0e, 0x62, + 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x45, 0x2e, 0x6c, 0x6f, 0x6e, 0x67, 0x68, 0x6f, 0x72, 0x6e, 0x2e, 0x62, + 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x6d, 0x61, 0x6e, 0x61, 0x67, + 0x65, 0x72, 0x2e, 0x70, 0x6b, 0x67, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x49, + 0x6d, 0x61, 0x67, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0d, 0x62, 0x61, 0x63, 0x6b, + 0x69, 0x6e, 0x67, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x1a, 0x7c, 0x0a, 0x12, 0x42, 0x61, 0x63, + 0x6b, 0x69, 0x6e, 0x67, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, + 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, + 0x79, 0x12, 0x50, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x3a, 0x2e, 0x6c, 0x6f, 0x6e, 0x67, 0x68, 0x6f, 0x72, 0x6e, 0x2e, 0x62, 0x61, 0x63, 0x6b, + 0x69, 0x6e, 0x67, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, + 0x70, 0x6b, 0x67, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x42, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x49, + 0x6d, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x82, 0x02, 0x0a, 0x0f, 0x56, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x67, 0x69, 0x74, 0x43, 0x6f, 0x6d, 0x6d, + 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x67, 0x69, 0x74, 0x43, 0x6f, 0x6d, + 0x6d, 0x69, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x44, 0x61, 0x74, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x44, 0x61, 0x74, + 0x65, 0x12, 0x48, 0x0a, 0x21, 0x62, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x6d, 0x61, + 0x67, 0x65, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x5f, 0x61, 0x70, 0x69, 0x5f, 0x76, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x1d, 0x62, 0x61, + 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, + 0x72, 0x41, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x4f, 0x0a, 0x25, 0x62, + 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x5f, 0x6d, 0x61, 0x6e, + 0x61, 0x67, 0x65, 0x72, 0x5f, 0x61, 0x70, 0x69, 0x5f, 0x6d, 0x69, 0x6e, 0x5f, 0x76, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x20, 0x62, 0x61, 0x63, 0x6b, + 0x69, 0x6e, 0x67, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x41, + 0x70, 0x69, 0x4d, 0x69, 0x6e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x7c, 0x0a, 0x0b, + 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4a, 0x0a, 0x04, 0x73, + 0x70, 0x65, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x6c, 0x6f, 0x6e, 0x67, + 0x68, 0x6f, 0x72, 0x6e, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x69, 0x6d, 0x61, 0x67, + 0x65, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x70, 0x6b, 0x67, 0x2e, 0x72, 0x70, 0x63, + 0x2e, 0x42, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x53, 0x70, 0x65, + 0x63, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x12, 0x21, 0x0a, 0x0c, 0x66, 0x72, 0x6f, 0x6d, 0x5f, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x66, + 0x72, 0x6f, 0x6d, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x54, 0x0a, 0x0b, 0x53, 0x65, + 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, + 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, + 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x6f, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x6f, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x22, 0x8a, 0x01, 0x0a, 0x0c, 0x46, 0x65, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x4a, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x36, 0x2e, 0x6c, 0x6f, 0x6e, 0x67, 0x68, 0x6f, 0x72, 0x6e, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x69, + 0x6e, 0x67, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x70, + 0x6b, 0x67, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x42, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x49, 0x6d, + 0x61, 0x67, 0x65, 0x53, 0x70, 0x65, 0x63, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x12, 0x2e, 0x0a, + 0x13, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x64, 0x61, 0x74, 0x61, + 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x40, 0x0a, + 0x16, 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, 0x65, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x75, + 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x22, + 0x57, 0x0a, 0x17, 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, 0x65, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, + 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x22, 0x0a, 0x0d, 0x73, 0x72, + 0x63, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0b, 0x73, 0x72, 0x63, 0x46, 0x69, 0x6c, 0x65, 0x50, 0x61, 0x74, 0x68, 0x12, 0x18, + 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x9a, 0x03, 0x0a, 0x13, 0x42, 0x61, 0x63, + 0x6b, 0x75, 0x70, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x68, 0x65, 0x63, + 0x6b, 0x73, 0x75, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x68, 0x65, 0x63, + 0x6b, 0x73, 0x75, 0x6d, 0x12, 0x23, 0x0a, 0x0d, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x5f, 0x74, + 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x62, 0x61, 0x63, + 0x6b, 0x75, 0x70, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x61, 0x62, + 0x65, 0x6c, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, + 0x73, 0x12, 0x69, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x18, + 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x49, 0x2e, 0x6c, 0x6f, 0x6e, 0x67, 0x68, 0x6f, 0x72, 0x6e, + 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x6d, 0x61, 0x6e, + 0x61, 0x67, 0x65, 0x72, 0x2e, 0x70, 0x6b, 0x67, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x42, 0x61, 0x63, + 0x6b, 0x75, 0x70, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x2e, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x52, 0x0a, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x12, 0x2d, 0x0a, 0x12, + 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x65, 0x74, 0x68, + 0x6f, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x29, 0x0a, 0x10, 0x63, + 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, + 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, + 0x74, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x1a, 0x3d, 0x0a, 0x0f, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, + 0x74, 0x69, 0x61, 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x29, 0x0a, 0x13, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x22, 0x7d, 0x0a, 0x14, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x67, + 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x67, + 0x72, 0x65, 0x73, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x5f, 0x75, + 0x72, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, + 0x55, 0x72, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, + 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x32, + 0xa7, 0x09, 0x0a, 0x1a, 0x42, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x49, 0x6d, 0x61, 0x67, 0x65, + 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x57, + 0x0a, 0x06, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x33, 0x2e, 0x6c, 0x6f, 0x6e, 0x67, 0x68, + 0x6f, 0x72, 0x6e, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x69, 0x6d, 0x61, 0x67, 0x65, + 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x70, 0x6b, 0x67, 0x2e, 0x72, 0x70, 0x63, 0x2e, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x75, 0x0a, 0x03, 0x47, 0x65, 0x74, 0x12, 0x30, + 0x2e, 0x6c, 0x6f, 0x6e, 0x67, 0x68, 0x6f, 0x72, 0x6e, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x69, 0x6e, + 0x67, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x70, 0x6b, + 0x67, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x3a, 0x2e, 0x6c, 0x6f, 0x6e, 0x67, 0x68, 0x6f, 0x72, 0x6e, 0x2e, 0x62, 0x61, 0x63, 0x6b, + 0x69, 0x6e, 0x67, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, + 0x70, 0x6b, 0x67, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x42, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x49, + 0x6d, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x54, + 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x32, + 0x2e, 0x6c, 0x6f, 0x6e, 0x67, 0x68, 0x6f, 0x72, 0x6e, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x69, 0x6e, + 0x67, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x70, 0x6b, + 0x67, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x00, 0x12, 0x5b, 0x0a, 0x0a, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x47, + 0x65, 0x74, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x35, 0x2e, 0x6c, 0x6f, 0x6e, + 0x67, 0x68, 0x6f, 0x72, 0x6e, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x69, 0x6d, 0x61, + 0x67, 0x65, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x70, 0x6b, 0x67, 0x2e, 0x72, 0x70, + 0x63, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x77, 0x0a, 0x04, 0x53, 0x79, 0x6e, 0x63, 0x12, 0x31, 0x2e, 0x6c, 0x6f, 0x6e, 0x67, + 0x68, 0x6f, 0x72, 0x6e, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x69, 0x6d, 0x61, 0x67, + 0x65, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x70, 0x6b, 0x67, 0x2e, 0x72, 0x70, 0x63, + 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3a, 0x2e, 0x6c, + 0x6f, 0x6e, 0x67, 0x68, 0x6f, 0x72, 0x6e, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x69, + 0x6d, 0x61, 0x67, 0x65, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x70, 0x6b, 0x67, 0x2e, + 0x72, 0x70, 0x63, 0x2e, 0x42, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x49, 0x6d, 0x61, 0x67, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x53, 0x0a, 0x04, 0x53, 0x65, + 0x6e, 0x64, 0x12, 0x31, 0x2e, 0x6c, 0x6f, 0x6e, 0x67, 0x68, 0x6f, 0x72, 0x6e, 0x2e, 0x62, 0x61, + 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, + 0x72, 0x2e, 0x70, 0x6b, 0x67, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, + 0x79, 0x0a, 0x05, 0x46, 0x65, 0x74, 0x63, 0x68, 0x12, 0x32, 0x2e, 0x6c, 0x6f, 0x6e, 0x67, 0x68, + 0x6f, 0x72, 0x6e, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x69, 0x6d, 0x61, 0x67, 0x65, + 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x70, 0x6b, 0x67, 0x2e, 0x72, 0x70, 0x63, 0x2e, + 0x46, 0x65, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3a, 0x2e, 0x6c, + 0x6f, 0x6e, 0x67, 0x68, 0x6f, 0x72, 0x6e, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x69, + 0x6d, 0x61, 0x67, 0x65, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x70, 0x6b, 0x67, 0x2e, + 0x72, 0x70, 0x63, 0x2e, 0x42, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x49, 0x6d, 0x61, 0x67, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x90, 0x01, 0x0a, 0x0f, 0x50, + 0x72, 0x65, 0x70, 0x61, 0x72, 0x65, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x3c, + 0x2e, 0x6c, 0x6f, 0x6e, 0x67, 0x68, 0x6f, 0x72, 0x6e, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x69, 0x6e, + 0x67, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x70, 0x6b, + 0x67, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, 0x65, 0x44, 0x6f, 0x77, + 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3d, 0x2e, 0x6c, + 0x6f, 0x6e, 0x67, 0x68, 0x6f, 0x72, 0x6e, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x69, + 0x6d, 0x61, 0x67, 0x65, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x70, 0x6b, 0x67, 0x2e, + 0x72, 0x70, 0x63, 0x2e, 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, 0x65, 0x44, 0x6f, 0x77, 0x6e, 0x6c, + 0x6f, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x63, 0x0a, + 0x0c, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x39, 0x2e, + 0x6c, 0x6f, 0x6e, 0x67, 0x68, 0x6f, 0x72, 0x6e, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, + 0x69, 0x6d, 0x61, 0x67, 0x65, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x70, 0x6b, 0x67, + 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, + 0x22, 0x00, 0x12, 0x87, 0x01, 0x0a, 0x0c, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x12, 0x39, 0x2e, 0x6c, 0x6f, 0x6e, 0x67, 0x68, 0x6f, 0x72, 0x6e, 0x2e, 0x62, + 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x6d, 0x61, 0x6e, 0x61, 0x67, + 0x65, 0x72, 0x2e, 0x70, 0x6b, 0x67, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x42, 0x61, 0x63, 0x6b, 0x75, + 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3a, + 0x2e, 0x6c, 0x6f, 0x6e, 0x67, 0x68, 0x6f, 0x72, 0x6e, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x69, 0x6e, + 0x67, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x70, 0x6b, + 0x67, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3b, 0x0a, 0x05, + 0x57, 0x61, 0x74, 0x63, 0x68, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x16, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x30, 0x01, 0x42, 0x33, 0x5a, 0x31, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6c, 0x6f, 0x6e, 0x67, 0x68, 0x6f, 0x72, 0x6e, + 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x2d, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2d, 0x6d, + 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x72, 0x70, 0x63, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto_rawDescOnce sync.Once + file_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto_rawDescData = file_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto_rawDesc +) + +func file_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto_rawDescGZIP() []byte { + file_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto_rawDescOnce.Do(func() { + file_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto_rawDescData = protoimpl.X.CompressGZIP(file_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto_rawDescData) + }) + return file_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto_rawDescData +} + +var file_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto_msgTypes = make([]protoimpl.MessageInfo, 17) +var file_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto_goTypes = []interface{}{ + (*BackingImageSpec)(nil), // 0: longhorn.backingimagemanager.pkg.rpc.BackingImageSpec + (*BackingImageStatus)(nil), // 1: longhorn.backingimagemanager.pkg.rpc.BackingImageStatus + (*BackingImageResponse)(nil), // 2: longhorn.backingimagemanager.pkg.rpc.BackingImageResponse + (*DeleteRequest)(nil), // 3: longhorn.backingimagemanager.pkg.rpc.DeleteRequest + (*GetRequest)(nil), // 4: longhorn.backingimagemanager.pkg.rpc.GetRequest + (*ListResponse)(nil), // 5: longhorn.backingimagemanager.pkg.rpc.ListResponse + (*VersionResponse)(nil), // 6: longhorn.backingimagemanager.pkg.rpc.VersionResponse + (*SyncRequest)(nil), // 7: longhorn.backingimagemanager.pkg.rpc.SyncRequest + (*SendRequest)(nil), // 8: longhorn.backingimagemanager.pkg.rpc.SendRequest + (*FetchRequest)(nil), // 9: longhorn.backingimagemanager.pkg.rpc.FetchRequest + (*PrepareDownloadRequest)(nil), // 10: longhorn.backingimagemanager.pkg.rpc.PrepareDownloadRequest + (*PrepareDownloadResponse)(nil), // 11: longhorn.backingimagemanager.pkg.rpc.PrepareDownloadResponse + (*BackupCreateRequest)(nil), // 12: longhorn.backingimagemanager.pkg.rpc.BackupCreateRequest + (*BackupStatusRequest)(nil), // 13: longhorn.backingimagemanager.pkg.rpc.BackupStatusRequest + (*BackupStatusResponse)(nil), // 14: longhorn.backingimagemanager.pkg.rpc.BackupStatusResponse + nil, // 15: longhorn.backingimagemanager.pkg.rpc.ListResponse.BackingImagesEntry + nil, // 16: longhorn.backingimagemanager.pkg.rpc.BackupCreateRequest.CredentialEntry + (*emptypb.Empty)(nil), // 17: google.protobuf.Empty +} +var file_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto_depIdxs = []int32{ + 0, // 0: longhorn.backingimagemanager.pkg.rpc.BackingImageResponse.spec:type_name -> longhorn.backingimagemanager.pkg.rpc.BackingImageSpec + 1, // 1: longhorn.backingimagemanager.pkg.rpc.BackingImageResponse.status:type_name -> longhorn.backingimagemanager.pkg.rpc.BackingImageStatus + 15, // 2: longhorn.backingimagemanager.pkg.rpc.ListResponse.backing_images:type_name -> longhorn.backingimagemanager.pkg.rpc.ListResponse.BackingImagesEntry + 0, // 3: longhorn.backingimagemanager.pkg.rpc.SyncRequest.spec:type_name -> longhorn.backingimagemanager.pkg.rpc.BackingImageSpec + 0, // 4: longhorn.backingimagemanager.pkg.rpc.FetchRequest.spec:type_name -> longhorn.backingimagemanager.pkg.rpc.BackingImageSpec + 16, // 5: longhorn.backingimagemanager.pkg.rpc.BackupCreateRequest.credential:type_name -> longhorn.backingimagemanager.pkg.rpc.BackupCreateRequest.CredentialEntry + 2, // 6: longhorn.backingimagemanager.pkg.rpc.ListResponse.BackingImagesEntry.value:type_name -> longhorn.backingimagemanager.pkg.rpc.BackingImageResponse + 3, // 7: longhorn.backingimagemanager.pkg.rpc.BackingImageManagerService.Delete:input_type -> longhorn.backingimagemanager.pkg.rpc.DeleteRequest + 4, // 8: longhorn.backingimagemanager.pkg.rpc.BackingImageManagerService.Get:input_type -> longhorn.backingimagemanager.pkg.rpc.GetRequest + 17, // 9: longhorn.backingimagemanager.pkg.rpc.BackingImageManagerService.List:input_type -> google.protobuf.Empty + 17, // 10: longhorn.backingimagemanager.pkg.rpc.BackingImageManagerService.VersionGet:input_type -> google.protobuf.Empty + 7, // 11: longhorn.backingimagemanager.pkg.rpc.BackingImageManagerService.Sync:input_type -> longhorn.backingimagemanager.pkg.rpc.SyncRequest + 8, // 12: longhorn.backingimagemanager.pkg.rpc.BackingImageManagerService.Send:input_type -> longhorn.backingimagemanager.pkg.rpc.SendRequest + 9, // 13: longhorn.backingimagemanager.pkg.rpc.BackingImageManagerService.Fetch:input_type -> longhorn.backingimagemanager.pkg.rpc.FetchRequest + 10, // 14: longhorn.backingimagemanager.pkg.rpc.BackingImageManagerService.PrepareDownload:input_type -> longhorn.backingimagemanager.pkg.rpc.PrepareDownloadRequest + 12, // 15: longhorn.backingimagemanager.pkg.rpc.BackingImageManagerService.BackupCreate:input_type -> longhorn.backingimagemanager.pkg.rpc.BackupCreateRequest + 13, // 16: longhorn.backingimagemanager.pkg.rpc.BackingImageManagerService.BackupStatus:input_type -> longhorn.backingimagemanager.pkg.rpc.BackupStatusRequest + 17, // 17: longhorn.backingimagemanager.pkg.rpc.BackingImageManagerService.Watch:input_type -> google.protobuf.Empty + 17, // 18: longhorn.backingimagemanager.pkg.rpc.BackingImageManagerService.Delete:output_type -> google.protobuf.Empty + 2, // 19: longhorn.backingimagemanager.pkg.rpc.BackingImageManagerService.Get:output_type -> longhorn.backingimagemanager.pkg.rpc.BackingImageResponse + 5, // 20: longhorn.backingimagemanager.pkg.rpc.BackingImageManagerService.List:output_type -> longhorn.backingimagemanager.pkg.rpc.ListResponse + 6, // 21: longhorn.backingimagemanager.pkg.rpc.BackingImageManagerService.VersionGet:output_type -> longhorn.backingimagemanager.pkg.rpc.VersionResponse + 2, // 22: longhorn.backingimagemanager.pkg.rpc.BackingImageManagerService.Sync:output_type -> longhorn.backingimagemanager.pkg.rpc.BackingImageResponse + 17, // 23: longhorn.backingimagemanager.pkg.rpc.BackingImageManagerService.Send:output_type -> google.protobuf.Empty + 2, // 24: longhorn.backingimagemanager.pkg.rpc.BackingImageManagerService.Fetch:output_type -> longhorn.backingimagemanager.pkg.rpc.BackingImageResponse + 11, // 25: longhorn.backingimagemanager.pkg.rpc.BackingImageManagerService.PrepareDownload:output_type -> longhorn.backingimagemanager.pkg.rpc.PrepareDownloadResponse + 17, // 26: longhorn.backingimagemanager.pkg.rpc.BackingImageManagerService.BackupCreate:output_type -> google.protobuf.Empty + 14, // 27: longhorn.backingimagemanager.pkg.rpc.BackingImageManagerService.BackupStatus:output_type -> longhorn.backingimagemanager.pkg.rpc.BackupStatusResponse + 17, // 28: longhorn.backingimagemanager.pkg.rpc.BackingImageManagerService.Watch:output_type -> google.protobuf.Empty + 18, // [18:29] is the sub-list for method output_type + 7, // [7:18] is the sub-list for method input_type + 7, // [7:7] is the sub-list for extension type_name + 7, // [7:7] is the sub-list for extension extendee + 0, // [0:7] is the sub-list for field type_name +} + +func init() { file_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto_init() } +func file_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto_init() { + if File_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BackingImageSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BackingImageStatus); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BackingImageResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*VersionResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SyncRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SendRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FetchRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PrepareDownloadRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PrepareDownloadResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BackupCreateRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BackupStatusRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BackupStatusResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto_rawDesc, + NumEnums: 0, + NumMessages: 17, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto_goTypes, + DependencyIndexes: file_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto_depIdxs, + MessageInfos: file_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto_msgTypes, + }.Build() + File_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto = out.File + file_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto_rawDesc = nil + file_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto_goTypes = nil + file_github_com_longhorn_backing_image_manager_pkg_rpc_rpc_proto_depIdxs = nil +>>>>>>> ffe9a837 (vendor: Update longhorn/backing-image-manager to get VirtualSize) } // Reference imports to suppress errors if they are not otherwise used. diff --git a/vendor/github.com/longhorn/backing-image-manager/pkg/rpc/rpc.proto b/vendor/github.com/longhorn/backing-image-manager/pkg/rpc/rpc.proto index b3225cb520..ee9b396563 100644 --- a/vendor/github.com/longhorn/backing-image-manager/pkg/rpc/rpc.proto +++ b/vendor/github.com/longhorn/backing-image-manager/pkg/rpc/rpc.proto @@ -24,6 +24,7 @@ message BackingImageSpec { string uuid = 2; int64 size = 3; string checksum = 4; + int64 virtualSize = 5; } message BackingImageStatus { diff --git a/vendor/github.com/longhorn/backing-image-manager/pkg/util/util.go b/vendor/github.com/longhorn/backing-image-manager/pkg/util/util.go index 76a0d48d84..2155d8a3d1 100644 --- a/vendor/github.com/longhorn/backing-image-manager/pkg/util/util.go +++ b/vendor/github.com/longhorn/backing-image-manager/pkg/util/util.go @@ -1,7 +1,6 @@ package util import ( - "bufio" "bytes" "compress/gzip" "context" @@ -13,7 +12,11 @@ import ( "os" "os/exec" "path/filepath" +<<<<<<< HEAD "strings" +======= + "regexp" +>>>>>>> ffe9a837 (vendor: Update longhorn/backing-image-manager to get VirtualSize) "time" "github.com/pkg/errors" @@ -150,6 +153,7 @@ type SyncingFileConfig struct { FilePath string `json:"name"` UUID string `json:"uuid"` Size int64 `json:"size"` + VirtualSize int64 `json:"virtualSize"` ExpectedChecksum string `json:"expectedChecksum"` CurrentChecksum string `json:"currentChecksum"` ModificationTime string `json:"modificationTime"` @@ -230,48 +234,60 @@ func ExecuteWithTimeout(timeout time.Duration, envs []string, binary string, arg return output.String(), nil } -func DetectFileFormat(filePath string) (string, error) { +type QemuImgInfo struct { + // For qcow2 files, VirtualSize may be larger than the physical + // image size on disk. For raw files, `qemu-img info` will report + // VirtualSize as being the same as the physical file size. + VirtualSize int64 `json:"virtual-size"` + Format string `json:"format"` +} + +func GetQemuImgInfo(filePath string) (imgInfo QemuImgInfo, err error) { /* Example command outputs - $ qemu-img info parrot.raw - image: parrot.raw - file format: raw - virtual size: 32M (33554432 bytes) - disk size: 2.2M - - $ qemu-img info parrot.qcow2 - image: parrot.qcow2 - file format: qcow2 - virtual size: 32M (33554432 bytes) - disk size: 2.3M - cluster_size: 65536 - Format specific information: - compat: 1.1 - lazy refcounts: false - refcount bits: 16 - corrupt: false + $ qemu-img info --output=json SLE-Micro.x86_64-5.5.0-Default-qcow-GM.qcow2 + { + "virtual-size": 21474836480, + "filename": "SLE-Micro.x86_64-5.5.0-Default-qcow-GM.qcow2", + "cluster-size": 65536, + "format": "qcow2", + "actual-size": 1001656320, + "format-specific": { + "type": "qcow2", + "data": { + "compat": "1.1", + "compression-type": "zlib", + "lazy-refcounts": false, + "refcount-bits": 16, + "corrupt": false, + "extended-l2": false + } + }, + "dirty-flag": false + } + + $ qemu-img info --output=json SLE-15-SP5-Full-x86_64-GM-Media1.iso + { + "virtual-size": 14548992000, + "filename": "SLE-15-SP5-Full-x86_64-GM-Media1.iso", + "format": "raw", + "actual-size": 14548996096, + "dirty-flag": false + } */ - output, err := Execute([]string{}, QemuImgBinary, "info", filePath) + output, err := Execute([]string{}, QemuImgBinary, "info", "--output=json", filePath) if err != nil { - return "", err + return } - - scanner := bufio.NewScanner(strings.NewReader(output)) - for scanner.Scan() { - line := strings.TrimSpace(scanner.Text()) - if strings.HasPrefix(line, "file format: ") { - return strings.TrimPrefix(line, "file format: "), nil - } - } - - return "", fmt.Errorf("cannot find the file format in the output %s", output) + err = json.Unmarshal([]byte(output), &imgInfo) + return } func ConvertFromRawToQcow2(filePath string) error { - if format, err := DetectFileFormat(filePath); err != nil { + if imgInfo, err := GetQemuImgInfo(filePath); err != nil { return err - } else if format == "qcow2" { + } else if imgInfo.Format == "qcow2" { return nil } diff --git a/vendor/modules.txt b/vendor/modules.txt index b04bd79550..3cf092390e 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -6,7 +6,11 @@ github.com/Microsoft/go-winio/pkg/guid # github.com/NYTimes/gziphandler v1.1.1 ## explicit; go 1.11 github.com/NYTimes/gziphandler +<<<<<<< HEAD # github.com/RoaringBitmap/roaring v1.2.3 +======= +# github.com/RoaringBitmap/roaring v1.9.1 +>>>>>>> ffe9a837 (vendor: Update longhorn/backing-image-manager to get VirtualSize) ## explicit; go 1.14 github.com/RoaringBitmap/roaring github.com/RoaringBitmap/roaring/internal @@ -217,7 +221,11 @@ github.com/kubernetes-csi/csi-lib-utils/protosanitizer # github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de ## explicit github.com/liggitt/tabwriter +<<<<<<< HEAD # github.com/longhorn/backing-image-manager v1.5.4 +======= +# github.com/longhorn/backing-image-manager v1.7.0-dev.0.20240326182459-c5288d745f4a +>>>>>>> ffe9a837 (vendor: Update longhorn/backing-image-manager to get VirtualSize) ## explicit; go 1.21 github.com/longhorn/backing-image-manager/api github.com/longhorn/backing-image-manager/pkg/client