From 565a54e2493efabe74d84ed4a0f7c16e607025ba Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 25 Aug 2024 05:06:16 +0000 Subject: [PATCH] fix(deps): update github.com/longhorn/longhorn-engine digest to 7dbeb34 --- go.mod | 3 +- go.sum | 6 +- .../golang/protobuf/ptypes/empty/empty.pb.go | 62 + .../longhorn/go-iscsi-helper/LICENSE | 201 -- .../go-iscsi-helper/iscsi/initiator.go | 367 --- .../longhorn/go-iscsi-helper/iscsi/target.go | 434 --- .../go-iscsi-helper/iscsidev/iscsi.go | 379 --- .../go-iscsi-helper/longhorndev/dev.go | 462 ---- .../go-iscsi-helper/types/tgtadm_errors.go | 30 - .../longhorn/go-iscsi-helper/types/types.go | 6 - .../longhorn/go-iscsi-helper/util/process.go | 18 - .../longhorn/go-iscsi-helper/util/util.go | 121 - .../controller/client/controller_client.go | 107 +- .../longhorn-engine/pkg/meta/version.go | 6 +- .../longhorn-engine/pkg/qcow/libqcow.go | 2 +- .../longhorn-engine/pkg/replica/backup.go | 8 +- .../pkg/replica/client/client.go | 157 +- .../longhorn-engine/pkg/replica/diff_disk.go | 10 +- .../longhorn-engine/pkg/replica/extents.go | 5 + .../longhorn-engine/pkg/replica/hash.go | 24 +- .../longhorn-engine/pkg/replica/replica.go | 170 +- .../pkg/replica/revision_counter.go | 95 +- .../longhorn-engine/pkg/replica/server.go | 33 +- .../longhorn-engine/pkg/sync/backup.go | 8 +- .../longhorn/longhorn-engine/pkg/sync/sync.go | 47 +- .../longhorn-engine/pkg/types/resource.go | 4 - .../longhorn-engine/pkg/types/types.go | 47 +- .../longhorn-engine/pkg/util/fsfreeze.go | 153 -- .../pkg/util/shared_timeouts.go | 63 - .../longhorn/longhorn-engine/pkg/util/util.go | 27 +- .../longhorn-engine/pkg/util/validation.go | 2 + .../longhorn-engine/proto/ptypes/common.pb.go | 96 + .../longhorn-engine/proto/ptypes/common.proto | 9 + .../proto/ptypes/controller.pb.go | 1922 +++++++++++++ .../proto/ptypes/controller.proto | 151 ++ .../ptypes}/interceptor.go | 2 +- .../proto/ptypes/replica.pb.go | 2138 +++++++++++++++ .../proto/ptypes/replica.proto | 175 ++ .../proto/ptypes/syncagent.pb.go | 2415 +++++++++++++++++ .../proto/ptypes/syncagent.proto | 193 ++ .../longhorn-engine/proto/ptypes/util.go | 29 + vendor/modules.txt | 14 +- 42 files changed, 7453 insertions(+), 2748 deletions(-) create mode 100644 vendor/github.com/golang/protobuf/ptypes/empty/empty.pb.go delete mode 100644 vendor/github.com/longhorn/go-iscsi-helper/LICENSE delete mode 100644 vendor/github.com/longhorn/go-iscsi-helper/iscsi/initiator.go delete mode 100644 vendor/github.com/longhorn/go-iscsi-helper/iscsi/target.go delete mode 100644 vendor/github.com/longhorn/go-iscsi-helper/iscsidev/iscsi.go delete mode 100644 vendor/github.com/longhorn/go-iscsi-helper/longhorndev/dev.go delete mode 100644 vendor/github.com/longhorn/go-iscsi-helper/types/tgtadm_errors.go delete mode 100644 vendor/github.com/longhorn/go-iscsi-helper/types/types.go delete mode 100644 vendor/github.com/longhorn/go-iscsi-helper/util/process.go delete mode 100644 vendor/github.com/longhorn/go-iscsi-helper/util/util.go delete mode 100644 vendor/github.com/longhorn/longhorn-engine/pkg/util/fsfreeze.go delete mode 100644 vendor/github.com/longhorn/longhorn-engine/pkg/util/shared_timeouts.go create mode 100644 vendor/github.com/longhorn/longhorn-engine/proto/ptypes/common.pb.go create mode 100644 vendor/github.com/longhorn/longhorn-engine/proto/ptypes/common.proto create mode 100644 vendor/github.com/longhorn/longhorn-engine/proto/ptypes/controller.pb.go create mode 100644 vendor/github.com/longhorn/longhorn-engine/proto/ptypes/controller.proto rename vendor/github.com/longhorn/longhorn-engine/{pkg/interceptor => proto/ptypes}/interceptor.go (99%) create mode 100644 vendor/github.com/longhorn/longhorn-engine/proto/ptypes/replica.pb.go create mode 100644 vendor/github.com/longhorn/longhorn-engine/proto/ptypes/replica.proto create mode 100644 vendor/github.com/longhorn/longhorn-engine/proto/ptypes/syncagent.pb.go create mode 100644 vendor/github.com/longhorn/longhorn-engine/proto/ptypes/syncagent.proto create mode 100644 vendor/github.com/longhorn/longhorn-engine/proto/ptypes/util.go diff --git a/go.mod b/go.mod index b7ffcc57f..81cdec3b6 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ require ( github.com/longhorn/backupstore v0.0.0-20240823072635-7afd6aa10d3e github.com/longhorn/go-common-libs v0.0.0-20240821134112-907f57efd48f github.com/longhorn/go-spdk-helper v0.0.0-20240820144231-33c0873802ff - github.com/longhorn/longhorn-engine v1.7.0-dev.0.20240824053610-9d2b194f765f + github.com/longhorn/longhorn-engine v1.5.5 github.com/longhorn/longhorn-spdk-engine v0.0.0-20240821075759-df0d2ae1b9bb github.com/longhorn/types v0.0.0-20240725040629-473d671316c4 github.com/pkg/errors v0.9.1 @@ -58,7 +58,6 @@ require ( github.com/json-iterator/go v1.1.12 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/kr/text v0.2.0 // indirect - github.com/longhorn/go-iscsi-helper v0.0.0-20240811043302-df8de353dd58 // indirect github.com/longhorn/nsfilelock v0.0.0-20200723175406-fa7c83ad0003 // indirect github.com/longhorn/sparse-tools v0.0.0-20240729132735-18b207e459ff // indirect github.com/mailru/easyjson v0.7.7 // indirect diff --git a/go.sum b/go.sum index 752d6fd22..59b0a340b 100644 --- a/go.sum +++ b/go.sum @@ -109,12 +109,10 @@ github.com/longhorn/backupstore v0.0.0-20240823072635-7afd6aa10d3e h1:Kvt/BqiHKa github.com/longhorn/backupstore v0.0.0-20240823072635-7afd6aa10d3e/go.mod h1:N4cqNhSs4VUw9aGbO2OfyiIvJL7/L53hUrNiT73UN+U= github.com/longhorn/go-common-libs v0.0.0-20240821134112-907f57efd48f h1:hjqUs3WVodkzrWwlUMVsnKAlom3uohoNlhZBGLsRvQY= github.com/longhorn/go-common-libs v0.0.0-20240821134112-907f57efd48f/go.mod h1:Qv34svr/msf6XoUwnrltNBTwMhQljbHEhb5ZKWiRdxo= -github.com/longhorn/go-iscsi-helper v0.0.0-20240811043302-df8de353dd58 h1:fzLAnCLCecoUnsSYyyo7li5GD17xckyBl/zietxz168= -github.com/longhorn/go-iscsi-helper v0.0.0-20240811043302-df8de353dd58/go.mod h1:TobRDCXmF0Ni+jz6+nLJamw3uVu+gNDZoZre1JczGwc= github.com/longhorn/go-spdk-helper v0.0.0-20240820144231-33c0873802ff h1:8vR29tkbmzmdqRVtOo5kL7Rs7nfhA6duXsmetIh1Tbg= github.com/longhorn/go-spdk-helper v0.0.0-20240820144231-33c0873802ff/go.mod h1:Bzz7kGNYikAJqpmeV3cgN8jP1y9M+/oaiBc5iolIxuA= -github.com/longhorn/longhorn-engine v1.7.0-dev.0.20240824053610-9d2b194f765f h1:Nsal/5akxiEyoBL+M0NOXiV5R96ACEgC64rK5w0VKcY= -github.com/longhorn/longhorn-engine v1.7.0-dev.0.20240824053610-9d2b194f765f/go.mod h1:E1ec7ub7SNGvASDtiFHL1dXX4bhEQiroBixD2GGeRbQ= +github.com/longhorn/longhorn-engine v1.5.5 h1:44p9Iyp4boKSHgMAl8iD4nY/EQRnF/e7hPSmqqIqvIk= +github.com/longhorn/longhorn-engine v1.5.5/go.mod h1:/QEAmYu1ZNsKR22d8wdqssbz1ja7Yyj/GyPu8BYkTEk= github.com/longhorn/longhorn-spdk-engine v0.0.0-20240821075759-df0d2ae1b9bb h1:Bon92kq45spPKp1JZEQrlDm+DJI37z56D64cL+/64Po= github.com/longhorn/longhorn-spdk-engine v0.0.0-20240821075759-df0d2ae1b9bb/go.mod h1:j6SIrhGW6mFc18MjzXfTHkAZA0ms4k/oL3piCYNlZPo= github.com/longhorn/nsfilelock v0.0.0-20200723175406-fa7c83ad0003 h1:Jw9uANsGcHTxp6HcC++/vN17LfeuDmozHI2j6DoZf5E= diff --git a/vendor/github.com/golang/protobuf/ptypes/empty/empty.pb.go b/vendor/github.com/golang/protobuf/ptypes/empty/empty.pb.go new file mode 100644 index 000000000..16686a655 --- /dev/null +++ b/vendor/github.com/golang/protobuf/ptypes/empty/empty.pb.go @@ -0,0 +1,62 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: github.com/golang/protobuf/ptypes/empty/empty.proto + +package empty + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + emptypb "google.golang.org/protobuf/types/known/emptypb" + reflect "reflect" +) + +// Symbols defined in public import of google/protobuf/empty.proto. + +type Empty = emptypb.Empty + +var File_github_com_golang_protobuf_ptypes_empty_empty_proto protoreflect.FileDescriptor + +var file_github_com_golang_protobuf_ptypes_empty_empty_proto_rawDesc = []byte{ + 0x0a, 0x33, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x6c, + 0x61, 0x6e, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x70, 0x74, 0x79, + 0x70, 0x65, 0x73, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 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, 0x42, 0x2f, 0x5a, 0x2d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2f, 0x70, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x3b, 0x65, 0x6d, + 0x70, 0x74, 0x79, 0x50, 0x00, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var file_github_com_golang_protobuf_ptypes_empty_empty_proto_goTypes = []interface{}{} +var file_github_com_golang_protobuf_ptypes_empty_empty_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_github_com_golang_protobuf_ptypes_empty_empty_proto_init() } +func file_github_com_golang_protobuf_ptypes_empty_empty_proto_init() { + if File_github_com_golang_protobuf_ptypes_empty_empty_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_github_com_golang_protobuf_ptypes_empty_empty_proto_rawDesc, + NumEnums: 0, + NumMessages: 0, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_github_com_golang_protobuf_ptypes_empty_empty_proto_goTypes, + DependencyIndexes: file_github_com_golang_protobuf_ptypes_empty_empty_proto_depIdxs, + }.Build() + File_github_com_golang_protobuf_ptypes_empty_empty_proto = out.File + file_github_com_golang_protobuf_ptypes_empty_empty_proto_rawDesc = nil + file_github_com_golang_protobuf_ptypes_empty_empty_proto_goTypes = nil + file_github_com_golang_protobuf_ptypes_empty_empty_proto_depIdxs = nil +} diff --git a/vendor/github.com/longhorn/go-iscsi-helper/LICENSE b/vendor/github.com/longhorn/go-iscsi-helper/LICENSE deleted file mode 100644 index 8dada3eda..000000000 --- a/vendor/github.com/longhorn/go-iscsi-helper/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright {yyyy} {name of copyright owner} - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/vendor/github.com/longhorn/go-iscsi-helper/iscsi/initiator.go b/vendor/github.com/longhorn/go-iscsi-helper/iscsi/initiator.go deleted file mode 100644 index abe4c77b0..000000000 --- a/vendor/github.com/longhorn/go-iscsi-helper/iscsi/initiator.go +++ /dev/null @@ -1,367 +0,0 @@ -package iscsi - -import ( - "bufio" - "fmt" - "path/filepath" - "strconv" - "strings" - "time" - - "github.com/pkg/errors" - "github.com/sirupsen/logrus" - - lhns "github.com/longhorn/go-common-libs/ns" - lhtypes "github.com/longhorn/go-common-libs/types" -) - -var ( - DeviceWaitRetryCounts = 10 - DeviceWaitRetryInterval = 1 * time.Second - - ScsiNodesDirs = []string{ - "/etc/iscsi/nodes/", - "/var/lib/iscsi/nodes/", - } -) - -const ( - iscsiBinary = "iscsiadm" - scanModeManual = "manual" - scanModeAuto = "auto" - ScanTimeout = 10 * time.Second -) - -func CheckForInitiatorExistence(nsexec *lhns.Executor) error { - opts := []string{ - "--version", - } - _, err := nsexec.Execute(nil, iscsiBinary, opts, lhtypes.ExecuteDefaultTimeout) - return err -} - -func UpdateScsiDeviceTimeout(devName string, timeout int64, nsexec *lhns.Executor) error { - deviceTimeoutFile := filepath.Join("/sys/block", devName, "device", "timeout") - return lhns.WriteFile(deviceTimeoutFile, fmt.Sprint(timeout)) -} - -func UpdateIscsiDeviceAbortTimeout(target string, timeout int64, nsexec *lhns.Executor) error { - opts := []string{ - "-m", "node", - "-T", target, - "-o", "update", - "-n", "node.session.err_timeo.abort_timeout", - "-v", strconv.FormatInt(timeout, 10), - } - _, err := nsexec.Execute(nil, iscsiBinary, opts, lhtypes.ExecuteDefaultTimeout) - return err -} - -func DiscoverTarget(ip, target string, nsexec *lhns.Executor) error { - opts := []string{ - "-m", "discovery", - "-t", "sendtargets", - "-p", ip, - } - output, err := nsexec.Execute(nil, iscsiBinary, opts, lhtypes.ExecuteDefaultTimeout) - if err != nil { - return err - } - // Sometime iscsiadm won't return error but showing e.g.: - // iscsiadm: Could not stat /etc/iscsi/nodes//,3260,-1/default to - // delete node: No such file or directory\n\niscsiadm: Could not - // add/update [tcp:[hw=,ip=,net_if=,iscsi_if=default] 172.18.0.5,3260,1 - // iqn.2019-10.io.longhorn:vol9]\n172.18.0.5:3260,1 - // iqn.2019-10.io.longhorn:vol9\n" - if strings.Contains(output, "Could not") { - return fmt.Errorf("cannot discover target: %s", output) - } - if !strings.Contains(output, target) { - return fmt.Errorf("cannot find target %s in discovered targets %s", target, output) - } - return nil -} - -func DeleteDiscoveredTarget(ip, target string, nsexec *lhns.Executor) error { - opts := []string{ - "-m", "node", - "-o", "delete", - "-T", target, - } - if ip != "" { - opts = append(opts, "-p", ip) - } - _, err := nsexec.Execute(nil, iscsiBinary, opts, lhtypes.ExecuteDefaultTimeout) - return err -} - -func IsTargetDiscovered(ip, target string, nsexec *lhns.Executor) bool { - opts := []string{ - "-m", "node", - "-T", target, - } - if ip != "" { - opts = append(opts, "-p", ip) - } - _, err := nsexec.Execute(nil, iscsiBinary, opts, lhtypes.ExecuteDefaultTimeout) - return err == nil -} - -func LoginTarget(ip, target string, nsexec *lhns.Executor) error { - opts := []string{ - "-m", "node", - "-T", target, - "-p", ip, - "--login", - } - _, err := nsexec.Execute(nil, iscsiBinary, opts, lhtypes.ExecuteDefaultTimeout) - if err != nil { - return err - } - - scanMode, err := getIscsiNodeSessionScanMode(ip, target, nsexec) - if err != nil { - return errors.Wrap(err, "Failed to get node.session.scan mode") - } - - if scanMode == scanModeManual { - logrus.Infof("Manually rescan LUNs of the target %v:%v", target, ip) - if err := manualScanSession(ip, target, nsexec); err != nil { - return errors.Wrapf(err, "failed to manually rescan iscsi session of target %v:%v", target, ip) - } - } else { - logrus.Infof("default: automatically rescan all LUNs of all iscsi sessions") - } - - return nil -} - -// LogoutTarget will logout all sessions if ip == "" -func LogoutTarget(ip, target string, nsexec *lhns.Executor) error { - opts := []string{ - "-m", "node", - "-T", target, - "--logout", - } - if ip != "" { - opts = append(opts, "-p", ip) - } - _, err := nsexec.Execute(nil, iscsiBinary, opts, lhtypes.ExecuteDefaultTimeout) - return err -} - -func GetDevice(ip, target string, lun int, nsexec *lhns.Executor) (*lhtypes.BlockDeviceInfo, error) { - var err error - - var dev *lhtypes.BlockDeviceInfo - for i := 0; i < DeviceWaitRetryCounts; i++ { - dev, err = findScsiDevice(ip, target, lun, nsexec) - if err == nil { - break - } - time.Sleep(DeviceWaitRetryInterval) - } - if err != nil { - return nil, err - } - return dev, nil -} - -// IsTargetLoggedIn check all portals if ip == "" -func IsTargetLoggedIn(ip, target string, nsexec *lhns.Executor) bool { - opts := []string{ - "-m", "session", - } - - output, err := nsexec.Execute(nil, iscsiBinary, opts, lhtypes.ExecuteDefaultTimeout) - if err != nil { - return false - } - /* It will looks like: - tcp: [463] 172.17.0.2:3260,1 iqn.2019-10.io.longhorn:test-volume - or: - tcp: [463] 172.17.0.2:3260,1 iqn.2019-10.io.longhorn:test-volume (non-flash) - */ - found := false - scanner := bufio.NewScanner(strings.NewReader(output)) - for scanner.Scan() { - line := scanner.Text() - if strings.Contains(line, ip+":") { - if strings.HasSuffix(line, " "+target) || - strings.Contains(scanner.Text(), " "+target+" ") { - found = true - break - } - } - } - - return found -} - -func manualScanSession(ip, target string, nsexec *lhns.Executor) error { - opts := []string{ - "-m", "node", - "-T", target, - "-p", ip, - "--rescan", - } - _, err := nsexec.Execute(nil, iscsiBinary, opts, ScanTimeout) - return err -} - -func getIscsiNodeSessionScanMode(ip, target string, nsexec *lhns.Executor) (string, error) { - opts := []string{ - "-m", "node", - "-T", target, - "-p", ip, - "-o", "show", - } - output, err := nsexec.Execute(nil, iscsiBinary, opts, ScanTimeout) - if err != nil { - return "", err - } - if strings.Contains(output, "node.session.scan = manual") { - return scanModeManual, nil - } - return scanModeAuto, nil -} - -func findScsiDevice(ip, target string, lun int, nsexec *lhns.Executor) (*lhtypes.BlockDeviceInfo, error) { - name := "" - - opts := []string{ - "-m", "session", - "-P", "3", - } - output, err := nsexec.Execute(nil, iscsiBinary, opts, lhtypes.ExecuteDefaultTimeout) - if err != nil { - return nil, err - } - /* - Now we got something like this in output, and need to parse it - Target: iqn.2019-10.io.longhorn:for.all (non-flash) - Current Portal: 172.17.0.2:3260,1 - Persistent Portal: 172.17.0.2:3260,1 - ... - Attached SCSI devices: - ... - scsi12 Channel 00 Id 0 Lun: 0 - scsi12 Channel 00 Id 0 Lun: 1 - Attached scsi disk sdb State: running - ... - Target: ... - */ - scanner := bufio.NewScanner(strings.NewReader(output)) - targetLine := "Target: " + target - ipLine := " " + ip + ":" - lunLine := "Lun: " + strconv.Itoa(lun) - diskPrefix := "Attached scsi disk" - stateLine := "State:" - - inTarget := false - inIP := false - inLun := false - for scanner.Scan() { - /* Target line can be: - Target: iqn.2019-10.io.longhorn:for.all (non-flash) - or: - Target: iqn.2019-10.io.longhorn:for.all - */ - if !inTarget && - (strings.Contains(scanner.Text(), targetLine+" ") || - strings.HasSuffix(scanner.Text(), targetLine)) { - inTarget = true - continue - } - if inTarget && strings.Contains(scanner.Text(), ipLine) { - inIP = true - continue - } - if inIP && strings.Contains(scanner.Text(), lunLine) { - inLun = true - continue - } - // The line we need - if inLun { - line := scanner.Text() - if !strings.Contains(line, diskPrefix) { - return nil, fmt.Errorf("invalid output format, cannot find disk in: %s\n %s", line, output) - } - line = strings.TrimSpace(strings.Split(line, stateLine)[0]) - line = strings.TrimPrefix(line, diskPrefix) - name = strings.TrimSpace(line) - break - } - } - - if name == "" { - return nil, fmt.Errorf("cannot find iSCSI device") - } - - // TODO: replace with namespace joiner - // now that we know the device is mapped, we can get it's (major:minor) - devices, err := lhns.GetSystemBlockDevices() - if err != nil { - return nil, err - } - - dev, known := devices[name] - if !known { - return nil, fmt.Errorf("cannot find kernel device for iSCSI device: %s", name) - } - - return &dev, nil -} - -func CleanupScsiNodes(target string) error { - for _, dir := range ScsiNodesDirs { - if _, err := lhns.GetFileInfo(dir); err != nil { - continue - } - - targetDir := filepath.Join(dir, target) - if _, err := lhns.GetFileInfo(targetDir); err != nil { - continue - } - - // Remove all empty files in the directory - emptyFilePaths, err := lhns.GetEmptyFiles(targetDir) - if err != nil { - return err - } - - for _, emptyFilePath := range emptyFilePaths { - err := lhns.DeletePath(emptyFilePath) - if err != nil { - return errors.Wrapf(err, "failed to clean up empty iSCSI node file %v", emptyFilePath) - } - } - - // Try to remove the upper level directory containing empty files. - // We don't mind if it fails. - dirContainEmptyFiles := make(map[string]bool) - for _, emptyFilePath := range emptyFilePaths { - dirContainEmptyFiles[filepath.Dir(emptyFilePath)] = true - } - for dir := range dirContainEmptyFiles { - err := lhns.DeleteDirectory(dir) - if err != nil { - logrus.WithError(err).Warnf("Failed to clean up iSCSI node directory %v", dir) - } - } - } - return nil -} - -func RescanTarget(ip, target string, nsexec *lhns.Executor) error { - opts := []string{ - "-m", "node", - "-T", target, - "-R", - } - if ip != "" { - opts = append(opts, "-p", ip) - } - _, err := nsexec.Execute(nil, iscsiBinary, opts, lhtypes.ExecuteDefaultTimeout) - return err -} diff --git a/vendor/github.com/longhorn/go-iscsi-helper/iscsi/target.go b/vendor/github.com/longhorn/go-iscsi-helper/iscsi/target.go deleted file mode 100644 index fc5648821..000000000 --- a/vendor/github.com/longhorn/go-iscsi-helper/iscsi/target.go +++ /dev/null @@ -1,434 +0,0 @@ -package iscsi - -import ( - "bufio" - "fmt" - "io" - "os" - "os/exec" - "strconv" - "strings" - "time" - - "github.com/pkg/errors" - - lhexec "github.com/longhorn/go-common-libs/exec" - lhtypes "github.com/longhorn/go-common-libs/types" -) - -var ( - TgtdRetryCounts = 5 - TgtdRetryInterval = 1 * time.Second -) - -const ( - tgtBinary = "tgtadm" - - maxTargetID = 4095 - - logFile = "/var/log/tgtd.log" -) - -// CreateTarget will create a iSCSI target using the name specified. If name is -// unspecified, a name will be generated. Notice the name must comply with iSCSI -// name format. -func CreateTarget(tid int, name string) error { - opts := []string{ - "--lld", "iscsi", - "--op", "new", - "--mode", "target", - "--tid", strconv.Itoa(tid), - "-T", name, - } - _, err := lhexec.NewExecutor().Execute(nil, tgtBinary, opts, lhtypes.ExecuteDefaultTimeout) - return err -} - -// DeleteTarget will remove a iSCSI target specified by tid -func DeleteTarget(tid int) error { - opts := []string{ - "--lld", "iscsi", - "--op", "delete", - "--mode", "target", - "--tid", strconv.Itoa(tid), - } - _, err := lhexec.NewExecutor().Execute(nil, tgtBinary, opts, lhtypes.ExecuteDefaultTimeout) - return err -} - -// AddLunBackedByFile will add a LUN in an existing target, which backing by -// specified file. -func AddLunBackedByFile(tid int, lun int, backingFile string) error { - opts := []string{ - "--lld", "iscsi", - "--op", "new", - "--mode", "logicalunit", - "--tid", strconv.Itoa(tid), - "--lun", strconv.Itoa(lun), - "-b", backingFile, - } - _, err := lhexec.NewExecutor().Execute(nil, tgtBinary, opts, lhtypes.ExecuteDefaultTimeout) - return err -} - -// AddLun will add a LUN in an existing target, which backing by -// specified file, using AIO backing-store -func AddLun(tid int, lun int, backingFile string, bstype string, bsopts string) error { - if !CheckTargetForBackingStore(bstype) { - return fmt.Errorf("backing-store %s is not supported", bstype) - } - opts := []string{ - "--lld", "iscsi", - "--op", "new", - "--mode", "logicalunit", - "--tid", strconv.Itoa(tid), - "--lun", strconv.Itoa(lun), - "-b", backingFile, - "--bstype", bstype, - } - if bsopts != "" { - opts = append(opts, "--bsopts", bsopts) - } - _, err := lhexec.NewExecutor().Execute(nil, tgtBinary, opts, lhtypes.ExecuteDefaultTimeout) - return err -} - -// UpdateLun will update parameters for the LUN -func UpdateLun(tid int, lun int, params map[string]string) error { - opts := []string{ - "--lld", "iscsi", - "--op", "update", - "--mode", "logicalunit", - "--tid", strconv.Itoa(tid), - "--lun", strconv.Itoa(lun), - } - if len(params) != 0 { - paramStr := "" - for k, v := range params { - paramStr += fmt.Sprintf("%s=%s,", k, v) - } - opts = append(opts, "--params", strings.TrimSuffix(paramStr, ",")) - } - _, err := lhexec.NewExecutor().Execute(nil, tgtBinary, opts, lhtypes.ExecuteDefaultTimeout) - return err -} - -// SetLunThinProvisioning will set param thin_provisioning to true for the LUN -func SetLunThinProvisioning(tid int, lun int) error { - return UpdateLun(tid, lun, map[string]string{"thin_provisioning": "1"}) -} - -// DisableWriteCache will set param write-cache to false for the LUN -func DisableWriteCache(tid int, lun int) error { - // Mode page 8 is the caching mode page - // Refer to "Caching Mode page (08h)" in SCSI Commands Reference Manual for more information. - // https://www.seagate.com/files/staticfiles/support/docs/manual/Interface%20manuals/100293068j.pdf - // https://github.com/fujita/tgt/blob/master/scripts/tgt-admin#L418 - return UpdateLun(tid, lun, map[string]string{"mode_page": "8:0:18:0x10:0:0xff:0xff:0:0:0xff:0xff:0xff:0xff:0x80:0x14:0:0:0:0:0:0"}) -} - -// DeleteLun will remove a LUN from an target -func DeleteLun(tid int, lun int) error { - opts := []string{ - "--lld", "iscsi", - "--op", "delete", - "--mode", "logicalunit", - "--tid", strconv.Itoa(tid), - "--lun", strconv.Itoa(lun), - } - _, err := lhexec.NewExecutor().Execute(nil, tgtBinary, opts, lhtypes.ExecuteDefaultTimeout) - return err -} - -// ExpandLun will update the size for the LUN. -// This is valid only for the customized tgt https://github.com/rancher/tgt/ -func ExpandLun(tid, lun int, size int64) error { - opts := []string{ - "--lld", "iscsi", - "--op", "update", - "--mode", "logicalunit", - "--tid", strconv.Itoa(tid), - "--lun", strconv.Itoa(lun), - "--params", fmt.Sprintf("bsopts=size=%d", size), - } - _, err := lhexec.NewExecutor().Execute(nil, tgtBinary, opts, lhtypes.ExecuteDefaultTimeout) - return err -} - -// BindInitiator will add permission to allow certain initiator(s) to connect to -// certain target. "ALL" is a special initiator which is the wildcard -func BindInitiator(tid int, initiator string) error { - opts := []string{ - "--lld", "iscsi", - "--op", "bind", - "--mode", "target", - "--tid", strconv.Itoa(tid), - "-I", initiator, - } - _, err := lhexec.NewExecutor().Execute(nil, tgtBinary, opts, lhtypes.ExecuteDefaultTimeout) - return err -} - -// UnbindInitiator will remove permission to allow certain initiator(s) to connect to -// certain target. -func UnbindInitiator(tid int, initiator string) error { - opts := []string{ - "--lld", "iscsi", - "--op", "unbind", - "--mode", "target", - "--tid", strconv.Itoa(tid), - "-I", initiator, - } - _, err := lhexec.NewExecutor().Execute(nil, tgtBinary, opts, lhtypes.ExecuteDefaultTimeout) - return err -} - -// StartDaemon will start tgtd daemon, prepare for further commands -func StartDaemon(debug bool) error { - if CheckTargetForBackingStore("rdwr") { - fmt.Fprintf(os.Stderr, "go-iscsi-helper: tgtd is already running\n") - return nil - } - - logf, err := os.OpenFile(logFile, os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0644) - if err != nil { - return err - } - go startDaemon(logf, debug) - - // Wait until daemon is up - daemonIsRunning := false - for i := 0; i < TgtdRetryCounts; i++ { - if CheckTargetForBackingStore("rdwr") { - daemonIsRunning = true - break - } - time.Sleep(TgtdRetryInterval) - } - if !daemonIsRunning { - return fmt.Errorf("failed to start tgtd daemon") - } - return nil -} - -func startDaemon(logf *os.File, debug bool) { - defer logf.Close() - - opts := []string{ - "-f", - } - if debug { - opts = append(opts, "-d", "1") - } - cmd := exec.Command("tgtd", opts...) - mw := io.MultiWriter(os.Stderr, logf) - cmd.Stdout = mw - cmd.Stderr = mw - if err := cmd.Run(); err != nil { - if CheckTargetForBackingStore("rdwr") { - fmt.Fprintf(mw, "go-iscsi-helper: tgtd is already running\n") - return - } - fmt.Fprintf(mw, "go-iscsi-helper: command failed: %v\n", err) - panic(err) - } - fmt.Fprintln(mw, "go-iscsi-helper: done") -} - -func CheckTargetForBackingStore(name string) bool { - opts := []string{ - "--lld", "iscsi", - "--op", "show", - "--mode", "system", - } - output, err := lhexec.NewExecutor().Execute(nil, tgtBinary, opts, lhtypes.ExecuteDefaultTimeout) - if err != nil { - return false - } - return strings.Contains(output, " "+name) -} - -// GetTargetTid If returned TID is -1, then target doesn't exist, but we won't -// return error -func GetTargetTid(name string) (int, error) { - opts := []string{ - "--lld", "iscsi", - "--op", "show", - "--mode", "target", - } - output, err := lhexec.NewExecutor().Execute(nil, tgtBinary, opts, lhtypes.ExecuteDefaultTimeout) - if err != nil { - return -1, err - } - /* Output will looks like: - Target 1: iqn.2016-08.com.example:a - System information: - ... - Target 2: iqn.2016-08.com.example:b - System information: - ... - */ - tid := -1 - scanner := bufio.NewScanner(strings.NewReader(output)) - for scanner.Scan() { - if strings.HasSuffix(scanner.Text(), " "+name) { - tidString := strings.Fields(strings.Split(scanner.Text(), ":")[0])[1] - tid, err = strconv.Atoi(tidString) - if err != nil { - return -1, errors.Wrapf(err, "BUG: Failed to parse %s", tidString) - } - break - } - } - return tid, nil -} - -func ShutdownTgtd() error { - // Step 1: Show all targets - showOpts := []string{"--op", "show", "--mode", "target"} - output, err := lhexec.NewExecutor().Execute(nil, tgtBinary, showOpts, lhtypes.ExecuteDefaultTimeout) - if err != nil { - - return fmt.Errorf("failed to show targets: %v", err) - } - - // Step 2: Parse target IDs - scanner := bufio.NewScanner(strings.NewReader(output)) - var targetIDs []string - for scanner.Scan() { - line := scanner.Text() - if strings.HasPrefix(line, "Target") { - fields := strings.Fields(line) - if len(fields) >= 2 { - targetIDs = append(targetIDs, fields[1]) - } - } - } - - if err := scanner.Err(); err != nil { - return errors.Wrapf(err, "failed to parse targets") - } - - // Step 3: Delete each target - for _, tid := range targetIDs { - deleteOpts := []string{"--op", "delete", "--mode", "target", "--tid", tid} - _, err := lhexec.NewExecutor().Execute(nil, tgtBinary, deleteOpts, lhtypes.ExecuteDefaultTimeout) - if err != nil { - return errors.Wrapf(err, "failed to delete target %s", tid) - } - } - - return nil -} - -func GetTargetConnections(tid int) (map[string][]string, error) { - opts := []string{ - "--lld", "iscsi", - "--op", "show", - "--mode", "conn", - "--tid", strconv.Itoa(tid), - } - output, err := lhexec.NewExecutor().Execute(nil, tgtBinary, opts, lhtypes.ExecuteDefaultTimeout) - if err != nil { - return nil, err - } - /* Output will looks like: - Session: 11 - Connection: 0 - Initiator: iqn.2016-08.com.example:a - IP Address: 192.168.0.1 - Session: 12 - Connection: 1 - Initiator: iqn.2016-08.com.example:a - IP Address: 192.168.0.2 - ... - */ - res := map[string][]string{} - currentSIDString := "" - currentCIDStringList := []string{} - scanner := bufio.NewScanner(strings.NewReader(output)) - for scanner.Scan() { - line := strings.TrimSpace(scanner.Text()) - if strings.HasPrefix(line, "Session: ") { - if currentSIDString != "" { - res[currentSIDString] = currentCIDStringList - } - sidFields := strings.Split(line, ": ") - if len(sidFields) != 2 { - return nil, fmt.Errorf("failed to parse and get session id from line %v", line) - } - sidString := sidFields[1] - if _, err := strconv.Atoi(sidString); err != nil { - return nil, err - } - currentSIDString = sidString - currentCIDStringList = []string{} - } - if strings.HasPrefix(line, "Connection: ") { - cidFields := strings.Split(line, ": ") - if len(cidFields) != 2 { - return nil, fmt.Errorf("failed to parse and get connection id from line %v", line) - } - cidString := cidFields[1] - if _, err := strconv.Atoi(cidString); err != nil { - return nil, err - } - currentCIDStringList = append(currentCIDStringList, cidString) - } - } - if len(currentCIDStringList) != 0 { - res[currentSIDString] = currentCIDStringList - } - return res, nil -} - -func CloseConnection(tid int, sid, cid string) error { - opts := []string{ - "--lld", "iscsi", - "--op", "delete", - "--mode", "conn", - "--tid", strconv.Itoa(tid), - "--sid", sid, - "--cid", cid, - } - _, err := lhexec.NewExecutor().Execute(nil, tgtBinary, opts, lhtypes.ExecuteDefaultTimeout) - return err -} - -func FindNextAvailableTargetID() (int, error) { - existingTids := map[int]struct{}{} - opts := []string{ - "--lld", "iscsi", - "--op", "show", - "--mode", "target", - } - output, err := lhexec.NewExecutor().Execute(nil, tgtBinary, opts, lhtypes.ExecuteDefaultTimeout) - if err != nil { - return -1, err - } - /* Output will looks like: - Target 1: iqn.2016-08.com.example:a - System information: - ... - Target 2: iqn.2016-08.com.example:b - System information: - ... - */ - scanner := bufio.NewScanner(strings.NewReader(output)) - for scanner.Scan() { - if strings.HasPrefix(scanner.Text(), "Target ") { - tidString := strings.Fields(strings.Split(scanner.Text(), ":")[0])[1] - tid, err := strconv.Atoi(tidString) - if err != nil { - return -1, errors.Wrapf(err, "BUG: Failed to parse %s", tidString) - } - existingTids[tid] = struct{}{} - } - } - for i := 1; i < maxTargetID; i++ { - if _, exists := existingTids[i]; !exists { - return i, nil - } - } - return -1, fmt.Errorf("cannot find an available target ID") -} diff --git a/vendor/github.com/longhorn/go-iscsi-helper/iscsidev/iscsi.go b/vendor/github.com/longhorn/go-iscsi-helper/iscsidev/iscsi.go deleted file mode 100644 index f66431e9f..000000000 --- a/vendor/github.com/longhorn/go-iscsi-helper/iscsidev/iscsi.go +++ /dev/null @@ -1,379 +0,0 @@ -package iscsidev - -import ( - "fmt" - "strings" - "time" - - "github.com/pkg/errors" - "github.com/sirupsen/logrus" - - "github.com/longhorn/go-iscsi-helper/iscsi" - "github.com/longhorn/go-iscsi-helper/types" - "github.com/longhorn/go-iscsi-helper/util" - - lhns "github.com/longhorn/go-common-libs/ns" - lhtypes "github.com/longhorn/go-common-libs/types" -) - -var ( - LockFile = "/var/run/longhorn-iscsi.lock" - LockTimeout = 120 * time.Second - - TargetLunID = 1 - - RetryCounts = 5 - RetryIntervalSCSI = 3 * time.Second - RetryIntervalTargetID = 500 * time.Millisecond -) - -type ScsiDeviceParameters struct { - ScsiTimeout int64 -} - -type IscsiDeviceParameters struct { - IscsiAbortTimeout int64 -} - -type Device struct { - Target string - KernelDevice *lhtypes.BlockDeviceInfo - - ScsiDeviceParameters - IscsiDeviceParameters - - BackingFile string - BSType string - BSOpts string - - targetID int - - nsexec *lhns.Executor -} - -func NewDevice(name, backingFile, bsType, bsOpts string, scsiTimeout, iscsiAbortTimeout int64) (*Device, error) { - namespaces := []lhtypes.Namespace{lhtypes.NamespaceMnt, lhtypes.NamespaceNet} - nsexec, err := lhns.NewNamespaceExecutor(util.ISCSIdProcess, lhtypes.HostProcDirectory, namespaces) - if err != nil { - return nil, err - } - - dev := &Device{ - Target: GetTargetName(name), - ScsiDeviceParameters: ScsiDeviceParameters{ - ScsiTimeout: scsiTimeout, - }, - IscsiDeviceParameters: IscsiDeviceParameters{ - IscsiAbortTimeout: iscsiAbortTimeout, - }, - BackingFile: backingFile, - BSType: bsType, - BSOpts: bsOpts, - nsexec: nsexec, - } - return dev, nil -} - -func Volume2ISCSIName(name string) string { - return strings.Replace(name, "_", ":", -1) -} - -func GetTargetName(volumeName string) string { - return "iqn.2019-10.io.longhorn:" + Volume2ISCSIName(volumeName) -} - -func (dev *Device) ReloadTargetID() error { - tid, err := iscsi.GetTargetTid(dev.Target) - if err != nil { - return err - } - dev.targetID = tid - return nil -} - -func (dev *Device) CreateTarget() (err error) { - // Start tgtd daemon if it's not already running - if err := iscsi.StartDaemon(false); err != nil { - return err - } - - tid := 0 - for i := 0; i < RetryCounts; i++ { - if tid, err = iscsi.FindNextAvailableTargetID(); err != nil { - return err - } - logrus.Infof("go-iscsi-helper: found available target id %v", tid) - err = iscsi.CreateTarget(tid, dev.Target) - if err == nil { - dev.targetID = tid - break - } - logrus.Infof("go-iscsi-helper: failed to use target id %v, retrying with a new target ID: err %v", tid, err) - time.Sleep(RetryIntervalTargetID) - continue - } - if err != nil { - return err - } - - if err := iscsi.AddLun(dev.targetID, TargetLunID, dev.BackingFile, dev.BSType, dev.BSOpts); err != nil { - return err - } - // Cannot modify the parameters for the LUNs during the adding stage - if err := iscsi.SetLunThinProvisioning(dev.targetID, TargetLunID); err != nil { - return err - } - // Longhorn reads and writes data with direct io rather than buffer io, so - // the write cache is actually disabled in the implementation. - // Explicitly disable the write cache for meeting the SCSI specification. - if err := iscsi.DisableWriteCache(dev.targetID, TargetLunID); err != nil { - return err - } - if err := iscsi.BindInitiator(dev.targetID, "ALL"); err != nil { - return err - } - return nil -} - -func (dev *Device) StartInitator() error { - lock := lhns.NewLock(LockFile, LockTimeout) - if err := lock.Lock(); err != nil { - return errors.Wrap(err, "failed to lock") - } - defer lock.Unlock() - - if err := iscsi.CheckForInitiatorExistence(dev.nsexec); err != nil { - return err - } - - localIP, err := util.GetIPToHost() - if err != nil { - return err - } - - // Setup initiator - for i := 0; i < RetryCounts; i++ { - err := iscsi.DiscoverTarget(localIP, dev.Target, dev.nsexec) - if iscsi.IsTargetDiscovered(localIP, dev.Target, dev.nsexec) { - break - } - - logrus.WithError(err).Warnf("Failed to discover") - // This is a trick to recover from the case. Remove the - // empty entries in /etc/iscsi/nodes/. If one of the entry - // is empty it will triggered the issue. - if err := iscsi.CleanupScsiNodes(dev.Target); err != nil { - logrus.WithError(err).Warnf("Failed to clean up nodes for %v", dev.Target) - } else { - logrus.Warnf("Nodes cleaned up for %v", dev.Target) - } - - time.Sleep(RetryIntervalSCSI) - } - if err := iscsi.UpdateIscsiDeviceAbortTimeout(dev.Target, dev.IscsiAbortTimeout, dev.nsexec); err != nil { - return err - } - if err := iscsi.LoginTarget(localIP, dev.Target, dev.nsexec); err != nil { - return err - } - if dev.KernelDevice, err = iscsi.GetDevice(localIP, dev.Target, TargetLunID, dev.nsexec); err != nil { - return err - } - if err := iscsi.UpdateScsiDeviceTimeout(dev.KernelDevice.Name, dev.ScsiTimeout, dev.nsexec); err != nil { - return err - } - - return nil -} - -// ReloadInitiator does nothing for the iSCSI initiator/target except for -// updating the timeout. It is mainly responsible for initializing the struct -// field `dev.KernelDevice`. -func (dev *Device) ReloadInitiator() error { - lock := lhns.NewLock(LockFile, LockTimeout) - if err := lock.Lock(); err != nil { - return errors.Wrap(err, "failed to lock") - } - defer lock.Unlock() - - if err := iscsi.CheckForInitiatorExistence(dev.nsexec); err != nil { - return err - } - - localIP, err := util.GetIPToHost() - if err != nil { - return err - } - - if err := iscsi.DiscoverTarget(localIP, dev.Target, dev.nsexec); err != nil { - return err - } - - if !iscsi.IsTargetDiscovered(localIP, dev.Target, dev.nsexec) { - return fmt.Errorf("failed to discover target %v for the initiator", dev.Target) - } - - if err := iscsi.UpdateIscsiDeviceAbortTimeout(dev.Target, dev.IscsiAbortTimeout, dev.nsexec); err != nil { - return err - } - if dev.KernelDevice, err = iscsi.GetDevice(localIP, dev.Target, TargetLunID, dev.nsexec); err != nil { - return err - } - - return iscsi.UpdateScsiDeviceTimeout(dev.KernelDevice.Name, dev.ScsiTimeout, dev.nsexec) -} - -func (dev *Device) StopInitiator() error { - lock := lhns.NewLock(LockFile, LockTimeout) - if err := lock.Lock(); err != nil { - return errors.Wrap(err, "failed to lock") - } - defer lock.Unlock() - - if err := LogoutTarget(dev.Target, dev.nsexec); err != nil { - return errors.Wrapf(err, "failed to logout target") - } - return nil -} - -func (dev *Device) RefreshInitiator() error { - lock := lhns.NewLock(LockFile, LockTimeout) - if err := lock.Lock(); err != nil { - return errors.Wrap(err, "failed to lock") - } - defer lock.Unlock() - - if err := iscsi.CheckForInitiatorExistence(dev.nsexec); err != nil { - return err - } - - ip, err := util.GetIPToHost() - if err != nil { - return err - } - - return iscsi.RescanTarget(ip, dev.Target, dev.nsexec) -} - -func LogoutTarget(target string, nsexec *lhns.Executor) error { - if err := iscsi.CheckForInitiatorExistence(nsexec); err != nil { - return err - } - if iscsi.IsTargetLoggedIn("", target, nsexec) { - var err error - loggingOut := false - - logrus.Infof("Shutting down iSCSI device for target %v", target) - for i := 0; i < RetryCounts; i++ { - // New IP may be different from the IP in the previous record. - // https://github.com/longhorn/longhorn/issues/1920 - err = iscsi.LogoutTarget("", target, nsexec) - // Ignore Not Found error - if err == nil || strings.Contains(err.Error(), "exit status 21") { - err = nil - break - } - // The timeout for response may return in the future, - // check session to know if it's logged out or not - if strings.Contains(err.Error(), "Timeout executing: ") { - loggingOut = true - break - } - time.Sleep(RetryIntervalSCSI) - } - // Wait for device to logout - if loggingOut { - logrus.Infof("Logging out iSCSI device timeout, waiting for logout complete") - for i := 0; i < RetryCounts; i++ { - if !iscsi.IsTargetLoggedIn("", target, nsexec) { - err = nil - break - } - time.Sleep(RetryIntervalSCSI) - } - } - if err != nil { - return errors.Wrapf(err, "failed to logout target") - } - /* - * Immediately delete target after logout may result in error: - * - * "Could not execute operation on all records: encountered - * iSCSI database failure" in iscsiadm - * - * This happens especially there are other iscsiadm db - * operations go on at the same time. - * Retry to workaround this issue. Also treat "exit status - * 21"(no record found) as valid result - */ - for i := 0; i < RetryCounts; i++ { - if !iscsi.IsTargetDiscovered("", target, nsexec) { - err = nil - break - } - - err = iscsi.DeleteDiscoveredTarget("", target, nsexec) - // Ignore Not Found error - if err == nil || strings.Contains(err.Error(), "exit status 21") { - err = nil - break - } - time.Sleep(RetryIntervalSCSI) - } - if err != nil { - return err - } - } - return nil -} - -func (dev *Device) DeleteTarget() error { - if tid, err := iscsi.GetTargetTid(dev.Target); err == nil && tid != -1 { - if tid != dev.targetID && dev.targetID != 0 { - logrus.Errorf("BUG: Invalid TID %v found for %v, was %v", tid, dev.Target, dev.targetID) - } - - logrus.Infof("Shutting down iSCSI target %v", dev.Target) - - // UnbindInitiator can return tgtadmSuccess, tgtadmAclNoexist or tgtadmNoTarget - // Target is deleted in the last step, so tgtadmNoTarget error should not occur here. - // Just ignore tgtadmAclNoexist and continue working on the remaining tasks. - if err := iscsi.UnbindInitiator(tid, "ALL"); err != nil { - if !strings.Contains(err.Error(), types.TgtadmAclNoexist) { - return err - } - logrus.WithError(err).Warnf("failed to unbind initiator target id %v", tid) - } - - sessionConnectionsMap, err := iscsi.GetTargetConnections(tid) - if err != nil { - return err - } - for sid, cidList := range sessionConnectionsMap { - for _, cid := range cidList { - if err := iscsi.CloseConnection(tid, sid, cid); err != nil { - return err - } - } - } - - if err := iscsi.DeleteLun(tid, TargetLunID); err != nil { - return err - } - - if err := iscsi.DeleteTarget(tid); err != nil { - return err - } - } - return nil -} - -func (dev *Device) UpdateScsiBackingStore(bsType, bsOpts string) error { - dev.BSType = bsType - dev.BSOpts = bsOpts - return nil -} - -func (dev *Device) ExpandTarget(size int64) error { - return iscsi.ExpandLun(dev.targetID, TargetLunID, size) -} diff --git a/vendor/github.com/longhorn/go-iscsi-helper/longhorndev/dev.go b/vendor/github.com/longhorn/go-iscsi-helper/longhorndev/dev.go deleted file mode 100644 index 178073821..000000000 --- a/vendor/github.com/longhorn/go-iscsi-helper/longhorndev/dev.go +++ /dev/null @@ -1,462 +0,0 @@ -package longhorndev - -import ( - "fmt" - "os" - "os/exec" - "path/filepath" - "sync" - "time" - - "github.com/pkg/errors" - "github.com/sirupsen/logrus" - - "github.com/longhorn/go-iscsi-helper/iscsidev" - "github.com/longhorn/go-iscsi-helper/types" - "github.com/longhorn/go-iscsi-helper/util" -) - -const ( - SocketDirectory = "/var/run" - DevPath = "/dev/longhorn/" - - WaitInterval = time.Second - WaitCount = 30 -) - -type LonghornDevice struct { - *sync.RWMutex - name string //VolumeName - size int64 - frontend string - endpoint string - scsiTimeout int64 - iscsiAbortTimeout int64 - iscsiTargetRequestTimeout int64 - - scsiDevice *iscsidev.Device -} - -type DeviceService interface { - GetFrontend() string - SetFrontend(frontend string) error - UnsetFrontendCheck() error - UnsetFrontend() - GetEndpoint() string - Enabled() bool - - InitDevice() error - Start() error - Shutdown() error - PrepareUpgrade() error - FinishUpgrade() error - Expand(size int64) error -} - -type DeviceCreator interface { - NewDevice(name string, size int64, frontend string) (DeviceService, error) -} - -type LonghornDeviceCreator struct{} - -func (ldc *LonghornDeviceCreator) NewDevice(name string, size int64, frontend string, scsiTimeout, iscsiAbortTimeout, iscsiTargetRequestTimeout int64) (DeviceService, error) { - if name == "" || size == 0 { - return nil, fmt.Errorf("invalid parameter for creating Longhorn device") - } - dev := &LonghornDevice{ - RWMutex: &sync.RWMutex{}, - name: name, - size: size, - scsiTimeout: scsiTimeout, - iscsiAbortTimeout: iscsiAbortTimeout, - iscsiTargetRequestTimeout: iscsiTargetRequestTimeout, - } - if err := dev.SetFrontend(frontend); err != nil { - return nil, err - } - return dev, nil -} - -func (d *LonghornDevice) InitDevice() error { - d.Lock() - defer d.Unlock() - - if d.scsiDevice != nil { - return nil - } - - if err := d.initScsiDevice(); err != nil { - return err - } - - // Try to cleanup possible leftovers. - return d.shutdownFrontend() -} - -// call with lock hold -func (d *LonghornDevice) initScsiDevice() error { - bsOpts := fmt.Sprintf("size=%v;request_timeout=%v", d.size, d.iscsiTargetRequestTimeout) - scsiDev, err := iscsidev.NewDevice(d.name, d.GetSocketPath(), "longhorn", bsOpts, d.scsiTimeout, d.iscsiAbortTimeout) - if err != nil { - return err - } - d.scsiDevice = scsiDev - - return nil -} - -func (d *LonghornDevice) Start() error { - stopCh := make(chan struct{}) - if err := <-d.WaitForSocket(stopCh); err != nil { - return err - } - - return d.startScsiDevice(true) -} - -func (d *LonghornDevice) startScsiDevice(startScsiDevice bool) (err error) { - d.Lock() - defer d.Unlock() - - switch d.frontend { - case types.FrontendTGTBlockDev: - // If iSCSI device is not started here, e.g., device upgrade, - // d.scsiDevice.KernelDevice is nil. - if startScsiDevice { - if d.scsiDevice == nil { - return fmt.Errorf("there is no iSCSI device during the frontend %v starts", d.frontend) - } - if err := d.scsiDevice.CreateTarget(); err != nil { - return err - } - if err := d.scsiDevice.StartInitator(); err != nil { - return err - } - if err := d.createDev(); err != nil { - return err - } - logrus.Infof("device %v: iSCSI device %s created", d.name, d.scsiDevice.KernelDevice.Name) - } else { - if err := d.scsiDevice.ReloadTargetID(); err != nil { - return err - } - if err := d.scsiDevice.ReloadInitiator(); err != nil { - return err - } - logrus.Infof("device %v: iSCSI device %s reloaded the target and the initiator", d.name, d.scsiDevice.KernelDevice.Name) - } - - d.endpoint = d.getDev() - - case types.FrontendTGTISCSI: - if startScsiDevice { - if d.scsiDevice == nil { - return fmt.Errorf("there is no iSCSI device during the frontend %v starts", d.frontend) - } - if err := d.scsiDevice.CreateTarget(); err != nil { - return err - } - logrus.Infof("device %v: iSCSI target %s created", d.name, d.scsiDevice.Target) - } else { - if err := d.scsiDevice.ReloadTargetID(); err != nil { - return err - } - logrus.Infof("device %v: iSCSI target %s reloaded the target ID", d.name, d.scsiDevice.Target) - } - - d.endpoint = d.scsiDevice.Target - - default: - return fmt.Errorf("unknown frontend %v", d.frontend) - } - - logrus.Debugf("device %v: frontend start succeed", d.name) - return nil -} - -func (d *LonghornDevice) Shutdown() error { - d.Lock() - defer d.Unlock() - - if d.scsiDevice == nil { - return nil - } - - if err := d.shutdownFrontend(); err != nil { - return err - } - - d.scsiDevice = nil - d.endpoint = "" - - return nil -} - -// call with lock hold -func (d *LonghornDevice) shutdownFrontend() error { - switch d.frontend { - case types.FrontendTGTBlockDev: - dev := d.getDev() - if err := util.RemoveDevice(dev); err != nil { - return errors.Wrapf(err, "device %v: failed to remove device %s", d.name, dev) - } - if err := d.scsiDevice.StopInitiator(); err != nil { - return errors.Wrapf(err, "device %v: failed to stop iSCSI device", d.name) - } - if err := d.scsiDevice.DeleteTarget(); err != nil { - return errors.Wrapf(err, "device %v: failed to delete target %v", d.name, d.scsiDevice.Target) - } - logrus.Infof("device %v: iSCSI device %v shutdown", d.name, dev) - case types.FrontendTGTISCSI: - if err := d.scsiDevice.DeleteTarget(); err != nil { - return errors.Wrapf(err, "device %v: failed to delete target %v", d.name, d.scsiDevice.Target) - } - logrus.Infof("device %v: iSCSI target %v ", d.name, d.scsiDevice.Target) - case "": - logrus.Infof("device %v: skip shutdown frontend since it's not enabled", d.name) - default: - return fmt.Errorf("device %v: unknown frontend %v", d.name, d.frontend) - } - - return nil -} - -func (d *LonghornDevice) WaitForSocket(stopCh chan struct{}) chan error { - errCh := make(chan error) - go func(errCh chan error, stopCh chan struct{}) { - socket := d.GetSocketPath() - timeout := time.After(time.Duration(WaitCount) * WaitInterval) - ticker := time.NewTicker(WaitInterval) - defer ticker.Stop() - tick := ticker.C - for { - select { - case <-timeout: - errCh <- fmt.Errorf("device %v: wait for socket %v timed out", d.name, socket) - case <-tick: - if _, err := os.Stat(socket); err == nil { - errCh <- nil - return - } - logrus.Infof("device %v: waiting for socket %v to show up", d.name, socket) - case <-stopCh: - logrus.Infof("device %v: stop wait for socket routine", d.name) - return - } - } - }(errCh, stopCh) - - return errCh -} - -func (d *LonghornDevice) GetSocketPath() string { - return filepath.Join(SocketDirectory, "longhorn-"+d.name+".sock") -} - -// call with lock hold -func (d *LonghornDevice) getDev() string { - return filepath.Join(DevPath, d.name) -} - -// call with lock hold -func (d *LonghornDevice) createDev() error { - if _, err := os.Stat(DevPath); os.IsNotExist(err) { - if err := os.MkdirAll(DevPath, 0755); err != nil { - logrus.Fatalf("device %v: cannot create directory %v", d.name, DevPath) - } - } - - dev := d.getDev() - if _, err := os.Stat(dev); err == nil { - logrus.Warnf("Device %s already exists, clean it up", dev) - if err := util.RemoveDevice(dev); err != nil { - return errors.Wrapf(err, "cannot clean up block device file %v", dev) - } - } - - if err := util.DuplicateDevice(d.scsiDevice.KernelDevice, dev); err != nil { - return err - } - - logrus.Debugf("device %v: Device %s is ready", d.name, dev) - - return nil -} - -func (d *LonghornDevice) PrepareUpgrade() error { - if d.frontend == "" { - return nil - } - - if err := util.RemoveFile(d.GetSocketPath()); err != nil { - return errors.Wrapf(err, "failed to remove socket %v", d.GetSocketPath()) - } - return nil -} - -func (d *LonghornDevice) FinishUpgrade() (err error) { - if d.frontend == "" { - return nil - } - - stopCh := make(chan struct{}) - socketError := d.WaitForSocket(stopCh) - err = <-socketError - if err != nil { - err = errors.Wrap(err, "error waiting for the socket") - logrus.Error(err) - } - - close(stopCh) - close(socketError) - - if err != nil { - return err - } - - // TODO: Need to fix `ReloadSocketConnection` since it doesn't work for frontend `FrontendTGTISCSI`. - if err := d.ReloadSocketConnection(); err != nil { - return err - } - - d.Lock() - if err := d.initScsiDevice(); err != nil { - d.Unlock() - return err - } - d.Unlock() - - return d.startScsiDevice(false) -} - -func (d *LonghornDevice) ReloadSocketConnection() error { - d.RLock() - dev := d.getDev() - d.RUnlock() - - cmd := exec.Command("sg_raw", dev, "a6", "00", "00", "00", "00", "00") - if err := cmd.Run(); err != nil { - return errors.Wrapf(err, "failed to reload socket connection at %v", dev) - } - logrus.Infof("Reloaded completed for device %v", dev) - return nil -} - -func (d *LonghornDevice) SetFrontend(frontend string) error { - if frontend != types.FrontendTGTBlockDev && frontend != types.FrontendTGTISCSI && frontend != "" { - return fmt.Errorf("invalid frontend %v", frontend) - } - - d.Lock() - defer d.Unlock() - if d.frontend != "" { - if d.frontend != frontend { - return fmt.Errorf("engine frontend %v is already up and cannot be set to %v", d.frontend, frontend) - } - if d.scsiDevice != nil { - logrus.Infof("Engine frontend %v is already up", frontend) - return nil - } - // d.scsiDevice == nil - return fmt.Errorf("engine frontend had been set to %v, but its frontend cannot be started before engine manager shutdown its frontend", frontend) - } - - if d.scsiDevice != nil { - return fmt.Errorf("BUG: engine launcher frontend is empty but scsi device hasn't been cleanup in frontend start") - } - - d.frontend = frontend - - return nil -} - -func (d *LonghornDevice) UnsetFrontendCheck() error { - d.Lock() - defer d.Unlock() - - if d.scsiDevice == nil { - d.frontend = "" - logrus.Debugf("Engine frontend is already down") - return nil - } - - if d.frontend == "" { - return fmt.Errorf("BUG: engine launcher frontend is empty but scsi device hasn't been cleanup in frontend shutdown") - } - return nil -} - -func (d *LonghornDevice) UnsetFrontend() { - d.Lock() - defer d.Unlock() - - d.frontend = "" -} - -func (d *LonghornDevice) Enabled() bool { - d.RLock() - defer d.RUnlock() - return d.scsiDevice != nil -} - -func (d *LonghornDevice) GetEndpoint() string { - d.RLock() - defer d.RUnlock() - return d.endpoint -} - -func (d *LonghornDevice) GetFrontend() string { - d.RLock() - defer d.RUnlock() - return d.frontend -} - -func (d *LonghornDevice) Expand(size int64) (err error) { - d.Lock() - defer d.Unlock() - - if d.size > size { - return fmt.Errorf("device %v: cannot expand the device from size %v to a smaller size %v", d.name, d.size, size) - } else if d.size == size { - return nil - } - - defer func() { - if err == nil { - d.size = size - } - }() - - if d.scsiDevice == nil { - logrus.Info("Device: No need to do anything for the expansion since the frontend is shutdown") - return nil - } - if err := d.scsiDevice.UpdateScsiBackingStore("longhorn", fmt.Sprintf("size=%v", size)); err != nil { - return err - } - - switch d.frontend { - case types.FrontendTGTBlockDev: - logrus.Infof("Device %v: Expanding frontend %v target %v", d.name, d.frontend, d.scsiDevice.Target) - if err := d.scsiDevice.ExpandTarget(size); err != nil { - return fmt.Errorf("device %v: fail to expand target %v: %v", d.name, d.scsiDevice.Target, err) - } - logrus.Infof("Device %v: Refreshing/Rescanning frontend %v initiator for the expansion", d.name, d.frontend) - if err := d.scsiDevice.RefreshInitiator(); err != nil { - return fmt.Errorf("device %v: fail to refresh iSCSI initiator: %v", d.name, err) - } - logrus.Infof("Device %v: Expanded frontend %v size to %d", d.name, d.frontend, size) - case types.FrontendTGTISCSI: - logrus.Infof("Device %v: Frontend is expanding the target %v", d.name, d.scsiDevice.Target) - if err := d.scsiDevice.ExpandTarget(size); err != nil { - return fmt.Errorf("device %v: fail to expand target %v: %v", d.name, d.scsiDevice.Target, err) - } - logrus.Infof("Device %v: Expanded frontend %v size to %d, users need to refresh/rescan the initiator by themselves", d.name, d.frontend, size) - case "": - logrus.Infof("Device %v: skip expansion since the frontend not enabled", d.name) - default: - return fmt.Errorf("failed to expand device %v: unknown frontend %v", d.name, d.frontend) - } - - return nil -} diff --git a/vendor/github.com/longhorn/go-iscsi-helper/types/tgtadm_errors.go b/vendor/github.com/longhorn/go-iscsi-helper/types/tgtadm_errors.go deleted file mode 100644 index 1b7215c12..000000000 --- a/vendor/github.com/longhorn/go-iscsi-helper/types/tgtadm_errors.go +++ /dev/null @@ -1,30 +0,0 @@ -package types - -// errors are from tgt/usr/tgtadm_error.h and tgt/usr/tgtadm.c -const ( - TgtadmSuccess = "success" - TgtadmUnknown = "unknown error" - TgtadmNomem = "out of memory" - TgtadmNoDriver = "can't find the driver" - TgtadmNoTarget = "can't find the target" - TgtadmNoLun = "can't find the logical unit" - TgtadmNoSession = "can't find the session" - TgtadmNoConnection = "can't find the connection" - TgtadmNoBinding = "can't find the binding" - TgtadmTargetExist = "this target already exists" - TgtadmBindingExist = "this binding already exists" - TgtadmLunExist = "this logical unit number already exists" - TgtadmAclExist = "this access control rule already exists" - TgtadmAclNoexist = "this access control rule does not exist" - TgtadmUserExist = "this account already exists" - TgtadmNoUser = "can't find the account" - TgtadmTooManyUser = "too many accounts" - TgtadmInvalidRequest = "invalid request" - TgtadmOutAccountExist = "this target already has an outgoing account" - TgtadmTargetActive = "this target is still active" - TgtadmLunActive = "this logical unit is still active" - TgtadmDriverActive = "this driver is busy" - TgtadmUnsupportedOperation = "this operation isn't supported" - TgtadmUnknownParam = "unknown parameter" - TgtadmPreventRemoval = "this device has Prevent Removal set" -) diff --git a/vendor/github.com/longhorn/go-iscsi-helper/types/types.go b/vendor/github.com/longhorn/go-iscsi-helper/types/types.go deleted file mode 100644 index d85a3c436..000000000 --- a/vendor/github.com/longhorn/go-iscsi-helper/types/types.go +++ /dev/null @@ -1,6 +0,0 @@ -package types - -const ( - FrontendTGTBlockDev = "tgt-blockdev" - FrontendTGTISCSI = "tgt-iscsi" -) diff --git a/vendor/github.com/longhorn/go-iscsi-helper/util/process.go b/vendor/github.com/longhorn/go-iscsi-helper/util/process.go deleted file mode 100644 index 54412f519..000000000 --- a/vendor/github.com/longhorn/go-iscsi-helper/util/process.go +++ /dev/null @@ -1,18 +0,0 @@ -package util - -import ( - "fmt" - - lhproc "github.com/longhorn/go-common-libs/proc" -) - -const ISCSIdProcess = "iscsid" - -func GetISCSIdNamespaceDirectory(procDir string) (string, error) { - pids, err := lhproc.GetProcessPIDs(ISCSIdProcess, procDir) - if err != nil { - return "", err - } - - return lhproc.GetNamespaceDirectory(procDir, fmt.Sprint(pids[0])), nil -} diff --git a/vendor/github.com/longhorn/go-iscsi-helper/util/util.go b/vendor/github.com/longhorn/go-iscsi-helper/util/util.go deleted file mode 100644 index a51a2b707..000000000 --- a/vendor/github.com/longhorn/go-iscsi-helper/util/util.go +++ /dev/null @@ -1,121 +0,0 @@ -package util - -import ( - "fmt" - "net" - "os" - - "strings" - "time" - - "github.com/pkg/errors" - "github.com/sirupsen/logrus" - "golang.org/x/sys/unix" - - lhtypes "github.com/longhorn/go-common-libs/types" -) - -func getIPFromAddrs(addrs []net.Addr) string { - for _, addr := range addrs { - if ip, ok := addr.(*net.IPNet); ok && ip.IP.IsGlobalUnicast() { - return strings.Split(ip.IP.String(), "/")[0] - } - } - return "" -} - -func GetIPToHost() (string, error) { - ifaces, err := net.Interfaces() - if err != nil { - return "", err - } - // TODO: This is a workaround, we want to get the interface IP connect - // to the host, it's likely eth1 with one network attached to the host. - for _, iface := range ifaces { - if iface.Name == "eth1" { - addrs, err := iface.Addrs() - if err != nil { - return "", err - } - ip := getIPFromAddrs(addrs) - if ip != "" { - return ip, nil - } - } - } - // And there is no eth1, so get the first real ip - addrs, err := net.InterfaceAddrs() - if err != nil { - return "", err - } - ip := getIPFromAddrs(addrs) - if ip != "" { - return ip, nil - } - return "", fmt.Errorf("cannot find IP connect to the host") -} - -func RemoveFile(file string) error { - if _, err := os.Stat(file); os.IsNotExist(err) { - // file doesn't exist - return nil - } - - if err := remove(file); err != nil { - return errors.Wrapf(err, "failed to remove file %v", file) - } - - return nil -} - -func RemoveDevice(dev string) error { - if _, err := os.Stat(dev); err == nil { - if err := remove(dev); err != nil { - return errors.Wrapf(err, "failed to removing device %s", dev) - } - } - return nil -} - -func DuplicateDevice(dev *lhtypes.BlockDeviceInfo, dest string) error { - if err := mknod(dest, dev.Major, dev.Minor); err != nil { - return errors.Wrapf(err, "cannot create device node %s for device %s", dest, dev.Name) - } - if err := os.Chmod(dest, 0660); err != nil { - return errors.Wrapf(err, "cannot change permission of the device %s", dest) - } - // We use the group 6 by default because this is common group for disks - // See more at https://github.com/longhorn/longhorn/issues/8088#issuecomment-1982300242 - if err := os.Chown(dest, 0, 6); err != nil { - return errors.Wrapf(err, "cannot change ownership of the device %s", dest) - } - return nil -} - -func mknod(device string, major, minor int) error { - var fileMode os.FileMode = 0660 - fileMode |= unix.S_IFBLK - dev := int(unix.Mkdev(uint32(major), uint32(minor))) - - logrus.Infof("Creating device %s %d:%d", device, major, minor) - return unix.Mknod(device, uint32(fileMode), dev) -} - -func removeAsync(path string, done chan<- error) { - if err := os.Remove(path); err != nil && !os.IsNotExist(err) { - logrus.Errorf("Unable to remove: %v", path) - done <- err - } - done <- nil -} - -func remove(path string) error { - done := make(chan error) - go removeAsync(path, done) - select { - case err := <-done: - return err - case <-time.After(30 * time.Second): - return fmt.Errorf("timeout trying to delete %s", path) - } -} diff --git a/vendor/github.com/longhorn/longhorn-engine/pkg/controller/client/controller_client.go b/vendor/github.com/longhorn/longhorn-engine/pkg/controller/client/controller_client.go index 883fc2972..ff7541234 100644 --- a/vendor/github.com/longhorn/longhorn-engine/pkg/controller/client/controller_client.go +++ b/vendor/github.com/longhorn/longhorn-engine/pkg/controller/client/controller_client.go @@ -4,23 +4,21 @@ import ( "fmt" "time" - "github.com/longhorn/types/pkg/generated/enginerpc" + "github.com/golang/protobuf/ptypes/empty" "github.com/pkg/errors" "golang.org/x/net/context" "google.golang.org/grpc" - "google.golang.org/grpc/credentials/insecure" healthpb "google.golang.org/grpc/health/grpc_health_v1" - "google.golang.org/protobuf/types/known/emptypb" - "github.com/longhorn/longhorn-engine/pkg/interceptor" "github.com/longhorn/longhorn-engine/pkg/meta" "github.com/longhorn/longhorn-engine/pkg/types" "github.com/longhorn/longhorn-engine/pkg/util" + "github.com/longhorn/longhorn-engine/proto/ptypes" ) type ControllerServiceContext struct { cc *grpc.ClientConn - service enginerpc.ControllerServiceClient + service ptypes.ControllerServiceClient } func (c ControllerServiceContext) Close() error { @@ -36,7 +34,7 @@ type ControllerClient struct { ControllerServiceContext } -func (c *ControllerClient) getControllerServiceClient() enginerpc.ControllerServiceClient { +func (c *ControllerClient) getControllerServiceClient() ptypes.ControllerServiceClient { return c.service } @@ -46,15 +44,15 @@ const ( func NewControllerClient(address, volumeName, instanceName string) (*ControllerClient, error) { getControllerServiceContext := func(serviceUrl string) (ControllerServiceContext, error) { - connection, err := grpc.NewClient(serviceUrl, grpc.WithTransportCredentials(insecure.NewCredentials()), - interceptor.WithIdentityValidationClientInterceptor(volumeName, instanceName)) + connection, err := grpc.Dial(serviceUrl, grpc.WithInsecure(), + ptypes.WithIdentityValidationClientInterceptor(volumeName, instanceName)) if err != nil { return ControllerServiceContext{}, errors.Wrapf(err, "cannot connect to ControllerService %v", serviceUrl) } return ControllerServiceContext{ cc: connection, - service: enginerpc.NewControllerServiceClient(connection), + service: ptypes.NewControllerServiceClient(connection), }, nil } @@ -71,7 +69,7 @@ func NewControllerClient(address, volumeName, instanceName string) (*ControllerC }, nil } -func GetVolumeInfo(v *enginerpc.Volume) *types.VolumeInfo { +func GetVolumeInfo(v *ptypes.Volume) *types.VolumeInfo { return &types.VolumeInfo{ Name: v.Name, Size: v.Size, @@ -83,28 +81,26 @@ func GetVolumeInfo(v *enginerpc.Volume) *types.VolumeInfo { LastExpansionError: v.LastExpansionError, LastExpansionFailedAt: v.LastExpansionFailedAt, UnmapMarkSnapChainRemoved: v.UnmapMarkSnapChainRemoved, - SnapshotMaxCount: int(v.SnapshotMaxCount), - SnapshotMaxSize: v.SnapshotMaxSize, } } -func GetControllerReplicaInfo(cr *enginerpc.ControllerReplica) *types.ControllerReplicaInfo { +func GetControllerReplicaInfo(cr *ptypes.ControllerReplica) *types.ControllerReplicaInfo { return &types.ControllerReplicaInfo{ Address: cr.Address.Address, Mode: types.Mode(cr.Mode.String()), } } -func GetControllerReplica(r *types.ControllerReplicaInfo) *enginerpc.ControllerReplica { - return &enginerpc.ControllerReplica{ - Address: &enginerpc.ReplicaAddress{ +func GetControllerReplica(r *types.ControllerReplicaInfo) *ptypes.ControllerReplica { + return &ptypes.ControllerReplica{ + Address: &ptypes.ReplicaAddress{ Address: r.Address, }, - Mode: types.ReplicaModeToGRPCReplicaMode(r.Mode), + Mode: ptypes.ReplicaModeToGRPCReplicaMode(r.Mode), } } -func GetSyncFileInfoList(list []*enginerpc.SyncFileInfo) []types.SyncFileInfo { +func GetSyncFileInfoList(list []*ptypes.SyncFileInfo) []types.SyncFileInfo { res := []types.SyncFileInfo{} for _, info := range list { res = append(res, GetSyncFileInfo(info)) @@ -112,7 +108,7 @@ func GetSyncFileInfoList(list []*enginerpc.SyncFileInfo) []types.SyncFileInfo { return res } -func GetSyncFileInfo(info *enginerpc.SyncFileInfo) types.SyncFileInfo { +func GetSyncFileInfo(info *ptypes.SyncFileInfo) types.SyncFileInfo { return types.SyncFileInfo{ FromFileName: info.FromFileName, ToFileName: info.ToFileName, @@ -125,7 +121,7 @@ func (c *ControllerClient) VolumeGet() (*types.VolumeInfo, error) { ctx, cancel := context.WithTimeout(context.Background(), GRPCServiceTimeout) defer cancel() - volume, err := controllerServiceClient.VolumeGet(ctx, &emptypb.Empty{}) + volume, err := controllerServiceClient.VolumeGet(ctx, &empty.Empty{}) if err != nil { return nil, errors.Wrapf(err, "failed to get volume %v", c.serviceURL) } @@ -138,7 +134,7 @@ func (c *ControllerClient) VolumeStart(size, currentSize int64, replicas ...stri ctx, cancel := context.WithTimeout(context.Background(), GRPCServiceTimeout) defer cancel() - if _, err := controllerServiceClient.VolumeStart(ctx, &enginerpc.VolumeStartRequest{ + if _, err := controllerServiceClient.VolumeStart(ctx, &ptypes.VolumeStartRequest{ ReplicaAddresses: replicas, Size: size, CurrentSize: currentSize, @@ -149,15 +145,14 @@ func (c *ControllerClient) VolumeStart(size, currentSize int64, replicas ...stri return nil } -func (c *ControllerClient) VolumeSnapshot(name string, labels map[string]string, freezeFilesystem bool) (string, error) { +func (c *ControllerClient) VolumeSnapshot(name string, labels map[string]string) (string, error) { controllerServiceClient := c.getControllerServiceClient() ctx, cancel := context.WithTimeout(context.Background(), GRPCServiceTimeout) defer cancel() - reply, err := controllerServiceClient.VolumeSnapshot(ctx, &enginerpc.VolumeSnapshotRequest{ - Name: name, - Labels: labels, - FreezeFilesystem: freezeFilesystem, + reply, err := controllerServiceClient.VolumeSnapshot(ctx, &ptypes.VolumeSnapshotRequest{ + Name: name, + Labels: labels, }) if err != nil { return "", errors.Wrapf(err, "failed to create snapshot %v for volume %v", name, c.serviceURL) @@ -171,7 +166,7 @@ func (c *ControllerClient) VolumeRevert(snapshot string) error { ctx, cancel := context.WithTimeout(context.Background(), GRPCServiceTimeout) defer cancel() - if _, err := controllerServiceClient.VolumeRevert(ctx, &enginerpc.VolumeRevertRequest{ + if _, err := controllerServiceClient.VolumeRevert(ctx, &ptypes.VolumeRevertRequest{ Name: snapshot, }); err != nil { return errors.Wrapf(err, "failed to revert to snapshot %v for volume %v", snapshot, c.serviceURL) @@ -185,7 +180,7 @@ func (c *ControllerClient) VolumeExpand(size int64) error { ctx, cancel := context.WithTimeout(context.Background(), GRPCServiceTimeout) defer cancel() - if _, err := controllerServiceClient.VolumeExpand(ctx, &enginerpc.VolumeExpandRequest{ + if _, err := controllerServiceClient.VolumeExpand(ctx, &ptypes.VolumeExpandRequest{ Size: size, }); err != nil { return errors.Wrapf(err, "failed to expand to size %v for volume %v", size, c.serviceURL) @@ -199,7 +194,7 @@ func (c *ControllerClient) VolumeFrontendStart(frontend string) error { ctx, cancel := context.WithTimeout(context.Background(), GRPCServiceTimeout) defer cancel() - if _, err := controllerServiceClient.VolumeFrontendStart(ctx, &enginerpc.VolumeFrontendStartRequest{ + if _, err := controllerServiceClient.VolumeFrontendStart(ctx, &ptypes.VolumeFrontendStartRequest{ Frontend: frontend, }); err != nil { return errors.Wrapf(err, "failed to start frontend %v for volume %v", frontend, c.serviceURL) @@ -213,7 +208,7 @@ func (c *ControllerClient) VolumeFrontendShutdown() error { ctx, cancel := context.WithTimeout(context.Background(), GRPCServiceTimeout) defer cancel() - if _, err := controllerServiceClient.VolumeFrontendShutdown(ctx, &emptypb.Empty{}); err != nil { + if _, err := controllerServiceClient.VolumeFrontendShutdown(ctx, &empty.Empty{}); err != nil { return errors.Wrapf(err, "failed to shutdown frontend for volume %v", c.serviceURL) } @@ -225,7 +220,7 @@ func (c *ControllerClient) VolumeUnmapMarkSnapChainRemovedSet(enabled bool) erro ctx, cancel := context.WithTimeout(context.Background(), GRPCServiceTimeout) defer cancel() - if _, err := controllerServiceClient.VolumeUnmapMarkSnapChainRemovedSet(ctx, &enginerpc.VolumeUnmapMarkSnapChainRemovedSetRequest{ + if _, err := controllerServiceClient.VolumeUnmapMarkSnapChainRemovedSet(ctx, &ptypes.VolumeUnmapMarkSnapChainRemovedSetRequest{ Enabled: enabled, }); err != nil { return errors.Wrapf(err, "failed to set UnmapMarkSnapChainRemoved to %v for volume %v", enabled, c.serviceURL) @@ -234,40 +229,12 @@ func (c *ControllerClient) VolumeUnmapMarkSnapChainRemovedSet(enabled bool) erro return nil } -func (c *ControllerClient) VolumeSnapshotMaxCountSet(count int) error { - controllerServiceClient := c.getControllerServiceClient() - ctx, cancel := context.WithTimeout(context.Background(), GRPCServiceTimeout) - defer cancel() - - if _, err := controllerServiceClient.VolumeSnapshotMaxCountSet(ctx, &enginerpc.VolumeSnapshotMaxCountSetRequest{ - Count: int32(count), - }); err != nil { - return errors.Wrapf(err, "failed to set SnapshotMaxCount to %d for volume %s", count, c.serviceURL) - } - - return nil -} - -func (c *ControllerClient) VolumeSnapshotMaxSizeSet(size int64) error { - controllerServiceClient := c.getControllerServiceClient() - ctx, cancel := context.WithTimeout(context.Background(), GRPCServiceTimeout) - defer cancel() - - if _, err := controllerServiceClient.VolumeSnapshotMaxSizeSet(ctx, &enginerpc.VolumeSnapshotMaxSizeSetRequest{ - Size: size, - }); err != nil { - return errors.Wrapf(err, "failed to set SnapshotMaxSize to %d for volume %s", size, c.serviceURL) - } - - return nil -} - func (c *ControllerClient) ReplicaList() ([]*types.ControllerReplicaInfo, error) { controllerServiceClient := c.getControllerServiceClient() ctx, cancel := context.WithTimeout(context.Background(), GRPCServiceTimeout) defer cancel() - reply, err := controllerServiceClient.ReplicaList(ctx, &emptypb.Empty{}) + reply, err := controllerServiceClient.ReplicaList(ctx, &empty.Empty{}) if err != nil { return nil, errors.Wrapf(err, "failed to list replicas for volume %v", c.serviceURL) } @@ -285,7 +252,7 @@ func (c *ControllerClient) ReplicaGet(address string) (*types.ControllerReplicaI ctx, cancel := context.WithTimeout(context.Background(), GRPCServiceTimeout) defer cancel() - cr, err := controllerServiceClient.ReplicaGet(ctx, &enginerpc.ReplicaAddress{ + cr, err := controllerServiceClient.ReplicaGet(ctx, &ptypes.ReplicaAddress{ Address: address, }) if err != nil { @@ -300,10 +267,10 @@ func (c *ControllerClient) ReplicaCreate(address string, snapshotRequired bool, ctx, cancel := context.WithTimeout(context.Background(), GRPCServiceTimeout) defer cancel() - cr, err := controllerServiceClient.ControllerReplicaCreate(ctx, &enginerpc.ControllerReplicaCreateRequest{ + cr, err := controllerServiceClient.ControllerReplicaCreate(ctx, &ptypes.ControllerReplicaCreateRequest{ Address: address, SnapshotRequired: snapshotRequired, - Mode: types.ReplicaModeToGRPCReplicaMode(mode), + Mode: ptypes.ReplicaModeToGRPCReplicaMode(mode), }) if err != nil { return nil, errors.Wrapf(err, "failed to create replica %v for volume %v", address, c.serviceURL) @@ -317,7 +284,7 @@ func (c *ControllerClient) ReplicaDelete(address string) error { ctx, cancel := context.WithTimeout(context.Background(), GRPCServiceTimeout) defer cancel() - if _, err := controllerServiceClient.ReplicaDelete(ctx, &enginerpc.ReplicaAddress{ + if _, err := controllerServiceClient.ReplicaDelete(ctx, &ptypes.ReplicaAddress{ Address: address, }); err != nil { return errors.Wrapf(err, "failed to delete replica %v for volume %v", address, c.serviceURL) @@ -347,7 +314,7 @@ func (c *ControllerClient) ReplicaPrepareRebuild(address, instanceName string) ( ctx, cancel := context.WithTimeout(context.Background(), GRPCServiceTimeout) defer cancel() - reply, err := controllerServiceClient.ReplicaPrepareRebuild(ctx, &enginerpc.ReplicaAddress{ + reply, err := controllerServiceClient.ReplicaPrepareRebuild(ctx, &ptypes.ReplicaAddress{ Address: address, InstanceName: instanceName, }) @@ -363,7 +330,7 @@ func (c *ControllerClient) ReplicaVerifyRebuild(address, instanceName string) er ctx, cancel := context.WithTimeout(context.Background(), GRPCServiceTimeout) defer cancel() - if _, err := controllerServiceClient.ReplicaVerifyRebuild(ctx, &enginerpc.ReplicaAddress{ + if _, err := controllerServiceClient.ReplicaVerifyRebuild(ctx, &ptypes.ReplicaAddress{ Address: address, InstanceName: instanceName, }); err != nil { @@ -378,7 +345,7 @@ func (c *ControllerClient) JournalList(limit int) error { ctx, cancel := context.WithTimeout(context.Background(), GRPCServiceTimeout) defer cancel() - if _, err := controllerServiceClient.JournalList(ctx, &enginerpc.JournalListRequest{ + if _, err := controllerServiceClient.JournalList(ctx, &ptypes.JournalListRequest{ Limit: int64(limit), }); err != nil { return errors.Wrapf(err, "failed to list journal for volume %v", c.serviceURL) @@ -392,7 +359,7 @@ func (c *ControllerClient) VersionDetailGet() (*meta.VersionOutput, error) { ctx, cancel := context.WithTimeout(context.Background(), GRPCServiceTimeout) defer cancel() - reply, err := controllerServiceClient.VersionDetailGet(ctx, &emptypb.Empty{}) + reply, err := controllerServiceClient.VersionDetailGet(ctx, &empty.Empty{}) if err != nil { return nil, errors.Wrap(err, "failed to get version detail") } @@ -412,7 +379,7 @@ func (c *ControllerClient) VersionDetailGet() (*meta.VersionOutput, error) { } func (c *ControllerClient) Check() error { - conn, err := grpc.NewClient(c.serviceURL, grpc.WithTransportCredentials(insecure.NewCredentials())) + conn, err := grpc.Dial(c.serviceURL, grpc.WithInsecure()) if err != nil { return errors.Wrapf(err, "cannot connect to ControllerService %v", c.serviceURL) } @@ -442,7 +409,7 @@ func (c *ControllerClient) MetricsGet() (*types.Metrics, error) { ctx, cancel := context.WithTimeout(context.Background(), GRPCServiceTimeout) defer cancel() - reply, err := controllerServiceClient.MetricsGet(ctx, &emptypb.Empty{}) + reply, err := controllerServiceClient.MetricsGet(ctx, &empty.Empty{}) if err != nil { return nil, errors.Wrapf(err, "failed to get metrics for volume %v", c.serviceURL) } diff --git a/vendor/github.com/longhorn/longhorn-engine/pkg/meta/version.go b/vendor/github.com/longhorn/longhorn-engine/pkg/meta/version.go index 9c283de71..ea4cbfb97 100644 --- a/vendor/github.com/longhorn/longhorn-engine/pkg/meta/version.go +++ b/vendor/github.com/longhorn/longhorn-engine/pkg/meta/version.go @@ -2,12 +2,12 @@ package meta const ( // CLIAPIVersion used to communicate with user e.g. longhorn-manager - CLIAPIVersion = 10 - CLIAPIMinVersion = 8 + CLIAPIVersion = 9 + CLIAPIMinVersion = 3 // ControllerAPIVersion used to communicate with instance-manager ControllerAPIVersion = 5 - ControllerAPIMinVersion = 4 + ControllerAPIMinVersion = 3 // DataFormatVersion used by the Replica to store data DataFormatVersion = 1 diff --git a/vendor/github.com/longhorn/longhorn-engine/pkg/qcow/libqcow.go b/vendor/github.com/longhorn/longhorn-engine/pkg/qcow/libqcow.go index 8b62c6ad9..616f506ee 100644 --- a/vendor/github.com/longhorn/longhorn-engine/pkg/qcow/libqcow.go +++ b/vendor/github.com/longhorn/longhorn-engine/pkg/qcow/libqcow.go @@ -60,7 +60,7 @@ func (q *Qcow) ReadAt(buf []byte, off int64) (int, error) { return int(ret), nil } -func (q *Qcow) UnmapAt(length uint32, off int64) (int, error) { +func (q *Qcow) UnmapAt(legnth uint32, off int64) (int, error) { return 0, errors.New("Unsupported operation") } diff --git a/vendor/github.com/longhorn/longhorn-engine/pkg/replica/backup.go b/vendor/github.com/longhorn/longhorn-engine/pkg/replica/backup.go index 520d92681..c2184cc85 100644 --- a/vendor/github.com/longhorn/longhorn-engine/pkg/replica/backup.go +++ b/vendor/github.com/longhorn/longhorn-engine/pkg/replica/backup.go @@ -1,7 +1,6 @@ package replica import ( - "context" "fmt" "os" "sync" @@ -79,7 +78,10 @@ func (rb *BackupStatus) HasSnapshot(snapID, volumeID string) bool { } id := diskutil.GenerateSnapshotDiskName(snapID) to := rb.findIndex(id) - return to >= 0 + if to < 0 { + return false + } + return true } func (rb *BackupStatus) OpenSnapshot(snapID, volumeID string) error { @@ -94,7 +96,7 @@ func (rb *BackupStatus) OpenSnapshot(snapID, volumeID string) error { if err != nil { return errors.Wrap(err, "cannot get working directory") } - r, err := NewReadOnly(context.Background(), dir, id, rb.backingFile) + r, err := NewReadOnly(dir, id, rb.backingFile) if err != nil { return err } diff --git a/vendor/github.com/longhorn/longhorn-engine/pkg/replica/client/client.go b/vendor/github.com/longhorn/longhorn-engine/pkg/replica/client/client.go index 4fc36aac7..742be5395 100644 --- a/vendor/github.com/longhorn/longhorn-engine/pkg/replica/client/client.go +++ b/vendor/github.com/longhorn/longhorn-engine/pkg/replica/client/client.go @@ -6,16 +6,14 @@ import ( "strconv" "time" - "github.com/longhorn/types/pkg/generated/enginerpc" + "github.com/golang/protobuf/ptypes/empty" "github.com/pkg/errors" "golang.org/x/net/context" "google.golang.org/grpc" - "google.golang.org/grpc/credentials/insecure" - "google.golang.org/protobuf/types/known/emptypb" - "github.com/longhorn/longhorn-engine/pkg/interceptor" "github.com/longhorn/longhorn-engine/pkg/types" "github.com/longhorn/longhorn-engine/pkg/util" + "github.com/longhorn/longhorn-engine/proto/ptypes" ) const ( @@ -25,7 +23,7 @@ const ( type ReplicaServiceContext struct { cc *grpc.ClientConn - service enginerpc.ReplicaServiceClient + service ptypes.ReplicaServiceClient once util.Once } @@ -38,7 +36,7 @@ func (c *ReplicaServiceContext) Close() error { type SyncServiceContext struct { cc *grpc.ClientConn - service enginerpc.SyncAgentServiceClient + service ptypes.SyncAgentServiceClient once util.Once } @@ -90,17 +88,17 @@ func NewReplicaClient(address, volumeName, instanceName string) (*ReplicaClient, // getReplicaServiceClient lazily initialize the service client, this is to reduce the connection count // for the longhorn-manager which executes these command as binaries invocations -func (c *ReplicaClient) getReplicaServiceClient() (enginerpc.ReplicaServiceClient, error) { +func (c *ReplicaClient) getReplicaServiceClient() (ptypes.ReplicaServiceClient, error) { err := c.replicaServiceContext.once.Do(func() error { - cc, err := grpc.NewClient(c.replicaServiceURL, grpc.WithTransportCredentials(insecure.NewCredentials()), - interceptor.WithIdentityValidationClientInterceptor(c.volumeName, c.instanceName)) + cc, err := grpc.Dial(c.replicaServiceURL, grpc.WithInsecure(), + ptypes.WithIdentityValidationClientInterceptor(c.volumeName, c.instanceName)) if err != nil { return err } // this is safe since we only do it one time while we have the lock in once.doSlow() c.replicaServiceContext.cc = cc - c.replicaServiceContext.service = enginerpc.NewReplicaServiceClient(cc) + c.replicaServiceContext.service = ptypes.NewReplicaServiceClient(cc) return nil }) if err != nil { @@ -111,17 +109,17 @@ func (c *ReplicaClient) getReplicaServiceClient() (enginerpc.ReplicaServiceClien // getSyncServiceClient lazily initialize the service client, this is to reduce the connection count // for the longhorn-manager which executes these command as binaries invocations -func (c *ReplicaClient) getSyncServiceClient() (enginerpc.SyncAgentServiceClient, error) { +func (c *ReplicaClient) getSyncServiceClient() (ptypes.SyncAgentServiceClient, error) { err := c.syncServiceContext.once.Do(func() error { - cc, err := grpc.NewClient(c.syncAgentServiceURL, grpc.WithTransportCredentials(insecure.NewCredentials()), - interceptor.WithIdentityValidationClientInterceptor(c.volumeName, c.instanceName)) + cc, err := grpc.Dial(c.syncAgentServiceURL, grpc.WithInsecure(), + ptypes.WithIdentityValidationClientInterceptor(c.volumeName, c.instanceName)) if err != nil { return err } // this is safe since we only do it one time while we have the lock in once.doSlow() c.syncServiceContext.cc = cc - c.syncServiceContext.service = enginerpc.NewSyncAgentServiceClient(cc) + c.syncServiceContext.service = ptypes.NewSyncAgentServiceClient(cc) return nil }) if err != nil { @@ -130,7 +128,7 @@ func (c *ReplicaClient) getSyncServiceClient() (enginerpc.SyncAgentServiceClient return c.syncServiceContext.service, nil } -func GetDiskInfo(info *enginerpc.DiskInfo) *types.DiskInfo { +func GetDiskInfo(info *ptypes.DiskInfo) *types.DiskInfo { diskInfo := &types.DiskInfo{ Name: info.Name, Parent: info.Parent, @@ -149,7 +147,7 @@ func GetDiskInfo(info *enginerpc.DiskInfo) *types.DiskInfo { return diskInfo } -func GetReplicaInfo(r *enginerpc.Replica) *types.ReplicaInfo { +func GetReplicaInfo(r *ptypes.Replica) *types.ReplicaInfo { replicaInfo := &types.ReplicaInfo{ Dirty: r.Dirty, Rebuilding: r.Rebuilding, @@ -167,8 +165,6 @@ func GetReplicaInfo(r *enginerpc.Replica) *types.ReplicaInfo { HeadFileSize: r.HeadFileSize, RevisionCounterDisabled: r.RevisionCounterDisabled, UnmapMarkDiskChainRemoved: r.UnmapMarkDiskChainRemoved, - SnapshotCountUsage: int(r.SnapshotCountUsage), - SnapshotSizeUsage: r.SnapshotSizeUsage, } for diskName, diskInfo := range r.Disks { @@ -178,16 +174,16 @@ func GetReplicaInfo(r *enginerpc.Replica) *types.ReplicaInfo { return replicaInfo } -func syncFileInfoListToSyncAgentGRPCFormat(list []types.SyncFileInfo) []*enginerpc.SyncFileInfo { - res := []*enginerpc.SyncFileInfo{} +func syncFileInfoListToSyncAgentGRPCFormat(list []types.SyncFileInfo) []*ptypes.SyncFileInfo { + res := []*ptypes.SyncFileInfo{} for _, info := range list { res = append(res, syncFileInfoToSyncAgentGRPCFormat(info)) } return res } -func syncFileInfoToSyncAgentGRPCFormat(info types.SyncFileInfo) *enginerpc.SyncFileInfo { - return &enginerpc.SyncFileInfo{ +func syncFileInfoToSyncAgentGRPCFormat(info types.SyncFileInfo) *ptypes.SyncFileInfo { + return &ptypes.SyncFileInfo{ FromFileName: info.FromFileName, ToFileName: info.ToFileName, ActualSize: info.ActualSize, @@ -202,7 +198,7 @@ func (c *ReplicaClient) GetReplica() (*types.ReplicaInfo, error) { ctx, cancel := context.WithTimeout(context.Background(), GRPCServiceCommonTimeout) defer cancel() - resp, err := replicaServiceClient.ReplicaGet(ctx, &emptypb.Empty{}) + resp, err := replicaServiceClient.ReplicaGet(ctx, &empty.Empty{}) if err != nil { return nil, errors.Wrapf(err, "failed to get replica %v", c.replicaServiceURL) } @@ -218,7 +214,7 @@ func (c *ReplicaClient) OpenReplica() error { ctx, cancel := context.WithTimeout(context.Background(), GRPCServiceCommonTimeout) defer cancel() - if _, err := replicaServiceClient.ReplicaOpen(ctx, &emptypb.Empty{}); err != nil { + if _, err := replicaServiceClient.ReplicaOpen(ctx, &empty.Empty{}); err != nil { return errors.Wrapf(err, "failed to open replica %v", c.replicaServiceURL) } @@ -233,7 +229,7 @@ func (c *ReplicaClient) CloseReplica() error { ctx, cancel := context.WithTimeout(context.Background(), GRPCServiceCommonTimeout) defer cancel() - if _, err := replicaServiceClient.ReplicaClose(ctx, &emptypb.Empty{}); err != nil { + if _, err := replicaServiceClient.ReplicaClose(ctx, &empty.Empty{}); err != nil { return errors.Wrapf(err, "failed to close replica %v", c.replicaServiceURL) } @@ -248,7 +244,7 @@ func (c *ReplicaClient) ReloadReplica() (*types.ReplicaInfo, error) { ctx, cancel := context.WithTimeout(context.Background(), GRPCServiceCommonTimeout) defer cancel() - resp, err := replicaServiceClient.ReplicaReload(ctx, &emptypb.Empty{}) + resp, err := replicaServiceClient.ReplicaReload(ctx, &empty.Empty{}) if err != nil { return nil, errors.Wrapf(err, "failed to reload replica %v", c.replicaServiceURL) } @@ -264,7 +260,7 @@ func (c *ReplicaClient) ExpandReplica(size int64) (*types.ReplicaInfo, error) { ctx, cancel := context.WithTimeout(context.Background(), GRPCServiceCommonTimeout) defer cancel() - resp, err := replicaServiceClient.ReplicaExpand(ctx, &enginerpc.ReplicaExpandRequest{ + resp, err := replicaServiceClient.ReplicaExpand(ctx, &ptypes.ReplicaExpandRequest{ Size: size, }) if err != nil { @@ -282,7 +278,7 @@ func (c *ReplicaClient) Revert(name, created string) error { ctx, cancel := context.WithTimeout(context.Background(), GRPCServiceCommonTimeout) defer cancel() - if _, err := replicaServiceClient.ReplicaRevert(ctx, &enginerpc.ReplicaRevertRequest{ + if _, err := replicaServiceClient.ReplicaRevert(ctx, &ptypes.ReplicaRevertRequest{ Name: name, Created: created, }); err != nil { @@ -300,7 +296,7 @@ func (c *ReplicaClient) RemoveDisk(disk string, force bool) error { ctx, cancel := context.WithTimeout(context.Background(), GRPCServiceCommonTimeout) defer cancel() - if _, err := replicaServiceClient.DiskRemove(ctx, &enginerpc.DiskRemoveRequest{ + if _, err := replicaServiceClient.DiskRemove(ctx, &ptypes.DiskRemoveRequest{ Name: disk, Force: force, }); err != nil { @@ -318,7 +314,7 @@ func (c *ReplicaClient) ReplaceDisk(target, source string) error { ctx, cancel := context.WithTimeout(context.Background(), GRPCServiceCommonTimeout) defer cancel() - if _, err := replicaServiceClient.DiskReplace(ctx, &enginerpc.DiskReplaceRequest{ + if _, err := replicaServiceClient.DiskReplace(ctx, &ptypes.DiskReplaceRequest{ Target: target, Source: source, }); err != nil { @@ -336,7 +332,7 @@ func (c *ReplicaClient) PrepareRemoveDisk(disk string) ([]*types.PrepareRemoveAc ctx, cancel := context.WithTimeout(context.Background(), GRPCServiceCommonTimeout) defer cancel() - reply, err := replicaServiceClient.DiskPrepareRemove(ctx, &enginerpc.DiskPrepareRemoveRequest{ + reply, err := replicaServiceClient.DiskPrepareRemove(ctx, &ptypes.DiskPrepareRemoveRequest{ Name: disk, }) @@ -364,7 +360,7 @@ func (c *ReplicaClient) MarkDiskAsRemoved(disk string) error { ctx, cancel := context.WithTimeout(context.Background(), GRPCServiceCommonTimeout) defer cancel() - if _, err := replicaServiceClient.DiskMarkAsRemoved(ctx, &enginerpc.DiskMarkAsRemovedRequest{ + if _, err := replicaServiceClient.DiskMarkAsRemoved(ctx, &ptypes.DiskMarkAsRemovedRequest{ Name: disk, }); err != nil { return errors.Wrapf(err, "failed to mark disk %v as removed for replica %v", disk, c.replicaServiceURL) @@ -381,7 +377,7 @@ func (c *ReplicaClient) SetRebuilding(rebuilding bool) error { ctx, cancel := context.WithTimeout(context.Background(), GRPCServiceCommonTimeout) defer cancel() - if _, err := replicaServiceClient.RebuildingSet(ctx, &enginerpc.RebuildingSetRequest{ + if _, err := replicaServiceClient.RebuildingSet(ctx, &ptypes.RebuildingSetRequest{ Rebuilding: rebuilding, }); err != nil { return errors.Wrapf(err, "failed to set rebuilding to %v for replica %v", rebuilding, c.replicaServiceURL) @@ -398,7 +394,7 @@ func (c *ReplicaClient) SetUnmapMarkDiskChainRemoved(enabled bool) error { ctx, cancel := context.WithTimeout(context.Background(), GRPCServiceCommonTimeout) defer cancel() - if _, err := replicaServiceClient.UnmapMarkDiskChainRemovedSet(ctx, &enginerpc.UnmapMarkDiskChainRemovedSetRequest{ + if _, err := replicaServiceClient.UnmapMarkDiskChainRemovedSet(ctx, &ptypes.UnmapMarkDiskChainRemovedSetRequest{ Enabled: enabled, }); err != nil { return errors.Wrapf(err, "failed to set UnmapMarkDiskChainRemoved flag to %v for replica %v", enabled, c.replicaServiceURL) @@ -415,7 +411,7 @@ func (c *ReplicaClient) RemoveFile(file string) error { ctx, cancel := context.WithTimeout(context.Background(), GRPCServiceCommonTimeout) defer cancel() - if _, err := syncAgentServiceClient.FileRemove(ctx, &enginerpc.FileRemoveRequest{ + if _, err := syncAgentServiceClient.FileRemove(ctx, &ptypes.FileRemoveRequest{ FileName: file, }); err != nil { return errors.Wrapf(err, "failed to remove file %v", file) @@ -432,7 +428,7 @@ func (c *ReplicaClient) RenameFile(oldFileName, newFileName string) error { ctx, cancel := context.WithTimeout(context.Background(), GRPCServiceCommonTimeout) defer cancel() - if _, err := syncAgentServiceClient.FileRename(ctx, &enginerpc.FileRenameRequest{ + if _, err := syncAgentServiceClient.FileRename(ctx, &ptypes.FileRenameRequest{ OldFileName: oldFileName, NewFileName: newFileName, }); err != nil { @@ -442,19 +438,15 @@ func (c *ReplicaClient) RenameFile(oldFileName, newFileName string) error { return nil } -func (c *ReplicaClient) SendFile(from, host string, port int32, fileSyncHTTPClientTimeout int, fastSync bool, grpcTimeoutSeconds int64) error { +func (c *ReplicaClient) SendFile(from, host string, port int32, fileSyncHTTPClientTimeout int, fastSync bool) error { syncAgentServiceClient, err := c.getSyncServiceClient() if err != nil { return err } - grpcTimeout := GRPCServiceLongTimeout - if grpcTimeoutSeconds > 0 { - grpcTimeout = time.Second * time.Duration(grpcTimeoutSeconds) - } - ctx, cancel := context.WithTimeout(context.Background(), grpcTimeout) + ctx, cancel := context.WithTimeout(context.Background(), GRPCServiceLongTimeout) defer cancel() - if _, err := syncAgentServiceClient.FileSend(ctx, &enginerpc.FileSendRequest{ + if _, err := syncAgentServiceClient.FileSend(ctx, &ptypes.FileSendRequest{ FromFileName: from, Host: host, Port: port, @@ -476,7 +468,7 @@ func (c *ReplicaClient) ExportVolume(snapshotName, host string, port int32, expo ctx, cancel := context.WithTimeout(context.Background(), GRPCServiceLongTimeout) defer cancel() - if _, err := syncAgentServiceClient.VolumeExport(ctx, &enginerpc.VolumeExportRequest{ + if _, err := syncAgentServiceClient.VolumeExport(ctx, &ptypes.VolumeExportRequest{ SnapshotFileName: snapshotName, Host: host, Port: port, @@ -496,7 +488,7 @@ func (c *ReplicaClient) LaunchReceiver(toFilePath string) (string, int32, error) ctx, cancel := context.WithTimeout(context.Background(), GRPCServiceCommonTimeout) defer cancel() - reply, err := syncAgentServiceClient.ReceiverLaunch(ctx, &enginerpc.ReceiverLaunchRequest{ + reply, err := syncAgentServiceClient.ReceiverLaunch(ctx, &ptypes.ReceiverLaunchRequest{ ToFileName: toFilePath, }) if err != nil { @@ -506,35 +498,21 @@ func (c *ReplicaClient) LaunchReceiver(toFilePath string) (string, int32, error) return c.host, reply.Port, nil } -func (c *ReplicaClient) SyncFiles(fromAddress string, list []types.SyncFileInfo, fileSyncHTTPClientTimeout int, fastSync bool, grpcTimeoutSeconds int64, localSync *types.FileLocalSync) error { +func (c *ReplicaClient) SyncFiles(fromAddress string, list []types.SyncFileInfo, fileSyncHTTPClientTimeout int, fastSync bool) error { syncAgentServiceClient, err := c.getSyncServiceClient() if err != nil { return err } - grpcTimeout := GRPCServiceLongTimeout - if grpcTimeoutSeconds > 0 { - grpcTimeout = time.Second * time.Duration(grpcTimeoutSeconds) - } - ctx, cancel := context.WithTimeout(context.Background(), grpcTimeout) + ctx, cancel := context.WithTimeout(context.Background(), GRPCServiceLongTimeout) defer cancel() - fileSyncRequest := &enginerpc.FilesSyncRequest{ + if _, err := syncAgentServiceClient.FilesSync(ctx, &ptypes.FilesSyncRequest{ FromAddress: fromAddress, ToHost: c.host, SyncFileInfoList: syncFileInfoListToSyncAgentGRPCFormat(list), FastSync: fastSync, FileSyncHttpClientTimeout: int32(fileSyncHTTPClientTimeout), - GrpcTimeoutSeconds: grpcTimeoutSeconds, - } - - if localSync != nil { - fileSyncRequest.LocalSync = &enginerpc.FileLocalSync{ - SourcePath: localSync.SourcePath, - TargetPath: localSync.TargetPath, - } - } - - if _, err := syncAgentServiceClient.FilesSync(ctx, fileSyncRequest); err != nil { + }); err != nil { return errors.Wrapf(err, "failed to sync files %+v from %v", list, fromAddress) } @@ -542,7 +520,7 @@ func (c *ReplicaClient) SyncFiles(fromAddress string, list []types.SyncFileInfo, } func (c *ReplicaClient) CreateBackup(backupName, snapshot, dest, volume, backingImageName, backingImageChecksum, - compressionMethod string, concurrentLimit int, storageClassName string, labels []string, credential map[string]string, parameters map[string]string) (*enginerpc.BackupCreateResponse, error) { + compressionMethod string, concurrentLimit int, storageClassName string, labels []string, credential map[string]string) (*ptypes.BackupCreateResponse, error) { syncAgentServiceClient, err := c.getSyncServiceClient() if err != nil { return nil, err @@ -550,7 +528,7 @@ func (c *ReplicaClient) CreateBackup(backupName, snapshot, dest, volume, backing ctx, cancel := context.WithTimeout(context.Background(), GRPCServiceCommonTimeout) defer cancel() - resp, err := syncAgentServiceClient.BackupCreate(ctx, &enginerpc.BackupCreateRequest{ + resp, err := syncAgentServiceClient.BackupCreate(ctx, &ptypes.BackupCreateRequest{ SnapshotFileName: snapshot, BackupTarget: dest, VolumeName: volume, @@ -562,7 +540,6 @@ func (c *ReplicaClient) CreateBackup(backupName, snapshot, dest, volume, backing Labels: labels, Credential: credential, BackupName: backupName, - Parameters: parameters, }) if err != nil { return nil, errors.Wrapf(err, "failed to create backup to %v for volume %v", dest, volume) @@ -571,7 +548,7 @@ func (c *ReplicaClient) CreateBackup(backupName, snapshot, dest, volume, backing return resp, nil } -func (c *ReplicaClient) BackupStatus(backupName string) (*enginerpc.BackupStatusResponse, error) { +func (c *ReplicaClient) BackupStatus(backupName string) (*ptypes.BackupStatusResponse, error) { syncAgentServiceClient, err := c.getSyncServiceClient() if err != nil { return nil, err @@ -579,7 +556,7 @@ func (c *ReplicaClient) BackupStatus(backupName string) (*enginerpc.BackupStatus ctx, cancel := context.WithTimeout(context.Background(), GRPCServiceCommonTimeout) defer cancel() - resp, err := syncAgentServiceClient.BackupStatus(ctx, &enginerpc.BackupStatusRequest{ + resp, err := syncAgentServiceClient.BackupStatus(ctx, &ptypes.BackupStatusRequest{ Backup: backupName, }) @@ -598,7 +575,7 @@ func (c *ReplicaClient) RmBackup(backup string) error { ctx, cancel := context.WithTimeout(context.Background(), GRPCServiceCommonTimeout) defer cancel() - if _, err := syncAgentServiceClient.BackupRemove(ctx, &enginerpc.BackupRemoveRequest{ + if _, err := syncAgentServiceClient.BackupRemove(ctx, &ptypes.BackupRemoveRequest{ Backup: backup, }); err != nil { return errors.Wrapf(err, "failed to remove backup %v", backup) @@ -615,7 +592,7 @@ func (c *ReplicaClient) RestoreBackup(backup, snapshotDiskName string, credentia ctx, cancel := context.WithTimeout(context.Background(), GRPCServiceCommonTimeout) defer cancel() - if _, err := syncAgentServiceClient.BackupRestore(ctx, &enginerpc.BackupRestoreRequest{ + if _, err := syncAgentServiceClient.BackupRestore(ctx, &ptypes.BackupRestoreRequest{ Backup: backup, SnapshotDiskName: snapshotDiskName, Credential: credential, @@ -635,14 +612,14 @@ func (c *ReplicaClient) Reset() error { ctx, cancel := context.WithTimeout(context.Background(), GRPCServiceCommonTimeout) defer cancel() - if _, err := syncAgentServiceClient.Reset(ctx, &emptypb.Empty{}); err != nil { + if _, err := syncAgentServiceClient.Reset(ctx, &empty.Empty{}); err != nil { return errors.Wrap(err, "failed to clean up restore info in Sync Agent Server") } return nil } -func (c *ReplicaClient) RestoreStatus() (*enginerpc.RestoreStatusResponse, error) { +func (c *ReplicaClient) RestoreStatus() (*ptypes.RestoreStatusResponse, error) { syncAgentServiceClient, err := c.getSyncServiceClient() if err != nil { return nil, err @@ -650,7 +627,7 @@ func (c *ReplicaClient) RestoreStatus() (*enginerpc.RestoreStatusResponse, error ctx, cancel := context.WithTimeout(context.Background(), GRPCServiceCommonTimeout) defer cancel() - resp, err := syncAgentServiceClient.RestoreStatus(ctx, &emptypb.Empty{}) + resp, err := syncAgentServiceClient.RestoreStatus(ctx, &empty.Empty{}) if err != nil { return nil, errors.Wrap(err, "failed to get restore status") } @@ -666,14 +643,14 @@ func (c *ReplicaClient) SnapshotPurge() error { ctx, cancel := context.WithTimeout(context.Background(), GRPCServiceCommonTimeout) defer cancel() - if _, err := syncAgentServiceClient.SnapshotPurge(ctx, &emptypb.Empty{}); err != nil { + if _, err := syncAgentServiceClient.SnapshotPurge(ctx, &empty.Empty{}); err != nil { return errors.Wrap(err, "failed to start snapshot purge") } return nil } -func (c *ReplicaClient) SnapshotPurgeStatus() (*enginerpc.SnapshotPurgeStatusResponse, error) { +func (c *ReplicaClient) SnapshotPurgeStatus() (*ptypes.SnapshotPurgeStatusResponse, error) { syncAgentServiceClient, err := c.getSyncServiceClient() if err != nil { return nil, err @@ -681,7 +658,7 @@ func (c *ReplicaClient) SnapshotPurgeStatus() (*enginerpc.SnapshotPurgeStatusRes ctx, cancel := context.WithTimeout(context.Background(), GRPCServiceCommonTimeout) defer cancel() - status, err := syncAgentServiceClient.SnapshotPurgeStatus(ctx, &emptypb.Empty{}) + status, err := syncAgentServiceClient.SnapshotPurgeStatus(ctx, &empty.Empty{}) if err != nil { return nil, errors.Wrap(err, "failed to get snapshot purge status") } @@ -689,7 +666,7 @@ func (c *ReplicaClient) SnapshotPurgeStatus() (*enginerpc.SnapshotPurgeStatusRes return status, nil } -func (c *ReplicaClient) ReplicaRebuildStatus() (*enginerpc.ReplicaRebuildStatusResponse, error) { +func (c *ReplicaClient) ReplicaRebuildStatus() (*ptypes.ReplicaRebuildStatusResponse, error) { syncAgentServiceClient, err := c.getSyncServiceClient() if err != nil { return nil, err @@ -697,7 +674,7 @@ func (c *ReplicaClient) ReplicaRebuildStatus() (*enginerpc.ReplicaRebuildStatusR ctx, cancel := context.WithTimeout(context.Background(), GRPCServiceCommonTimeout) defer cancel() - status, err := syncAgentServiceClient.ReplicaRebuildStatus(ctx, &emptypb.Empty{}) + status, err := syncAgentServiceClient.ReplicaRebuildStatus(ctx, &empty.Empty{}) if err != nil { return nil, errors.Wrap(err, "failed to get replica rebuild status") } @@ -705,19 +682,15 @@ func (c *ReplicaClient) ReplicaRebuildStatus() (*enginerpc.ReplicaRebuildStatusR return status, nil } -func (c *ReplicaClient) CloneSnapshot(fromAddress, fromVolumeName, snapshotFileName string, exportBackingImageIfExist bool, fileSyncHTTPClientTimeout int, grpcTimeoutSeconds int64) error { +func (c *ReplicaClient) CloneSnapshot(fromAddress, fromVolumeName, snapshotFileName string, exportBackingImageIfExist bool, fileSyncHTTPClientTimeout int) error { syncAgentServiceClient, err := c.getSyncServiceClient() if err != nil { return err } - grpcTimeout := GRPCServiceLongTimeout - if grpcTimeoutSeconds > 0 { - grpcTimeout = time.Second * time.Duration(grpcTimeoutSeconds) - } - ctx, cancel := context.WithTimeout(context.Background(), grpcTimeout) + ctx, cancel := context.WithTimeout(context.Background(), GRPCServiceLongTimeout) defer cancel() - if _, err := syncAgentServiceClient.SnapshotClone(ctx, &enginerpc.SnapshotCloneRequest{ + if _, err := syncAgentServiceClient.SnapshotClone(ctx, &ptypes.SnapshotCloneRequest{ FromAddress: fromAddress, ToHost: c.host, SnapshotFileName: snapshotFileName, @@ -731,7 +704,7 @@ func (c *ReplicaClient) CloneSnapshot(fromAddress, fromVolumeName, snapshotFileN return nil } -func (c *ReplicaClient) SnapshotCloneStatus() (*enginerpc.SnapshotCloneStatusResponse, error) { +func (c *ReplicaClient) SnapshotCloneStatus() (*ptypes.SnapshotCloneStatusResponse, error) { syncAgentServiceClient, err := c.getSyncServiceClient() if err != nil { return nil, err @@ -739,7 +712,7 @@ func (c *ReplicaClient) SnapshotCloneStatus() (*enginerpc.SnapshotCloneStatusRes ctx, cancel := context.WithTimeout(context.Background(), GRPCServiceCommonTimeout) defer cancel() - status, err := syncAgentServiceClient.SnapshotCloneStatus(ctx, &emptypb.Empty{}) + status, err := syncAgentServiceClient.SnapshotCloneStatus(ctx, &empty.Empty{}) if err != nil { return nil, errors.Wrap(err, "failed to get snapshot clone status") } @@ -754,7 +727,7 @@ func (c *ReplicaClient) SnapshotHash(snapshotName string, rehash bool) error { ctx, cancel := context.WithTimeout(context.Background(), GRPCServiceCommonTimeout) defer cancel() - if _, err := syncAgentServiceClient.SnapshotHash(ctx, &enginerpc.SnapshotHashRequest{ + if _, err := syncAgentServiceClient.SnapshotHash(ctx, &ptypes.SnapshotHashRequest{ SnapshotName: snapshotName, Rehash: rehash, }); err != nil { @@ -764,7 +737,7 @@ func (c *ReplicaClient) SnapshotHash(snapshotName string, rehash bool) error { return nil } -func (c *ReplicaClient) SnapshotHashStatus(snapshotName string) (*enginerpc.SnapshotHashStatusResponse, error) { +func (c *ReplicaClient) SnapshotHashStatus(snapshotName string) (*ptypes.SnapshotHashStatusResponse, error) { syncAgentServiceClient, err := c.getSyncServiceClient() if err != nil { return nil, err @@ -772,7 +745,7 @@ func (c *ReplicaClient) SnapshotHashStatus(snapshotName string) (*enginerpc.Snap ctx, cancel := context.WithTimeout(context.Background(), GRPCServiceCommonTimeout) defer cancel() - status, err := syncAgentServiceClient.SnapshotHashStatus(ctx, &enginerpc.SnapshotHashStatusRequest{ + status, err := syncAgentServiceClient.SnapshotHashStatus(ctx, &ptypes.SnapshotHashStatusRequest{ SnapshotName: snapshotName, }) if err != nil { @@ -789,7 +762,7 @@ func (c *ReplicaClient) SnapshotHashCancel(snapshotName string) error { ctx, cancel := context.WithTimeout(context.Background(), GRPCServiceCommonTimeout) defer cancel() - if _, err := syncAgentServiceClient.SnapshotHashCancel(ctx, &enginerpc.SnapshotHashCancelRequest{ + if _, err := syncAgentServiceClient.SnapshotHashCancel(ctx, &ptypes.SnapshotHashCancelRequest{ SnapshotName: snapshotName, }); err != nil { return errors.Wrapf(err, "failed to cancel snapshot %v hash task", snapshotName) @@ -806,7 +779,7 @@ func (c *ReplicaClient) SnapshotHashLockState() (bool, error) { ctx, cancel := context.WithTimeout(context.Background(), GRPCServiceCommonTimeout) defer cancel() - resp, err := syncAgentServiceClient.SnapshotHashLockState(ctx, &emptypb.Empty{}) + resp, err := syncAgentServiceClient.SnapshotHashLockState(ctx, &empty.Empty{}) if err != nil { return false, errors.Wrapf(err, "failed to get snapshot hash lock state") } diff --git a/vendor/github.com/longhorn/longhorn-engine/pkg/replica/diff_disk.go b/vendor/github.com/longhorn/longhorn-engine/pkg/replica/diff_disk.go index 4be04ff13..9f63a9a6b 100644 --- a/vendor/github.com/longhorn/longhorn-engine/pkg/replica/diff_disk.go +++ b/vendor/github.com/longhorn/longhorn-engine/pkg/replica/diff_disk.go @@ -20,7 +20,7 @@ type diffDisk struct { // we don't know the location yet. location []byte // list of files in grandparent, parent, child, etc order. - // index 0 is nil, index 1 is backing file, and index n-1 is the active write layer + // index 0 is nil or backing file and index n-1 is the active write layer files []types.DiffDisk sectorSize int64 // current size of the head file. @@ -58,6 +58,7 @@ func (d *diffDisk) Expand(size int64) { d.location = append(d.location, make([]byte, newLocationSize-len(d.location))...) d.size = size + return } func (d *diffDisk) WriteAt(buf []byte, offset int64) (int, error) { @@ -372,17 +373,12 @@ func (d *diffDisk) initializeSectorLocation(value byte) { } } -func (d *diffDisk) preload(isThereBackingFile bool) error { +func (d *diffDisk) preload() error { for i, f := range d.files { if i == 0 { continue } - // Skip loading the backingFile if it exists - if i == int(backingFileIndex) && isThereBackingFile { - continue - } - if err := LoadDiffDiskLocationList(d, f, byte(i)); err != nil { return err } diff --git a/vendor/github.com/longhorn/longhorn-engine/pkg/replica/extents.go b/vendor/github.com/longhorn/longhorn-engine/pkg/replica/extents.go index a82325fe8..697f92a24 100644 --- a/vendor/github.com/longhorn/longhorn-engine/pkg/replica/extents.go +++ b/vendor/github.com/longhorn/longhorn-engine/pkg/replica/extents.go @@ -11,6 +11,11 @@ const MaxExtentsBuffer = 1024 func LoadDiffDiskLocationList(diffDisk *diffDisk, disk types.DiffDisk, currentFileIndex byte) error { fd := disk.Fd() + // The backing file will have a Fd of 0 + if fd == 0 { + return nil + } + start := uint64(0) end := uint64(len(diffDisk.location)) * uint64(diffDisk.sectorSize) for { diff --git a/vendor/github.com/longhorn/longhorn-engine/pkg/replica/hash.go b/vendor/github.com/longhorn/longhorn-engine/pkg/replica/hash.go index 893cfaac5..f0c0cea4d 100644 --- a/vendor/github.com/longhorn/longhorn-engine/pkg/replica/hash.go +++ b/vendor/github.com/longhorn/longhorn-engine/pkg/replica/hash.go @@ -51,6 +51,8 @@ type SnapshotHashJob struct { SnapshotName string Rehash bool + file *os.File + SnapshotHashStatus } @@ -93,12 +95,7 @@ func (t *SnapshotHashJob) LockFile() (fileLock *flock.Flock, err error) { } func (t *SnapshotHashJob) UnlockFile(fileLock *flock.Flock) { - if err := fileLock.Unlock(); err != nil { - logrus.WithError(err).WithFields(logrus.Fields{ - "snapshot": t.SnapshotName, - "file": fileLock.Path(), - }).Warn("Failed to unlock the file lock") - } + fileLock.Unlock() } func (t *SnapshotHashJob) Execute() (err error) { @@ -123,18 +120,15 @@ func (t *SnapshotHashJob) Execute() (err error) { return } - if err = SetSnapshotHashInfoToChecksumFile(t.SnapshotName, &xattrType.SnapshotHashInfo{ + SetSnapshotHashInfoToChecksumFile(t.SnapshotName, &xattrType.SnapshotHashInfo{ Method: defaultHashMethod, Checksum: checksum, ChangeTime: changeTime, LastHashedAt: lastHashedAt, SilentlyCorrupted: silentlyCorrupted, - }); err != nil { - logrus.WithError(err).Warnf("failed to set snapshot %s hash info to checksum file", t.SnapshotName) - } + }) - var remain bool - remain, err = t.isChangeTimeRemain(changeTime) + remain, err := t.isChangeTimeRemain(changeTime) if !remain { if err == nil { err = fmt.Errorf("snapshot %v modification time is changed", t.SnapshotName) @@ -142,9 +136,7 @@ func (t *SnapshotHashJob) Execute() (err error) { // Do the best to delete the useless checksum file. // The deletion failure is acceptable, because the mismatching timestamps // will trigger the rehash in the next hash request. - if deleteErr := DeleteSnapshotHashInfoChecksumFile(t.SnapshotName); deleteErr != nil { - logrus.WithError(deleteErr).Warnf("failed to delete snapshot %v hash info checksum file", t.SnapshotName) - } + DeleteSnapshotHashInfoChecksumFile(t.SnapshotName) } } @@ -180,8 +172,8 @@ func (t *SnapshotHashJob) Execute() (err error) { return nil } + requireRehash := true if !t.Rehash { - var requireRehash bool requireRehash, checksum, err = t.isRehashRequired(changeTime) if err != nil { return err diff --git a/vendor/github.com/longhorn/longhorn-engine/pkg/replica/replica.go b/vendor/github.com/longhorn/longhorn-engine/pkg/replica/replica.go index ab836a8ff..a58fd92d3 100644 --- a/vendor/github.com/longhorn/longhorn-engine/pkg/replica/replica.go +++ b/vendor/github.com/longhorn/longhorn-engine/pkg/replica/replica.go @@ -12,18 +12,19 @@ import ( "strconv" "strings" "sync" - "sync/atomic" "syscall" - "github.com/pkg/errors" "github.com/rancher/go-fibmap" + + "github.com/pkg/errors" "github.com/sirupsen/logrus" + "github.com/longhorn/sparse-tools/sparse" + "github.com/longhorn/longhorn-engine/pkg/backingfile" "github.com/longhorn/longhorn-engine/pkg/types" "github.com/longhorn/longhorn-engine/pkg/util" diskutil "github.com/longhorn/longhorn-engine/pkg/util/disk" - "github.com/longhorn/sparse-tools/sparse" ) const ( @@ -44,7 +45,6 @@ var ( type Replica struct { sync.RWMutex - ctx context.Context volume diffDisk dir string info Info @@ -55,16 +55,13 @@ type Replica struct { activeDiskData []*disk readOnly bool - revisionCache atomic.Int64 + revisionLock sync.Mutex + revisionCache int64 revisionFile *sparse.DirectFileIoProcessor + revisionRefreshed bool revisionCounterDisabled bool - revisionCounterReqChan chan bool - revisionCounterAckChan chan error unmapMarkDiskChainRemoved bool - - snapshotMaxCount int - snapshotMaxSize int64 } type Info struct { @@ -131,7 +128,7 @@ func OpenSnapshot(dir string, snapshotName string) (*Replica, error) { } } - r, err := NewReadOnly(context.Background(), dir, snapshotDiskName, backingFile) + r, err := NewReadOnly(dir, snapshotDiskName, backingFile) if err != nil { return nil, err } @@ -144,17 +141,16 @@ func ReadInfo(dir string) (Info, error) { return info, err } -func New(ctx context.Context, size, sectorSize int64, dir string, backingFile *backingfile.BackingFile, disableRevCounter, unmapMarkDiskChainRemoved bool, snapshotMaxCount int, SnapshotMaxSize int64) (*Replica, error) { - return construct(ctx, false, size, sectorSize, dir, "", backingFile, disableRevCounter, unmapMarkDiskChainRemoved, snapshotMaxCount, SnapshotMaxSize) +func New(size, sectorSize int64, dir string, backingFile *backingfile.BackingFile, disableRevCounter, unmapMarkDiskChainRemoved bool) (*Replica, error) { + return construct(false, size, sectorSize, dir, "", backingFile, disableRevCounter, unmapMarkDiskChainRemoved) } -func NewReadOnly(ctx context.Context, dir, head string, backingFile *backingfile.BackingFile) (*Replica, error) { +func NewReadOnly(dir, head string, backingFile *backingfile.BackingFile) (*Replica, error) { // size and sectorSize don't matter because they will be read from metadata - // snapshotMaxCount and SnapshotMaxSize don't matter because readonly replica can't create a new disk - return construct(ctx, true, 0, diskutil.ReplicaSectorSize, dir, head, backingFile, false, false, 250, 0) + return construct(true, 0, diskutil.ReplicaSectorSize, dir, head, backingFile, false, false) } -func construct(ctx context.Context, readonly bool, size, sectorSize int64, dir, head string, backingFile *backingfile.BackingFile, disableRevCounter, unmapMarkDiskChainRemoved bool, snapshotMaxCount int, snapshotMaxSize int64) (*Replica, error) { +func construct(readonly bool, size, sectorSize int64, dir, head string, backingFile *backingfile.BackingFile, disableRevCounter, unmapMarkDiskChainRemoved bool) (*Replica, error) { if size%sectorSize != 0 { return nil, fmt.Errorf("size %d not a multiple of sector size %d", size, sectorSize) } @@ -164,18 +160,13 @@ func construct(ctx context.Context, readonly bool, size, sectorSize int64, dir, } r := &Replica{ - ctx: ctx, dir: dir, activeDiskData: make([]*disk, 1), diskData: make(map[string]*disk), diskChildrenMap: map[string]map[string]bool{}, readOnly: readonly, revisionCounterDisabled: disableRevCounter, - revisionCounterReqChan: make(chan bool, 1024), // Buffered channel to avoid blocking - revisionCounterAckChan: make(chan error), unmapMarkDiskChainRemoved: unmapMarkDiskChainRemoved, - snapshotMaxCount: snapshotMaxCount, - snapshotMaxSize: snapshotMaxSize, } r.info.Size = size r.info.SectorSize = sectorSize @@ -200,7 +191,7 @@ func construct(ctx context.Context, readonly bool, size, sectorSize int64, dir, } if !r.revisionCounterDisabled { - if err := r.initRevisionCounter(ctx); err != nil { + if err := r.initRevisionCounter(); err != nil { return nil, err } } @@ -294,7 +285,7 @@ func (r *Replica) SetRebuilding(rebuilding bool) error { } func (r *Replica) Reload() (*Replica, error) { - newReplica, err := New(r.ctx, r.info.Size, r.info.SectorSize, r.dir, r.info.BackingFile, r.revisionCounterDisabled, r.unmapMarkDiskChainRemoved, r.snapshotMaxCount, r.snapshotMaxSize) + newReplica, err := New(r.info.Size, r.info.SectorSize, r.dir, r.info.BackingFile, r.revisionCounterDisabled, r.unmapMarkDiskChainRemoved) if err != nil { return nil, err } @@ -594,28 +585,6 @@ func (r *Replica) Chain() ([]string, error) { return result, nil } -func (r *Replica) GetSnapshotSizeUsage() int64 { - r.RLock() - defer r.RUnlock() - - var ( - backingDiskName string - totalSnapshotSize int64 - ) - // index 0 is nil or backing file - if r.activeDiskData[0] != nil { - backingDiskName = r.activeDiskData[0].Name - } - for _, disk := range r.activeDiskData { - // exclude volume head, backing disk, and removed disks - if disk == nil || disk.Removed || disk.Name == backingDiskName || disk.Name == r.info.Head { - continue - } - totalSnapshotSize += r.getDiskSize(disk.Name) - } - return totalSnapshotSize -} - func (r *Replica) writeVolumeMetaData(dirty, rebuilding bool) error { info := r.info info.Dirty = dirty @@ -875,16 +844,12 @@ func (r *Replica) revertDisk(parentDiskFileName, created string) (*Replica, erro info.Parent = newHeadDisk.Parent if _, err := r.encodeToFile(&info, volumeMetaData); err != nil { - if _, err = r.encodeToFile(&r.info, volumeMetaData); err != nil { - return nil, err - } + r.encodeToFile(&r.info, volumeMetaData) return nil, err } // Need to execute before r.Reload() to update r.diskChildrenMap - if err = r.rmDisk(oldHead); err != nil { - return nil, err - } + r.rmDisk(oldHead) rNew, err := r.Reload() if err != nil { @@ -900,8 +865,8 @@ func (r *Replica) createDisk(name string, userCreated bool, created string, labe return fmt.Errorf("cannot create disk on read-only replica") } - if r.getRemainSnapshotCounts() <= 0 { - return fmt.Errorf("too many active disks: %v", len(r.activeDiskData)-2+1) + if len(r.activeDiskData)+1 > maximumChainLength { + return fmt.Errorf("too many active disks: %v", len(r.activeDiskData)+1) } oldHead := r.info.Head @@ -920,9 +885,7 @@ func (r *Replica) createDisk(name string, userCreated bool, created string, labe rollbackFuncList := []func() error{} defer func() { if err == nil { - if errRm := r.rmDisk(oldHead); errRm != nil { - logrus.WithError(errRm).Warnf("Failed to remove old head %v", oldHead) - } + r.rmDisk(oldHead) return } @@ -1187,18 +1150,12 @@ func (r *Replica) Delete() error { for name := range r.diskData { if name != r.info.BackingFilePath { - if err := r.rmDisk(name); err != nil { - logrus.WithError(err).WithFields(logrus.Fields{"disk": name}).Warn("Failed to remove disk") - } + r.rmDisk(name) } } - if err := os.Remove(r.diskPath(volumeMetaData)); err != nil { - logrus.WithError(err).Warnf("Failed to remove %s", volumeMetaData) - } - if err := os.Remove(r.diskPath(revisionCounterFile)); err != nil { - logrus.WithError(err).Warnf("Failed to remove %s", revisionCounterFile) - } + os.Remove(r.diskPath(volumeMetaData)) + os.Remove(r.diskPath(revisionCounterFile)) return nil } @@ -1232,24 +1189,6 @@ func (r *Replica) SetUnmapMarkDiskChainRemoved(enabled bool) { logrus.Infof("Set replica flag unmapMarkDiskChainRemoved to %v", enabled) } -func (r *Replica) SetSnapshotMaxCount(count int) { - r.Lock() - defer r.Unlock() - - r.snapshotMaxCount = count - - logrus.Infof("Set replica flag snapshotMaxCount to %d", count) -} - -func (r *Replica) SetSnapshotMaxSize(size int64) { - r.Lock() - defer r.Unlock() - - r.snapshotMaxSize = size - - logrus.Infof("Set replica flag SnapshotMaxSize to %d", size) -} - func (r *Replica) Expand(size int64) (err error) { if size%diskutil.VolumeSectorSize != 0 { return fmt.Errorf("failed to expend volume replica size %v, because it is not multiple of volume sector size %v", size, diskutil.VolumeSectorSize) @@ -1281,15 +1220,6 @@ func (r *Replica) WriteAt(buf []byte, offset int64) (int, error) { return 0, fmt.Errorf("cannot write on read-only replica") } - // Increase the revision counter optimistically in a separate goroutine since most of the time write operations will succeed. - // Once the write operation fails, the revision counter will be wrongly increased by 1. It means that the revision counter is not accurate. - // Actually, the revision counter is not accurate even without this optimistic increment since we cannot make data write operation and the revision counter increment atomic. - go func() { - if !r.revisionCounterDisabled { - r.revisionCounterReqChan <- true - } - }() - r.RLock() r.info.Dirty = true c, err := r.volume.WriteAt(buf, offset) @@ -1299,10 +1229,12 @@ func (r *Replica) WriteAt(buf []byte, offset int64) (int, error) { } if !r.revisionCounterDisabled { - err = <-r.revisionCounterAckChan + if err := r.increaseRevisionCounter(); err != nil { + return c, err + } } - return c, err + return c, nil } func (r *Replica) ReadAt(buf []byte, offset int64) (int, error) { @@ -1322,12 +1254,6 @@ func (r *Replica) UnmapAt(length uint32, offset int64) (n int, err error) { return 0, fmt.Errorf("can not unmap on read-only replica") } - go func() { - if !r.revisionCounterDisabled { - r.revisionCounterReqChan <- true - } - }() - unmappedSize, err := func() (int, error) { r.Lock() defer r.Unlock() @@ -1365,10 +1291,12 @@ func (r *Replica) UnmapAt(length uint32, offset int64) (n int, err error) { } if !r.revisionCounterDisabled { - err = <-r.revisionCounterAckChan + if err := r.increaseRevisionCounter(); err != nil { + return 0, err + } } - return unmappedSize, err + return unmappedSize, nil } func (r *Replica) ListDisks() map[string]DiskInfo { @@ -1398,42 +1326,11 @@ func (r *Replica) ListDisks() map[string]DiskInfo { return result } -func (r *Replica) GetSnapshotCountUsage() int { - r.RLock() - defer r.RUnlock() - - return r.getSnapshotCountUsage() -} - -func (r *Replica) getSnapshotCountUsage() int { - var ( - backingDiskName string - snapshotCount int - ) - // index 0 is nil or backing file - if r.activeDiskData[0] != nil { - backingDiskName = r.activeDiskData[0].Name - } - - for _, disk := range r.diskData { - // exclude volume head, backing disk, and removed disks - if disk == nil || disk.Removed || disk.Name == backingDiskName || disk.Name == r.info.Head { - continue - } - snapshotCount++ - } - return snapshotCount -} - func (r *Replica) GetRemainSnapshotCounts() int { r.RLock() defer r.RUnlock() - return r.getRemainSnapshotCounts() -} - -func (r *Replica) getRemainSnapshotCounts() int { - return r.snapshotMaxCount - r.getSnapshotCountUsage() + return maximumChainLength - len(r.activeDiskData) } func (r *Replica) getDiskSize(disk string) int64 { @@ -1468,8 +1365,7 @@ func (r *Replica) Preload(includeBackingFileLayer bool) error { } else { r.volume.initializeSectorLocation(nilFileIndex) } - isThereBackingFile := r.info.BackingFile != nil - return r.volume.preload(isThereBackingFile) + return r.volume.preload() } func (r *Replica) GetDataLayout(ctx context.Context) (<-chan sparse.FileInterval, <-chan error, error) { diff --git a/vendor/github.com/longhorn/longhorn-engine/pkg/replica/revision_counter.go b/vendor/github.com/longhorn/longhorn-engine/pkg/replica/revision_counter.go index dc9514eec..7073743d4 100644 --- a/vendor/github.com/longhorn/longhorn-engine/pkg/replica/revision_counter.go +++ b/vendor/github.com/longhorn/longhorn-engine/pkg/replica/revision_counter.go @@ -1,7 +1,6 @@ package replica import ( - "context" "fmt" "io" "os" @@ -9,6 +8,7 @@ import ( "strings" "github.com/pkg/errors" + "github.com/sirupsen/logrus" "github.com/longhorn/sparse-tools/sparse" ) @@ -36,21 +36,14 @@ func (r *Replica) readRevisionCounter() (int64, error) { return counter, nil } -var revisionCounterBuf = sparse.AllocateAligned(revisionBlockSize) - func (r *Replica) writeRevisionCounter(counter int64) error { if r.revisionFile == nil { return fmt.Errorf("BUG: revision file wasn't initialized") } - counterBytes := []byte(strconv.FormatInt(counter, 10)) - copy(revisionCounterBuf, counterBytes) - // Need to clear the part of the slice left over from the previous function call. - // The maximum length of the string representation of an int64 is 20 bytes so only need to clear upto 20 bytes - for i := len(counterBytes); i < 20; i++ { - revisionCounterBuf[i] = 0 - } - _, err := r.revisionFile.WriteAt(revisionCounterBuf, 0) + buf := make([]byte, revisionBlockSize) + copy(buf, []byte(strconv.FormatInt(counter, 10))) + _, err := r.revisionFile.WriteAt(buf, 0) if err != nil { return errors.Wrap(err, "failed to write to revision counter file") } @@ -63,11 +56,14 @@ func (r *Replica) openRevisionFile(isCreate bool) error { return err } -func (r *Replica) initRevisionCounter(ctx context.Context) error { +func (r *Replica) initRevisionCounter() error { if r.readOnly { return nil } + r.revisionLock.Lock() + defer r.revisionLock.Unlock() + if _, err := os.Stat(r.diskPath(revisionCounterFile)); err != nil { if !os.IsNotExist(err) { return err @@ -87,31 +83,11 @@ func (r *Replica) initRevisionCounter(ctx context.Context) error { if err != nil { return err } - // To avoid read from disk, apply atomic operations against the internal cache r.revisionCache every time counter needs to be updated - r.revisionCache.Swap(counter) - - go func() { - if r.revisionCounterDisabled { - return - } - var err error - for { - select { - case <-ctx.Done(): - return - case <-r.revisionCounterReqChan: - err = r.writeRevisionCounter(r.revisionCache.Load() + 1) - r.revisionCounterAckChan <- err - if err != nil { - close(r.revisionCounterAckChan) - return - } else { - r.revisionCache.Add(1) - } - } - } - }() - + // Don't use r.revisionCache directly + // r.revisionCache is an internal cache, to avoid read from disk + // every time when counter needs to be updated. + // And it's protected by revisionLock + r.revisionCache = counter return nil } @@ -120,17 +96,50 @@ func (r *Replica) IsRevCounterDisabled() bool { } func (r *Replica) GetRevisionCounter() int64 { - return r.revisionCache.Load() + r.revisionLock.Lock() + defer r.revisionLock.Unlock() + + counter, err := r.readRevisionCounter() + if err != nil { + logrus.WithError(err).Error("Failed to get revision counter") + // -1 will result in the replica to be discarded + return -1 + } + r.revisionCache = counter + return counter } -// SetRevisionCounter can be invoked only when there is no pending IO. -// Typically, its caller, the engine process, will hold the lock before calling this function. -// And the engine lock holding means all writable replicas finished their IO. -// In other words, the engine lock holding means there is no pending IO. func (r *Replica) SetRevisionCounter(counter int64) error { + r.revisionLock.Lock() + defer r.revisionLock.Unlock() + if err := r.writeRevisionCounter(counter); err != nil { return err } - r.revisionCache.Swap(counter) + + r.revisionCache = counter + return nil +} + +func (r *Replica) increaseRevisionCounter() error { + r.revisionLock.Lock() + defer r.revisionLock.Unlock() + + if !r.revisionRefreshed { + counter, err := r.readRevisionCounter() + if err != nil { + return err + } + logrus.Infof("Reloading the revision counter before processing the first write, the current revision cache is %v, the latest revision counter in file is %v", + r.revisionCache, counter) + r.revisionCache = counter + r.revisionRefreshed = true + } + + if err := r.writeRevisionCounter(r.revisionCache + 1); err != nil { + return err + } + + r.revisionCache++ return nil } diff --git a/vendor/github.com/longhorn/longhorn-engine/pkg/replica/server.go b/vendor/github.com/longhorn/longhorn-engine/pkg/replica/server.go index c1ce6094d..220bafa04 100644 --- a/vendor/github.com/longhorn/longhorn-engine/pkg/replica/server.go +++ b/vendor/github.com/longhorn/longhorn-engine/pkg/replica/server.go @@ -1,7 +1,6 @@ package replica import ( - "context" "fmt" "os" "sync" @@ -14,27 +13,21 @@ import ( type Server struct { sync.RWMutex - ctx context.Context r *Replica dir string sectorSize int64 backing *backingfile.BackingFile revisionCounterDisabled bool unmapMarkDiskChainRemoved bool - snapshotMaxCount int - snapshotMaxSize int64 } -func NewServer(ctx context.Context, dir string, backing *backingfile.BackingFile, sectorSize int64, disableRevCounter, unmapMarkDiskChainRemoved bool, snapshotMaxCount int, snapshotMaxSize int64) *Server { +func NewServer(dir string, backing *backingfile.BackingFile, sectorSize int64, disableRevCounter, unmapMarkDiskChainRemoved bool) *Server { return &Server{ - ctx: ctx, dir: dir, backing: backing, sectorSize: sectorSize, revisionCounterDisabled: disableRevCounter, unmapMarkDiskChainRemoved: unmapMarkDiskChainRemoved, - snapshotMaxCount: snapshotMaxCount, - snapshotMaxSize: snapshotMaxSize, } } @@ -57,7 +50,7 @@ func (s *Server) Create(size int64) error { sectorSize := s.getSectorSize() logrus.Infof("Creating replica %s, size %d/%d", s.dir, size, sectorSize) - r, err := New(s.ctx, size, sectorSize, s.dir, s.backing, s.revisionCounterDisabled, s.unmapMarkDiskChainRemoved, s.snapshotMaxCount, s.snapshotMaxSize) + r, err := New(size, sectorSize, s.dir, s.backing, s.revisionCounterDisabled, s.unmapMarkDiskChainRemoved) if err != nil { return err } @@ -77,7 +70,7 @@ func (s *Server) Open() error { sectorSize := s.getSectorSize() logrus.Infof("Opening replica: dir %s, size %d, sector size %d", s.dir, info.Size, sectorSize) - r, err := New(s.ctx, info.Size, sectorSize, s.dir, s.backing, s.revisionCounterDisabled, s.unmapMarkDiskChainRemoved, s.snapshotMaxCount, s.snapshotMaxSize) + r, err := New(info.Size, sectorSize, s.dir, s.backing, s.revisionCounterDisabled, s.unmapMarkDiskChainRemoved) if err != nil { return err } @@ -198,26 +191,8 @@ func (s *Server) SetUnmapMarkDiskChainRemoved(enabled bool) { if s.r != nil { s.r.SetUnmapMarkDiskChainRemoved(enabled) } -} - -func (s *Server) SetSnapshotMaxCount(count int) { - s.Lock() - defer s.Unlock() - s.snapshotMaxCount = count - if s.r != nil { - s.r.SetSnapshotMaxCount(count) - } -} - -func (s *Server) SetSnapshotMaxSize(size int64) { - s.Lock() - defer s.Unlock() - - s.snapshotMaxSize = size - if s.r != nil { - s.r.SetSnapshotMaxSize(size) - } + return } func (s *Server) Expand(size int64) error { diff --git a/vendor/github.com/longhorn/longhorn-engine/pkg/sync/backup.go b/vendor/github.com/longhorn/longhorn-engine/pkg/sync/backup.go index 0eb15dced..8255adf4f 100644 --- a/vendor/github.com/longhorn/longhorn-engine/pkg/sync/backup.go +++ b/vendor/github.com/longhorn/longhorn-engine/pkg/sync/backup.go @@ -44,7 +44,7 @@ type RestoreStatus struct { } func (t *Task) CreateBackup(backupName, snapshot, dest, backingImageName, backingImageChecksum string, - compressionMethod string, concurrentLimit int, storageClassName string, labels []string, credential map[string]string, parameters map[string]string) (*BackupCreateInfo, error) { + compressionMethod string, concurrentLimit int, storageClassName string, labels []string, credential map[string]string) (*BackupCreateInfo, error) { if snapshot == types.VolumeHeadName { return nil, fmt.Errorf("cannot backup the head disk in the chain") } @@ -60,7 +60,7 @@ func (t *Task) CreateBackup(backupName, snapshot, dest, backingImageName, backin } return t.createBackup(replica, backupName, snapshot, dest, volume.Name, backingImageName, backingImageChecksum, - compressionMethod, concurrentLimit, storageClassName, labels, credential, parameters) + compressionMethod, concurrentLimit, storageClassName, labels, credential) } func (t *Task) findRWReplica() (*types.ControllerReplicaInfo, error) { @@ -80,7 +80,7 @@ func (t *Task) findRWReplica() (*types.ControllerReplicaInfo, error) { func (t *Task) createBackup(replicaInController *types.ControllerReplicaInfo, backupName, snapshot, dest, volumeName, backingImageName, backingImageChecksum, compression string, concurrentLimit int, storageClassName string, - labels []string, credential map[string]string, parameters map[string]string) (*BackupCreateInfo, error) { + labels []string, credential map[string]string) (*BackupCreateInfo, error) { if replicaInController.Mode != types.RW { return nil, fmt.Errorf("can only create backup from replica in mode RW, got %s", replicaInController.Mode) } @@ -105,7 +105,7 @@ func (t *Task) createBackup(replicaInController *types.ControllerReplicaInfo, ba logrus.Infof("Backing up %s on %s, to %s", snapshot, replicaInController.Address, dest) reply, err := repClient.CreateBackup(backupName, snapshot, dest, volumeName, backingImageName, backingImageChecksum, - compression, concurrentLimit, storageClassName, labels, credential, parameters) + compression, concurrentLimit, storageClassName, labels, credential) if err != nil { return nil, err } diff --git a/vendor/github.com/longhorn/longhorn-engine/pkg/sync/sync.go b/vendor/github.com/longhorn/longhorn-engine/pkg/sync/sync.go index de80b2d8d..b48ddd46e 100644 --- a/vendor/github.com/longhorn/longhorn-engine/pkg/sync/sync.go +++ b/vendor/github.com/longhorn/longhorn-engine/pkg/sync/sync.go @@ -15,7 +15,7 @@ import ( replicaClient "github.com/longhorn/longhorn-engine/pkg/replica/client" "github.com/longhorn/longhorn-engine/pkg/types" diskutil "github.com/longhorn/longhorn-engine/pkg/util/disk" - "github.com/longhorn/types/pkg/generated/enginerpc" + "github.com/longhorn/longhorn-engine/proto/ptypes" ) type Task struct { @@ -372,37 +372,26 @@ func (t *Task) AddRestoreReplica(volumeSize, volumeCurrentSize int64, address, i return nil } -func (t *Task) checkRestoreReplicaSize(address, instanceName string, volumeSize int64) (err error) { - var ( - replicaCli *replicaClient.ReplicaClient - replicaInfo *types.ReplicaInfo - ) - replicaCli, err = replicaClient.NewReplicaClient(address, t.client.VolumeName, instanceName) +func (t *Task) checkRestoreReplicaSize(address, instanceName string, volumeSize int64) error { + replicaCli, err := replicaClient.NewReplicaClient(address, t.client.VolumeName, instanceName) if err != nil { - return + return err } - defer func() { - if closeErr := replicaCli.CloseReplica(); closeErr != nil { - if err == nil { - err = closeErr - } else { - err = fmt.Errorf("original error: %w, close error: %v", err, closeErr) - } - } - }() + defer replicaCli.CloseReplica() - replicaInfo, err = replicaCli.GetReplica() + replicaInfo, err := replicaCli.GetReplica() if err != nil { - return + return err } replicaSize, err := strconv.ParseInt(replicaInfo.Size, 10, 64) if err != nil { - return + return err } if replicaSize != volumeSize { - err = fmt.Errorf("rebuilding replica size %v is not the same as volume size %v", replicaSize, volumeSize) + return fmt.Errorf("rebuilding replica size %v is not the same as volume size %v", replicaSize, volumeSize) } - return + + return nil } func (t *Task) VerifyRebuildReplica(address, instanceName string) error { @@ -412,7 +401,7 @@ func (t *Task) VerifyRebuildReplica(address, instanceName string) error { return nil } -func (t *Task) AddReplica(volumeSize, volumeCurrentSize int64, address, instanceName string, fileSyncHTTPClientTimeout int, fastSync bool, localSync *types.FileLocalSync, grpcTimeoutSeconds int64) error { +func (t *Task) AddReplica(volumeSize, volumeCurrentSize int64, address, instanceName string, fileSyncHTTPClientTimeout int, fastSync bool) error { volume, err := t.client.VolumeGet() if err != nil { return err @@ -459,7 +448,7 @@ func (t *Task) AddReplica(volumeSize, volumeCurrentSize int64, address, instance return fmt.Errorf("sync file list shouldn't contain volume head") } - if err = toClient.SyncFiles(fromAddress, resp, fileSyncHTTPClientTimeout, fastSync, grpcTimeoutSeconds, localSync); err != nil { + if err = toClient.SyncFiles(fromAddress, resp, fileSyncHTTPClientTimeout, fastSync); err != nil { return err } @@ -808,7 +797,7 @@ func (t *Task) RebuildStatus() (map[string]*ReplicaRebuildStatus, error) { } func CloneSnapshot(engineControllerClient, fromControllerClient *client.ControllerClient, volumeName, fromVolumeName, - snapshotFileName string, exportBackingImageIfExist bool, fileSyncHTTPClientTimeout int, grpcTimeoutSeconds int64) error { + snapshotFileName string, exportBackingImageIfExist bool, fileSyncHTTPClientTimeout int) error { replicas, err := fromControllerClient.ReplicaList() if err != nil { return err @@ -851,7 +840,7 @@ func CloneSnapshot(engineControllerClient, fromControllerClient *client.Controll } defer repClient.Close() if err := repClient.CloneSnapshot(sourceReplica.Address, fromVolumeName, snapshotFileName, - exportBackingImageIfExist, fileSyncHTTPClientTimeout, grpcTimeoutSeconds); err != nil { + exportBackingImageIfExist, fileSyncHTTPClientTimeout); err != nil { syncErrorMap.Store(r.Address, err) } }(r) @@ -1003,7 +992,7 @@ func (t *Task) HashSnapshotStatus(snapshotName string) (map[string]*SnapshotHash defer wg.Done() var err error - var status *enginerpc.SnapshotHashStatusResponse + var status *ptypes.SnapshotHashStatusResponse defer func() { lock.Lock() @@ -1039,10 +1028,10 @@ func (t *Task) HashSnapshotStatus(snapshotName string) (map[string]*SnapshotHash } if ok, err := t.isRebuilding(r); err != nil { - err = errors.Wrapf(err, "cannot get snapshot hashing status of %v", r.Address) // nolint: ineffassign,staticcheck + err = errors.Wrapf(err, "cannot get snapshot hashing status of %v", r.Address) return } else if ok { - err = fmt.Errorf("replica %v is rebuilding", r.Address) // nolint: ineffassign,staticcheck + err = fmt.Errorf("replica %v is rebuilding", r.Address) return } diff --git a/vendor/github.com/longhorn/longhorn-engine/pkg/types/resource.go b/vendor/github.com/longhorn/longhorn-engine/pkg/types/resource.go index 19e6744df..a8b7767f6 100644 --- a/vendor/github.com/longhorn/longhorn-engine/pkg/types/resource.go +++ b/vendor/github.com/longhorn/longhorn-engine/pkg/types/resource.go @@ -17,8 +17,6 @@ type ReplicaInfo struct { HeadFileSize int64 `json:"headfilesize"` RevisionCounterDisabled bool `json:"revisioncounterdisabled"` UnmapMarkDiskChainRemoved bool `json:"unmapMarkDiskChainRemoved"` - SnapshotCountUsage int `json:"snapshotCountUsage"` - SnapshotSizeUsage int64 `json:"snapshotSizeUsage"` } type DiskInfo struct { @@ -49,8 +47,6 @@ type VolumeInfo struct { LastExpansionError string `json:"lastExpansionError"` LastExpansionFailedAt string `json:"lastExpansionFailedAt"` UnmapMarkSnapChainRemoved bool `json:"unmapMarkSnapChainRemoved"` - SnapshotMaxCount int `json:"snapshotMaxCount"` - SnapshotMaxSize int64 `json:"SnapshotMaxSize"` } type ControllerReplicaInfo struct { diff --git a/vendor/github.com/longhorn/longhorn-engine/pkg/types/types.go b/vendor/github.com/longhorn/longhorn-engine/pkg/types/types.go index 83197a71e..9f1dae264 100644 --- a/vendor/github.com/longhorn/longhorn-engine/pkg/types/types.go +++ b/vendor/github.com/longhorn/longhorn-engine/pkg/types/types.go @@ -4,8 +4,6 @@ import ( "io" "strings" "time" - - "github.com/longhorn/types/pkg/generated/enginerpc" ) const ( @@ -92,6 +90,7 @@ type Backend interface { Expand(size int64) error Size() (int64, error) SectorSize() (int64, error) + RemainSnapshots() (int, error) GetRevisionCounter() (int64, error) SetRevisionCounter(counter int64) error GetState() (string, error) @@ -103,20 +102,10 @@ type Backend interface { GetUnmapMarkSnapChainRemoved() (bool, error) SetUnmapMarkSnapChainRemoved(enabled bool) error ResetRebuild() error - SetSnapshotMaxCount(count int) error - SetSnapshotMaxSize(size int64) error - GetSnapshotCountAndSizeUsage() (int, int64, error) } type BackendFactory interface { - Create(volumeName, address string, dataServerProtocol DataServerProtocol, - sharedTimeouts SharedTimeouts) (Backend, error) -} - -type SharedTimeouts interface { - Increment() - Decrement() - CheckAndDecrement(duration time.Duration) time.Duration + Create(volumeName, address string, dataServerProtocol DataServerProtocol, engineReplicaTimeout time.Duration) (Backend, error) } type Controller interface { @@ -145,8 +134,7 @@ type Replica struct { } type ReplicaSalvageInfo struct { - Address string - LastModifyTime time.Time + LastModifyTime int64 HeadFileSize int64 } @@ -186,32 +174,3 @@ type RWMetrics struct { func IsAlreadyPurgingError(err error) bool { return strings.Contains(err.Error(), "already purging") } - -func ReplicaModeToGRPCReplicaMode(mode Mode) enginerpc.ReplicaMode { - switch mode { - case WO: - return enginerpc.ReplicaMode_WO - case RW: - return enginerpc.ReplicaMode_RW - case ERR: - return enginerpc.ReplicaMode_ERR - } - return enginerpc.ReplicaMode_ERR -} - -func GRPCReplicaModeToReplicaMode(replicaMode enginerpc.ReplicaMode) Mode { - switch replicaMode { - case enginerpc.ReplicaMode_WO: - return WO - case enginerpc.ReplicaMode_RW: - return RW - case enginerpc.ReplicaMode_ERR: - return ERR - } - return ERR -} - -type FileLocalSync struct { - SourcePath string - TargetPath string -} diff --git a/vendor/github.com/longhorn/longhorn-engine/pkg/util/fsfreeze.go b/vendor/github.com/longhorn/longhorn-engine/pkg/util/fsfreeze.go deleted file mode 100644 index 64028365a..000000000 --- a/vendor/github.com/longhorn/longhorn-engine/pkg/util/fsfreeze.go +++ /dev/null @@ -1,153 +0,0 @@ -package util - -import ( - "io/fs" - "path/filepath" - "strings" - "time" - - "github.com/pkg/errors" - "github.com/sirupsen/logrus" - "k8s.io/mount-utils" - - lhexec "github.com/longhorn/go-common-libs/exec" - "github.com/longhorn/go-common-libs/types" - "github.com/longhorn/go-iscsi-helper/longhorndev" -) - -const ( - binaryFsfreeze = "fsfreeze" - notFrozenErrorSubstring = "Invalid argument" - freezePointDirectory = "/var/lib/longhorn/freeze" // We expect this to be INSIDE the container namespace. - DevicePathPrefix = longhorndev.DevPath - - // If the block device is functioning and the filesystem is frozen, fsfreeze -u immediately returns successfully. - // If the block device is NOT functioning, fsfreeze does not return until I/O errors occur (which can take a long - // time). In certain situations (e.g. when it is executed during an instance-manager shutdown that has already - // stopped the associated replica so that I/Os will eventually time out), waiting can impede the shutdown sequence. - unfreezeTimeout = 5 * time.Second -) - -// GetFreezePointFromDevicePath returns the absolute path to the canonical location we will try to mount a filesystem to -// before freezeing it. -func GetFreezePointFromDevicePath(devicePath string) string { - if devicePath == "" { - return "" - } - return GetFreezePointFromVolumeName(filepath.Base(devicePath)) -} - -// GetFreezePointFromVolumeName returns the absolute path to the canonical location we will try to mount a filesystem to -// before freezeing it. -func GetFreezePointFromVolumeName(volumeName string) string { - if volumeName == "" { - return "" - } - return filepath.Join(freezePointDirectory, volumeName) -} - -// GetDevicePathFromVolumeName mirrors longhorndev.getDev. It returns the device path that go-iscsi-helper will use. -func GetDevicePathFromVolumeName(volumeName string) string { - if volumeName == "" { - return "" - } - return filepath.Join(longhorndev.DevPath, volumeName) -} - -// FreezeFilesystem attempts to freeze the filesystem mounted at freezePoint. -func FreezeFilesystem(freezePoint string, exec lhexec.ExecuteInterface) error { - if exec == nil { - exec = lhexec.NewExecutor() - } - - // fsfreeze cannot be cancelled. Once it is started, we must wait for it to complete. If we do not, unfreeze will - // wait for it anyway. - _, err := exec.Execute([]string{}, binaryFsfreeze, []string{"-f", freezePoint}, types.ExecuteNoTimeout) - if err != nil { - return err - } - return nil -} - -// UnfreezeFilesystem attempts to unfreeze the filesystem mounted at freezePoint. It returns true if it -// successfully unfreezes a filesystem, false if there is no need to unfreeze a filesystem, and an error otherwise. -func UnfreezeFilesystem(freezePoint string, exec lhexec.ExecuteInterface) (bool, error) { - if exec == nil { - exec = lhexec.NewExecutor() - } - - _, err := exec.Execute([]string{}, binaryFsfreeze, []string{"-u", freezePoint}, unfreezeTimeout) - if err == nil { - return true, nil - } - if strings.Contains(err.Error(), notFrozenErrorSubstring) { - return false, nil - } - // It the error message is related to a timeout, there is a decent chance the unfreeze will eventually be - // successful. While we stop waiting for the unfreeze to complete, the unfreeze process itself cannot be killed. - // This usually indicates the kernel is locked up waiting for I/O errors to be returned for an iSCSI device that can - // no longer be reached. - return false, err -} - -// UnfreezeAndUnmountFilesystem attempts to unfreeze the filesystem mounted at freezePoint. -func UnfreezeAndUnmountFilesystem(freezePoint string, exec lhexec.ExecuteInterface, - mounter mount.Interface) (bool, error) { - if exec == nil { - exec = lhexec.NewExecutor() - } - if mounter == nil { - mounter = mount.New("") - } - - unfroze, err := UnfreezeFilesystem(freezePoint, exec) - if err != nil { - return unfroze, err - } - return unfroze, mount.CleanupMountPoint(freezePoint, mounter, false) -} - -// UnfreezeFilesystemForDevice attempts to identify a mountPoint for the Longhorn volume and unfreeze it. Under normal -// conditions, it will not find a filesystem, and if it finds a filesystem, it will not be frozen. -// UnfreezeFilesystemForDevice does not return an error if there is nothing to do. UnfreezeFilesystemForDevice is only -// relevant for volumes run with a tgt-blockdev frontend, as only these volumes have a Longhorn device on the node to -// format and mount. -func UnfreezeFilesystemForDevice(devicePath string) error { - // We do not need to switch to the host mount namespace to get mount points here. Usually, longhorn-engine runs in a - // container that has / bind mounted to /host with at least HostToContainer (rslave) propagation. - // - If it does not, we likely can't do a namespace swap anyway, since we don't have access to /host/proc. - // - If it does, we just need to know where in the container we can access the mount points to unfreeze. - mounter := mount.New("") - freezePoint := GetFreezePointFromDevicePath(devicePath) - - // First, try to unfreeze and unmount the expected mount point. - freezePointIsMountPoint, err := mounter.IsMountPoint(freezePoint) - if err != nil && !errors.Is(err, fs.ErrNotExist) { - logrus.WithError(err).Warnf("Failed to determine if %s is a mount point while deciding whether or not to unfreeze", freezePoint) - } - if freezePointIsMountPoint { - unfroze, err := UnfreezeAndUnmountFilesystem(freezePoint, nil, mounter) - if unfroze { - logrus.Warnf("Unfroze filesystem mounted at %v", freezePoint) - } - return err - } - - // If a filesystem is not mounted at the expected mount point, try any other mount point of the device. - mountPoints, err := mounter.List() - if err != nil { - return errors.Wrap(err, "failed to list mount points while deciding whether or not unfreeze") - } - for _, mountPoint := range mountPoints { - if mountPoint.Device == devicePath { - // This one is not ours to unmount. - unfroze, err := UnfreezeFilesystem(mountPoint.Path, nil) - if unfroze { - logrus.Warnf("Unfroze filesystem mounted at %v", freezePoint) - } - return err - } - } - - return nil -} diff --git a/vendor/github.com/longhorn/longhorn-engine/pkg/util/shared_timeouts.go b/vendor/github.com/longhorn/longhorn-engine/pkg/util/shared_timeouts.go deleted file mode 100644 index c609d1cec..000000000 --- a/vendor/github.com/longhorn/longhorn-engine/pkg/util/shared_timeouts.go +++ /dev/null @@ -1,63 +0,0 @@ -package util - -import ( - "sync" - "time" -) - -// SharedTimeouts has the following use case: -// - Multiple goroutines may need to time out eventually. -// - Only the goroutines themselves know if the conditions for a timeout have been met. -// - It is fine for some of the goroutines to time out quickly. -// - The last goroutine should time out more slowly. -// SharedTimeouts implements the types.SharedTimeouts instead of directly defining the concrete type to avoid an import -// loop. -type SharedTimeouts struct { - mutex sync.RWMutex - longTimeout time.Duration - shortTimeout time.Duration - numConsumers int -} - -func NewSharedTimeouts(shortTimeout, longTimeout time.Duration) *SharedTimeouts { - return &SharedTimeouts{ - longTimeout: longTimeout, - shortTimeout: shortTimeout, - } -} - -func (t *SharedTimeouts) Increment() { - t.mutex.Lock() - defer t.mutex.Unlock() - t.numConsumers++ -} - -func (t *SharedTimeouts) Decrement() { - t.mutex.Lock() - defer t.mutex.Unlock() - t.numConsumers-- -} - -// CheckAndDecrement checks if duration exceeds longTimeout or shortTimeout, returns the timeout exceeded (if -// applicable) and decrements numConsumers. -// - shortTimeout is only considered exceeded if there is still one other consumer to wait for longTimeout. -// - The caller MUST take whatever action is required for a timeout if a value > 0 is returned. -func (t *SharedTimeouts) CheckAndDecrement(duration time.Duration) time.Duration { - if duration > t.longTimeout { - t.mutex.Lock() - defer t.mutex.Unlock() - t.numConsumers-- - return t.longTimeout - } - - if duration > t.shortTimeout { - t.mutex.Lock() - defer t.mutex.Unlock() - if t.numConsumers > 1 { - t.numConsumers-- - return t.shortTimeout - } - } - - return 0 -} diff --git a/vendor/github.com/longhorn/longhorn-engine/pkg/util/util.go b/vendor/github.com/longhorn/longhorn-engine/pkg/util/util.go index b97b8de2b..d1e11204f 100644 --- a/vendor/github.com/longhorn/longhorn-engine/pkg/util/util.go +++ b/vendor/github.com/longhorn/longhorn-engine/pkg/util/util.go @@ -14,7 +14,6 @@ import ( "syscall" "time" - "github.com/google/uuid" "github.com/gorilla/handlers" "github.com/sirupsen/logrus" "golang.org/x/sys/unix" @@ -31,8 +30,6 @@ var ( const ( BlockSizeLinux = 512 - - randomIDLenth = 8 ) func ParseAddresses(name string) (string, string, string, int, error) { @@ -50,17 +47,25 @@ func ParseAddresses(name string) (string, string, string, int, error) { } func GetGRPCAddress(address string) string { - address = strings.TrimPrefix(address, "tcp://") + if strings.HasPrefix(address, "tcp://") { + address = strings.TrimPrefix(address, "tcp://") + } - address = strings.TrimPrefix(address, "http://") + if strings.HasPrefix(address, "http://") { + address = strings.TrimPrefix(address, "http://") + } - address = strings.TrimSuffix(address, "/v1") + if strings.HasSuffix(address, "/v1") { + address = strings.TrimSuffix(address, "/v1") + } return address } func GetPortFromAddress(address string) (int, error) { - address = strings.TrimSuffix(address, "/v1") + if strings.HasSuffix(address, "/v1") { + address = strings.TrimSuffix(address, "/v1") + } _, strPort, err := net.SplitHostPort(address) if err != nil { @@ -279,11 +284,3 @@ func GetAddresses(volumeName, address string, dataServerProtocol types.DataServe return "", "", "", -1, fmt.Errorf("unsupported protocol: %v", dataServerProtocol) } } - -func UUID() string { - return uuid.New().String() -} - -func RandomID() string { - return UUID()[:randomIDLenth] -} diff --git a/vendor/github.com/longhorn/longhorn-engine/pkg/util/validation.go b/vendor/github.com/longhorn/longhorn-engine/pkg/util/validation.go index ba44b42f8..341d0934f 100644 --- a/vendor/github.com/longhorn/longhorn-engine/pkg/util/validation.go +++ b/vendor/github.com/longhorn/longhorn-engine/pkg/util/validation.go @@ -67,6 +67,8 @@ func IsQualifiedName(value string) []string { const dns1123LabelFmt string = "[a-z0-9]([-a-z0-9]*[a-z0-9])?" +var dns1123LabelRegexp = regexp.MustCompile("^" + dns1123LabelFmt + "$") + const dns1123SubdomainFmt = dns1123LabelFmt + "(\\." + dns1123LabelFmt + ")*" const dns1123SubdomainErrorMsg string = "a DNS-1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character" diff --git a/vendor/github.com/longhorn/longhorn-engine/proto/ptypes/common.pb.go b/vendor/github.com/longhorn/longhorn-engine/proto/ptypes/common.pb.go new file mode 100644 index 000000000..c8ea52ccc --- /dev/null +++ b/vendor/github.com/longhorn/longhorn-engine/proto/ptypes/common.pb.go @@ -0,0 +1,96 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: common.proto + +package ptypes + +import ( + fmt "fmt" + proto "github.com/golang/protobuf/proto" + math "math" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package + +type SyncFileInfo struct { + FromFileName string `protobuf:"bytes,1,opt,name=from_file_name,json=fromFileName,proto3" json:"from_file_name,omitempty"` + ToFileName string `protobuf:"bytes,2,opt,name=to_file_name,json=toFileName,proto3" json:"to_file_name,omitempty"` + ActualSize int64 `protobuf:"varint,3,opt,name=actual_size,json=actualSize,proto3" json:"actual_size,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SyncFileInfo) Reset() { *m = SyncFileInfo{} } +func (m *SyncFileInfo) String() string { return proto.CompactTextString(m) } +func (*SyncFileInfo) ProtoMessage() {} +func (*SyncFileInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_555bd8c177793206, []int{0} +} + +func (m *SyncFileInfo) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SyncFileInfo.Unmarshal(m, b) +} +func (m *SyncFileInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SyncFileInfo.Marshal(b, m, deterministic) +} +func (m *SyncFileInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_SyncFileInfo.Merge(m, src) +} +func (m *SyncFileInfo) XXX_Size() int { + return xxx_messageInfo_SyncFileInfo.Size(m) +} +func (m *SyncFileInfo) XXX_DiscardUnknown() { + xxx_messageInfo_SyncFileInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_SyncFileInfo proto.InternalMessageInfo + +func (m *SyncFileInfo) GetFromFileName() string { + if m != nil { + return m.FromFileName + } + return "" +} + +func (m *SyncFileInfo) GetToFileName() string { + if m != nil { + return m.ToFileName + } + return "" +} + +func (m *SyncFileInfo) GetActualSize() int64 { + if m != nil { + return m.ActualSize + } + return 0 +} + +func init() { + proto.RegisterType((*SyncFileInfo)(nil), "ptypes.SyncFileInfo") +} + +func init() { proto.RegisterFile("common.proto", fileDescriptor_555bd8c177793206) } + +var fileDescriptor_555bd8c177793206 = []byte{ + // 145 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x49, 0xce, 0xcf, 0xcd, + 0xcd, 0xcf, 0xd3, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x2b, 0x28, 0xa9, 0x2c, 0x48, 0x2d, + 0x56, 0x2a, 0xe7, 0xe2, 0x09, 0xae, 0xcc, 0x4b, 0x76, 0xcb, 0xcc, 0x49, 0xf5, 0xcc, 0x4b, 0xcb, + 0x17, 0x52, 0xe1, 0xe2, 0x4b, 0x2b, 0xca, 0xcf, 0x8d, 0x4f, 0xcb, 0xcc, 0x49, 0x8d, 0xcf, 0x4b, + 0xcc, 0x4d, 0x95, 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x0c, 0xe2, 0x01, 0x89, 0x82, 0x54, 0xf9, 0x25, + 0xe6, 0xa6, 0x0a, 0x29, 0x70, 0xf1, 0x94, 0xe4, 0x23, 0xa9, 0x61, 0x02, 0xab, 0xe1, 0x2a, 0xc9, + 0x87, 0xab, 0x90, 0xe7, 0xe2, 0x4e, 0x4c, 0x2e, 0x29, 0x4d, 0xcc, 0x89, 0x2f, 0xce, 0xac, 0x4a, + 0x95, 0x60, 0x56, 0x60, 0xd4, 0x60, 0x0e, 0xe2, 0x82, 0x08, 0x05, 0x67, 0x56, 0xa5, 0x26, 0xb1, + 0x81, 0xdd, 0x61, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0x53, 0x8d, 0xbe, 0x24, 0x97, 0x00, 0x00, + 0x00, +} diff --git a/vendor/github.com/longhorn/longhorn-engine/proto/ptypes/common.proto b/vendor/github.com/longhorn/longhorn-engine/proto/ptypes/common.proto new file mode 100644 index 000000000..ee412d0ac --- /dev/null +++ b/vendor/github.com/longhorn/longhorn-engine/proto/ptypes/common.proto @@ -0,0 +1,9 @@ +syntax="proto3"; + +package ptypes; + +message SyncFileInfo { + string from_file_name = 1; + string to_file_name = 2; + int64 actual_size = 3; +} \ No newline at end of file diff --git a/vendor/github.com/longhorn/longhorn-engine/proto/ptypes/controller.pb.go b/vendor/github.com/longhorn/longhorn-engine/proto/ptypes/controller.pb.go new file mode 100644 index 000000000..b3d972553 --- /dev/null +++ b/vendor/github.com/longhorn/longhorn-engine/proto/ptypes/controller.pb.go @@ -0,0 +1,1922 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: controller.proto + +package ptypes + +import ( + context "context" + fmt "fmt" + proto "github.com/golang/protobuf/proto" + empty "github.com/golang/protobuf/ptypes/empty" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + math "math" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package + +type ReplicaMode int32 + +const ( + ReplicaMode_WO ReplicaMode = 0 + ReplicaMode_RW ReplicaMode = 1 + ReplicaMode_ERR ReplicaMode = 2 +) + +var ReplicaMode_name = map[int32]string{ + 0: "WO", + 1: "RW", + 2: "ERR", +} + +var ReplicaMode_value = map[string]int32{ + "WO": 0, + "RW": 1, + "ERR": 2, +} + +func (x ReplicaMode) String() string { + return proto.EnumName(ReplicaMode_name, int32(x)) +} + +func (ReplicaMode) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_ed7f10298fa1d90f, []int{0} +} + +type Volume struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Size int64 `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"` + ReplicaCount int32 `protobuf:"varint,3,opt,name=replicaCount,proto3" json:"replicaCount,omitempty"` + Endpoint string `protobuf:"bytes,4,opt,name=endpoint,proto3" json:"endpoint,omitempty"` + Frontend string `protobuf:"bytes,5,opt,name=frontend,proto3" json:"frontend,omitempty"` + FrontendState string `protobuf:"bytes,6,opt,name=frontendState,proto3" json:"frontendState,omitempty"` + IsExpanding bool `protobuf:"varint,7,opt,name=isExpanding,proto3" json:"isExpanding,omitempty"` + LastExpansionError string `protobuf:"bytes,8,opt,name=last_expansion_error,json=lastExpansionError,proto3" json:"last_expansion_error,omitempty"` + LastExpansionFailedAt string `protobuf:"bytes,9,opt,name=last_expansion_failed_at,json=lastExpansionFailedAt,proto3" json:"last_expansion_failed_at,omitempty"` + UnmapMarkSnapChainRemoved bool `protobuf:"varint,10,opt,name=unmap_mark_snap_chain_removed,json=unmapMarkSnapChainRemoved,proto3" json:"unmap_mark_snap_chain_removed,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Volume) Reset() { *m = Volume{} } +func (m *Volume) String() string { return proto.CompactTextString(m) } +func (*Volume) ProtoMessage() {} +func (*Volume) Descriptor() ([]byte, []int) { + return fileDescriptor_ed7f10298fa1d90f, []int{0} +} + +func (m *Volume) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Volume.Unmarshal(m, b) +} +func (m *Volume) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Volume.Marshal(b, m, deterministic) +} +func (m *Volume) XXX_Merge(src proto.Message) { + xxx_messageInfo_Volume.Merge(m, src) +} +func (m *Volume) XXX_Size() int { + return xxx_messageInfo_Volume.Size(m) +} +func (m *Volume) XXX_DiscardUnknown() { + xxx_messageInfo_Volume.DiscardUnknown(m) +} + +var xxx_messageInfo_Volume proto.InternalMessageInfo + +func (m *Volume) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *Volume) GetSize() int64 { + if m != nil { + return m.Size + } + return 0 +} + +func (m *Volume) GetReplicaCount() int32 { + if m != nil { + return m.ReplicaCount + } + return 0 +} + +func (m *Volume) GetEndpoint() string { + if m != nil { + return m.Endpoint + } + return "" +} + +func (m *Volume) GetFrontend() string { + if m != nil { + return m.Frontend + } + return "" +} + +func (m *Volume) GetFrontendState() string { + if m != nil { + return m.FrontendState + } + return "" +} + +func (m *Volume) GetIsExpanding() bool { + if m != nil { + return m.IsExpanding + } + return false +} + +func (m *Volume) GetLastExpansionError() string { + if m != nil { + return m.LastExpansionError + } + return "" +} + +func (m *Volume) GetLastExpansionFailedAt() string { + if m != nil { + return m.LastExpansionFailedAt + } + return "" +} + +func (m *Volume) GetUnmapMarkSnapChainRemoved() bool { + if m != nil { + return m.UnmapMarkSnapChainRemoved + } + return false +} + +type ReplicaAddress struct { + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + InstanceName string `protobuf:"bytes,2,opt,name=instanceName,proto3" json:"instanceName,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ReplicaAddress) Reset() { *m = ReplicaAddress{} } +func (m *ReplicaAddress) String() string { return proto.CompactTextString(m) } +func (*ReplicaAddress) ProtoMessage() {} +func (*ReplicaAddress) Descriptor() ([]byte, []int) { + return fileDescriptor_ed7f10298fa1d90f, []int{1} +} + +func (m *ReplicaAddress) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ReplicaAddress.Unmarshal(m, b) +} +func (m *ReplicaAddress) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ReplicaAddress.Marshal(b, m, deterministic) +} +func (m *ReplicaAddress) XXX_Merge(src proto.Message) { + xxx_messageInfo_ReplicaAddress.Merge(m, src) +} +func (m *ReplicaAddress) XXX_Size() int { + return xxx_messageInfo_ReplicaAddress.Size(m) +} +func (m *ReplicaAddress) XXX_DiscardUnknown() { + xxx_messageInfo_ReplicaAddress.DiscardUnknown(m) +} + +var xxx_messageInfo_ReplicaAddress proto.InternalMessageInfo + +func (m *ReplicaAddress) GetAddress() string { + if m != nil { + return m.Address + } + return "" +} + +func (m *ReplicaAddress) GetInstanceName() string { + if m != nil { + return m.InstanceName + } + return "" +} + +type ControllerReplica struct { + Address *ReplicaAddress `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + Mode ReplicaMode `protobuf:"varint,2,opt,name=mode,proto3,enum=ptypes.ReplicaMode" json:"mode,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ControllerReplica) Reset() { *m = ControllerReplica{} } +func (m *ControllerReplica) String() string { return proto.CompactTextString(m) } +func (*ControllerReplica) ProtoMessage() {} +func (*ControllerReplica) Descriptor() ([]byte, []int) { + return fileDescriptor_ed7f10298fa1d90f, []int{2} +} + +func (m *ControllerReplica) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ControllerReplica.Unmarshal(m, b) +} +func (m *ControllerReplica) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ControllerReplica.Marshal(b, m, deterministic) +} +func (m *ControllerReplica) XXX_Merge(src proto.Message) { + xxx_messageInfo_ControllerReplica.Merge(m, src) +} +func (m *ControllerReplica) XXX_Size() int { + return xxx_messageInfo_ControllerReplica.Size(m) +} +func (m *ControllerReplica) XXX_DiscardUnknown() { + xxx_messageInfo_ControllerReplica.DiscardUnknown(m) +} + +var xxx_messageInfo_ControllerReplica proto.InternalMessageInfo + +func (m *ControllerReplica) GetAddress() *ReplicaAddress { + if m != nil { + return m.Address + } + return nil +} + +func (m *ControllerReplica) GetMode() ReplicaMode { + if m != nil { + return m.Mode + } + return ReplicaMode_WO +} + +type VolumeStartRequest struct { + ReplicaAddresses []string `protobuf:"bytes,1,rep,name=replicaAddresses,proto3" json:"replicaAddresses,omitempty"` + Size int64 `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"` + CurrentSize int64 `protobuf:"varint,3,opt,name=currentSize,proto3" json:"currentSize,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *VolumeStartRequest) Reset() { *m = VolumeStartRequest{} } +func (m *VolumeStartRequest) String() string { return proto.CompactTextString(m) } +func (*VolumeStartRequest) ProtoMessage() {} +func (*VolumeStartRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_ed7f10298fa1d90f, []int{3} +} + +func (m *VolumeStartRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_VolumeStartRequest.Unmarshal(m, b) +} +func (m *VolumeStartRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_VolumeStartRequest.Marshal(b, m, deterministic) +} +func (m *VolumeStartRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_VolumeStartRequest.Merge(m, src) +} +func (m *VolumeStartRequest) XXX_Size() int { + return xxx_messageInfo_VolumeStartRequest.Size(m) +} +func (m *VolumeStartRequest) XXX_DiscardUnknown() { + xxx_messageInfo_VolumeStartRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_VolumeStartRequest proto.InternalMessageInfo + +func (m *VolumeStartRequest) GetReplicaAddresses() []string { + if m != nil { + return m.ReplicaAddresses + } + return nil +} + +func (m *VolumeStartRequest) GetSize() int64 { + if m != nil { + return m.Size + } + return 0 +} + +func (m *VolumeStartRequest) GetCurrentSize() int64 { + if m != nil { + return m.CurrentSize + } + return 0 +} + +type VolumeSnapshotRequest struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Labels map[string]string `protobuf:"bytes,2,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *VolumeSnapshotRequest) Reset() { *m = VolumeSnapshotRequest{} } +func (m *VolumeSnapshotRequest) String() string { return proto.CompactTextString(m) } +func (*VolumeSnapshotRequest) ProtoMessage() {} +func (*VolumeSnapshotRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_ed7f10298fa1d90f, []int{4} +} + +func (m *VolumeSnapshotRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_VolumeSnapshotRequest.Unmarshal(m, b) +} +func (m *VolumeSnapshotRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_VolumeSnapshotRequest.Marshal(b, m, deterministic) +} +func (m *VolumeSnapshotRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_VolumeSnapshotRequest.Merge(m, src) +} +func (m *VolumeSnapshotRequest) XXX_Size() int { + return xxx_messageInfo_VolumeSnapshotRequest.Size(m) +} +func (m *VolumeSnapshotRequest) XXX_DiscardUnknown() { + xxx_messageInfo_VolumeSnapshotRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_VolumeSnapshotRequest proto.InternalMessageInfo + +func (m *VolumeSnapshotRequest) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *VolumeSnapshotRequest) GetLabels() map[string]string { + if m != nil { + return m.Labels + } + return nil +} + +type VolumeSnapshotReply struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *VolumeSnapshotReply) Reset() { *m = VolumeSnapshotReply{} } +func (m *VolumeSnapshotReply) String() string { return proto.CompactTextString(m) } +func (*VolumeSnapshotReply) ProtoMessage() {} +func (*VolumeSnapshotReply) Descriptor() ([]byte, []int) { + return fileDescriptor_ed7f10298fa1d90f, []int{5} +} + +func (m *VolumeSnapshotReply) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_VolumeSnapshotReply.Unmarshal(m, b) +} +func (m *VolumeSnapshotReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_VolumeSnapshotReply.Marshal(b, m, deterministic) +} +func (m *VolumeSnapshotReply) XXX_Merge(src proto.Message) { + xxx_messageInfo_VolumeSnapshotReply.Merge(m, src) +} +func (m *VolumeSnapshotReply) XXX_Size() int { + return xxx_messageInfo_VolumeSnapshotReply.Size(m) +} +func (m *VolumeSnapshotReply) XXX_DiscardUnknown() { + xxx_messageInfo_VolumeSnapshotReply.DiscardUnknown(m) +} + +var xxx_messageInfo_VolumeSnapshotReply proto.InternalMessageInfo + +func (m *VolumeSnapshotReply) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +type VolumeRevertRequest struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *VolumeRevertRequest) Reset() { *m = VolumeRevertRequest{} } +func (m *VolumeRevertRequest) String() string { return proto.CompactTextString(m) } +func (*VolumeRevertRequest) ProtoMessage() {} +func (*VolumeRevertRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_ed7f10298fa1d90f, []int{6} +} + +func (m *VolumeRevertRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_VolumeRevertRequest.Unmarshal(m, b) +} +func (m *VolumeRevertRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_VolumeRevertRequest.Marshal(b, m, deterministic) +} +func (m *VolumeRevertRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_VolumeRevertRequest.Merge(m, src) +} +func (m *VolumeRevertRequest) XXX_Size() int { + return xxx_messageInfo_VolumeRevertRequest.Size(m) +} +func (m *VolumeRevertRequest) XXX_DiscardUnknown() { + xxx_messageInfo_VolumeRevertRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_VolumeRevertRequest proto.InternalMessageInfo + +func (m *VolumeRevertRequest) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +type VolumeExpandRequest struct { + Size int64 `protobuf:"varint,1,opt,name=size,proto3" json:"size,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *VolumeExpandRequest) Reset() { *m = VolumeExpandRequest{} } +func (m *VolumeExpandRequest) String() string { return proto.CompactTextString(m) } +func (*VolumeExpandRequest) ProtoMessage() {} +func (*VolumeExpandRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_ed7f10298fa1d90f, []int{7} +} + +func (m *VolumeExpandRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_VolumeExpandRequest.Unmarshal(m, b) +} +func (m *VolumeExpandRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_VolumeExpandRequest.Marshal(b, m, deterministic) +} +func (m *VolumeExpandRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_VolumeExpandRequest.Merge(m, src) +} +func (m *VolumeExpandRequest) XXX_Size() int { + return xxx_messageInfo_VolumeExpandRequest.Size(m) +} +func (m *VolumeExpandRequest) XXX_DiscardUnknown() { + xxx_messageInfo_VolumeExpandRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_VolumeExpandRequest proto.InternalMessageInfo + +func (m *VolumeExpandRequest) GetSize() int64 { + if m != nil { + return m.Size + } + return 0 +} + +type VolumeFrontendStartRequest struct { + Frontend string `protobuf:"bytes,1,opt,name=frontend,proto3" json:"frontend,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *VolumeFrontendStartRequest) Reset() { *m = VolumeFrontendStartRequest{} } +func (m *VolumeFrontendStartRequest) String() string { return proto.CompactTextString(m) } +func (*VolumeFrontendStartRequest) ProtoMessage() {} +func (*VolumeFrontendStartRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_ed7f10298fa1d90f, []int{8} +} + +func (m *VolumeFrontendStartRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_VolumeFrontendStartRequest.Unmarshal(m, b) +} +func (m *VolumeFrontendStartRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_VolumeFrontendStartRequest.Marshal(b, m, deterministic) +} +func (m *VolumeFrontendStartRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_VolumeFrontendStartRequest.Merge(m, src) +} +func (m *VolumeFrontendStartRequest) XXX_Size() int { + return xxx_messageInfo_VolumeFrontendStartRequest.Size(m) +} +func (m *VolumeFrontendStartRequest) XXX_DiscardUnknown() { + xxx_messageInfo_VolumeFrontendStartRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_VolumeFrontendStartRequest proto.InternalMessageInfo + +func (m *VolumeFrontendStartRequest) GetFrontend() string { + if m != nil { + return m.Frontend + } + return "" +} + +type VolumeUnmapMarkSnapChainRemovedSetRequest struct { + Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *VolumeUnmapMarkSnapChainRemovedSetRequest) Reset() { + *m = VolumeUnmapMarkSnapChainRemovedSetRequest{} +} +func (m *VolumeUnmapMarkSnapChainRemovedSetRequest) String() string { + return proto.CompactTextString(m) +} +func (*VolumeUnmapMarkSnapChainRemovedSetRequest) ProtoMessage() {} +func (*VolumeUnmapMarkSnapChainRemovedSetRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_ed7f10298fa1d90f, []int{9} +} + +func (m *VolumeUnmapMarkSnapChainRemovedSetRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_VolumeUnmapMarkSnapChainRemovedSetRequest.Unmarshal(m, b) +} +func (m *VolumeUnmapMarkSnapChainRemovedSetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_VolumeUnmapMarkSnapChainRemovedSetRequest.Marshal(b, m, deterministic) +} +func (m *VolumeUnmapMarkSnapChainRemovedSetRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_VolumeUnmapMarkSnapChainRemovedSetRequest.Merge(m, src) +} +func (m *VolumeUnmapMarkSnapChainRemovedSetRequest) XXX_Size() int { + return xxx_messageInfo_VolumeUnmapMarkSnapChainRemovedSetRequest.Size(m) +} +func (m *VolumeUnmapMarkSnapChainRemovedSetRequest) XXX_DiscardUnknown() { + xxx_messageInfo_VolumeUnmapMarkSnapChainRemovedSetRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_VolumeUnmapMarkSnapChainRemovedSetRequest proto.InternalMessageInfo + +func (m *VolumeUnmapMarkSnapChainRemovedSetRequest) GetEnabled() bool { + if m != nil { + return m.Enabled + } + return false +} + +type VolumePrepareRestoreRequest struct { + LastRestored string `protobuf:"bytes,1,opt,name=lastRestored,proto3" json:"lastRestored,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *VolumePrepareRestoreRequest) Reset() { *m = VolumePrepareRestoreRequest{} } +func (m *VolumePrepareRestoreRequest) String() string { return proto.CompactTextString(m) } +func (*VolumePrepareRestoreRequest) ProtoMessage() {} +func (*VolumePrepareRestoreRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_ed7f10298fa1d90f, []int{10} +} + +func (m *VolumePrepareRestoreRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_VolumePrepareRestoreRequest.Unmarshal(m, b) +} +func (m *VolumePrepareRestoreRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_VolumePrepareRestoreRequest.Marshal(b, m, deterministic) +} +func (m *VolumePrepareRestoreRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_VolumePrepareRestoreRequest.Merge(m, src) +} +func (m *VolumePrepareRestoreRequest) XXX_Size() int { + return xxx_messageInfo_VolumePrepareRestoreRequest.Size(m) +} +func (m *VolumePrepareRestoreRequest) XXX_DiscardUnknown() { + xxx_messageInfo_VolumePrepareRestoreRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_VolumePrepareRestoreRequest proto.InternalMessageInfo + +func (m *VolumePrepareRestoreRequest) GetLastRestored() string { + if m != nil { + return m.LastRestored + } + return "" +} + +type VolumeFinishRestoreRequest struct { + CurrentRestored string `protobuf:"bytes,1,opt,name=currentRestored,proto3" json:"currentRestored,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *VolumeFinishRestoreRequest) Reset() { *m = VolumeFinishRestoreRequest{} } +func (m *VolumeFinishRestoreRequest) String() string { return proto.CompactTextString(m) } +func (*VolumeFinishRestoreRequest) ProtoMessage() {} +func (*VolumeFinishRestoreRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_ed7f10298fa1d90f, []int{11} +} + +func (m *VolumeFinishRestoreRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_VolumeFinishRestoreRequest.Unmarshal(m, b) +} +func (m *VolumeFinishRestoreRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_VolumeFinishRestoreRequest.Marshal(b, m, deterministic) +} +func (m *VolumeFinishRestoreRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_VolumeFinishRestoreRequest.Merge(m, src) +} +func (m *VolumeFinishRestoreRequest) XXX_Size() int { + return xxx_messageInfo_VolumeFinishRestoreRequest.Size(m) +} +func (m *VolumeFinishRestoreRequest) XXX_DiscardUnknown() { + xxx_messageInfo_VolumeFinishRestoreRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_VolumeFinishRestoreRequest proto.InternalMessageInfo + +func (m *VolumeFinishRestoreRequest) GetCurrentRestored() string { + if m != nil { + return m.CurrentRestored + } + return "" +} + +type ReplicaListReply struct { + Replicas []*ControllerReplica `protobuf:"bytes,1,rep,name=replicas,proto3" json:"replicas,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ReplicaListReply) Reset() { *m = ReplicaListReply{} } +func (m *ReplicaListReply) String() string { return proto.CompactTextString(m) } +func (*ReplicaListReply) ProtoMessage() {} +func (*ReplicaListReply) Descriptor() ([]byte, []int) { + return fileDescriptor_ed7f10298fa1d90f, []int{12} +} + +func (m *ReplicaListReply) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ReplicaListReply.Unmarshal(m, b) +} +func (m *ReplicaListReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ReplicaListReply.Marshal(b, m, deterministic) +} +func (m *ReplicaListReply) XXX_Merge(src proto.Message) { + xxx_messageInfo_ReplicaListReply.Merge(m, src) +} +func (m *ReplicaListReply) XXX_Size() int { + return xxx_messageInfo_ReplicaListReply.Size(m) +} +func (m *ReplicaListReply) XXX_DiscardUnknown() { + xxx_messageInfo_ReplicaListReply.DiscardUnknown(m) +} + +var xxx_messageInfo_ReplicaListReply proto.InternalMessageInfo + +func (m *ReplicaListReply) GetReplicas() []*ControllerReplica { + if m != nil { + return m.Replicas + } + return nil +} + +type ControllerReplicaCreateRequest struct { + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + SnapshotRequired bool `protobuf:"varint,2,opt,name=snapshot_required,json=snapshotRequired,proto3" json:"snapshot_required,omitempty"` + Mode ReplicaMode `protobuf:"varint,3,opt,name=mode,proto3,enum=ptypes.ReplicaMode" json:"mode,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ControllerReplicaCreateRequest) Reset() { *m = ControllerReplicaCreateRequest{} } +func (m *ControllerReplicaCreateRequest) String() string { return proto.CompactTextString(m) } +func (*ControllerReplicaCreateRequest) ProtoMessage() {} +func (*ControllerReplicaCreateRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_ed7f10298fa1d90f, []int{13} +} + +func (m *ControllerReplicaCreateRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ControllerReplicaCreateRequest.Unmarshal(m, b) +} +func (m *ControllerReplicaCreateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ControllerReplicaCreateRequest.Marshal(b, m, deterministic) +} +func (m *ControllerReplicaCreateRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_ControllerReplicaCreateRequest.Merge(m, src) +} +func (m *ControllerReplicaCreateRequest) XXX_Size() int { + return xxx_messageInfo_ControllerReplicaCreateRequest.Size(m) +} +func (m *ControllerReplicaCreateRequest) XXX_DiscardUnknown() { + xxx_messageInfo_ControllerReplicaCreateRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_ControllerReplicaCreateRequest proto.InternalMessageInfo + +func (m *ControllerReplicaCreateRequest) GetAddress() string { + if m != nil { + return m.Address + } + return "" +} + +func (m *ControllerReplicaCreateRequest) GetSnapshotRequired() bool { + if m != nil { + return m.SnapshotRequired + } + return false +} + +func (m *ControllerReplicaCreateRequest) GetMode() ReplicaMode { + if m != nil { + return m.Mode + } + return ReplicaMode_WO +} + +type ReplicaPrepareRebuildReply struct { + Replica *ControllerReplica `protobuf:"bytes,1,opt,name=replica,proto3" json:"replica,omitempty"` + SyncFileInfoList []*SyncFileInfo `protobuf:"bytes,2,rep,name=sync_file_info_list,json=syncFileInfoList,proto3" json:"sync_file_info_list,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ReplicaPrepareRebuildReply) Reset() { *m = ReplicaPrepareRebuildReply{} } +func (m *ReplicaPrepareRebuildReply) String() string { return proto.CompactTextString(m) } +func (*ReplicaPrepareRebuildReply) ProtoMessage() {} +func (*ReplicaPrepareRebuildReply) Descriptor() ([]byte, []int) { + return fileDescriptor_ed7f10298fa1d90f, []int{14} +} + +func (m *ReplicaPrepareRebuildReply) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ReplicaPrepareRebuildReply.Unmarshal(m, b) +} +func (m *ReplicaPrepareRebuildReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ReplicaPrepareRebuildReply.Marshal(b, m, deterministic) +} +func (m *ReplicaPrepareRebuildReply) XXX_Merge(src proto.Message) { + xxx_messageInfo_ReplicaPrepareRebuildReply.Merge(m, src) +} +func (m *ReplicaPrepareRebuildReply) XXX_Size() int { + return xxx_messageInfo_ReplicaPrepareRebuildReply.Size(m) +} +func (m *ReplicaPrepareRebuildReply) XXX_DiscardUnknown() { + xxx_messageInfo_ReplicaPrepareRebuildReply.DiscardUnknown(m) +} + +var xxx_messageInfo_ReplicaPrepareRebuildReply proto.InternalMessageInfo + +func (m *ReplicaPrepareRebuildReply) GetReplica() *ControllerReplica { + if m != nil { + return m.Replica + } + return nil +} + +func (m *ReplicaPrepareRebuildReply) GetSyncFileInfoList() []*SyncFileInfo { + if m != nil { + return m.SyncFileInfoList + } + return nil +} + +type JournalListRequest struct { + Limit int64 `protobuf:"varint,1,opt,name=limit,proto3" json:"limit,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *JournalListRequest) Reset() { *m = JournalListRequest{} } +func (m *JournalListRequest) String() string { return proto.CompactTextString(m) } +func (*JournalListRequest) ProtoMessage() {} +func (*JournalListRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_ed7f10298fa1d90f, []int{15} +} + +func (m *JournalListRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_JournalListRequest.Unmarshal(m, b) +} +func (m *JournalListRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_JournalListRequest.Marshal(b, m, deterministic) +} +func (m *JournalListRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_JournalListRequest.Merge(m, src) +} +func (m *JournalListRequest) XXX_Size() int { + return xxx_messageInfo_JournalListRequest.Size(m) +} +func (m *JournalListRequest) XXX_DiscardUnknown() { + xxx_messageInfo_JournalListRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_JournalListRequest proto.InternalMessageInfo + +func (m *JournalListRequest) GetLimit() int64 { + if m != nil { + return m.Limit + } + return 0 +} + +type VersionOutput struct { + Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` + GitCommit string `protobuf:"bytes,2,opt,name=gitCommit,proto3" json:"gitCommit,omitempty"` + BuildDate string `protobuf:"bytes,3,opt,name=buildDate,proto3" json:"buildDate,omitempty"` + CliAPIVersion int64 `protobuf:"varint,4,opt,name=cliAPIVersion,proto3" json:"cliAPIVersion,omitempty"` + CliAPIMinVersion int64 `protobuf:"varint,5,opt,name=cliAPIMinVersion,proto3" json:"cliAPIMinVersion,omitempty"` + ControllerAPIVersion int64 `protobuf:"varint,6,opt,name=controllerAPIVersion,proto3" json:"controllerAPIVersion,omitempty"` + ControllerAPIMinVersion int64 `protobuf:"varint,7,opt,name=controllerAPIMinVersion,proto3" json:"controllerAPIMinVersion,omitempty"` + DataFormatVersion int64 `protobuf:"varint,8,opt,name=dataFormatVersion,proto3" json:"dataFormatVersion,omitempty"` + DataFormatMinVersion int64 `protobuf:"varint,9,opt,name=dataFormatMinVersion,proto3" json:"dataFormatMinVersion,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *VersionOutput) Reset() { *m = VersionOutput{} } +func (m *VersionOutput) String() string { return proto.CompactTextString(m) } +func (*VersionOutput) ProtoMessage() {} +func (*VersionOutput) Descriptor() ([]byte, []int) { + return fileDescriptor_ed7f10298fa1d90f, []int{16} +} + +func (m *VersionOutput) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_VersionOutput.Unmarshal(m, b) +} +func (m *VersionOutput) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_VersionOutput.Marshal(b, m, deterministic) +} +func (m *VersionOutput) XXX_Merge(src proto.Message) { + xxx_messageInfo_VersionOutput.Merge(m, src) +} +func (m *VersionOutput) XXX_Size() int { + return xxx_messageInfo_VersionOutput.Size(m) +} +func (m *VersionOutput) XXX_DiscardUnknown() { + xxx_messageInfo_VersionOutput.DiscardUnknown(m) +} + +var xxx_messageInfo_VersionOutput proto.InternalMessageInfo + +func (m *VersionOutput) GetVersion() string { + if m != nil { + return m.Version + } + return "" +} + +func (m *VersionOutput) GetGitCommit() string { + if m != nil { + return m.GitCommit + } + return "" +} + +func (m *VersionOutput) GetBuildDate() string { + if m != nil { + return m.BuildDate + } + return "" +} + +func (m *VersionOutput) GetCliAPIVersion() int64 { + if m != nil { + return m.CliAPIVersion + } + return 0 +} + +func (m *VersionOutput) GetCliAPIMinVersion() int64 { + if m != nil { + return m.CliAPIMinVersion + } + return 0 +} + +func (m *VersionOutput) GetControllerAPIVersion() int64 { + if m != nil { + return m.ControllerAPIVersion + } + return 0 +} + +func (m *VersionOutput) GetControllerAPIMinVersion() int64 { + if m != nil { + return m.ControllerAPIMinVersion + } + return 0 +} + +func (m *VersionOutput) GetDataFormatVersion() int64 { + if m != nil { + return m.DataFormatVersion + } + return 0 +} + +func (m *VersionOutput) GetDataFormatMinVersion() int64 { + if m != nil { + return m.DataFormatMinVersion + } + return 0 +} + +type VersionDetailGetReply struct { + Version *VersionOutput `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *VersionDetailGetReply) Reset() { *m = VersionDetailGetReply{} } +func (m *VersionDetailGetReply) String() string { return proto.CompactTextString(m) } +func (*VersionDetailGetReply) ProtoMessage() {} +func (*VersionDetailGetReply) Descriptor() ([]byte, []int) { + return fileDescriptor_ed7f10298fa1d90f, []int{17} +} + +func (m *VersionDetailGetReply) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_VersionDetailGetReply.Unmarshal(m, b) +} +func (m *VersionDetailGetReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_VersionDetailGetReply.Marshal(b, m, deterministic) +} +func (m *VersionDetailGetReply) XXX_Merge(src proto.Message) { + xxx_messageInfo_VersionDetailGetReply.Merge(m, src) +} +func (m *VersionDetailGetReply) XXX_Size() int { + return xxx_messageInfo_VersionDetailGetReply.Size(m) +} +func (m *VersionDetailGetReply) XXX_DiscardUnknown() { + xxx_messageInfo_VersionDetailGetReply.DiscardUnknown(m) +} + +var xxx_messageInfo_VersionDetailGetReply proto.InternalMessageInfo + +func (m *VersionDetailGetReply) GetVersion() *VersionOutput { + if m != nil { + return m.Version + } + return nil +} + +type Metrics struct { + ReadThroughput uint64 `protobuf:"varint,1,opt,name=readThroughput,proto3" json:"readThroughput,omitempty"` + WriteThroughput uint64 `protobuf:"varint,2,opt,name=writeThroughput,proto3" json:"writeThroughput,omitempty"` + ReadLatency uint64 `protobuf:"varint,3,opt,name=readLatency,proto3" json:"readLatency,omitempty"` + WriteLatency uint64 `protobuf:"varint,4,opt,name=writeLatency,proto3" json:"writeLatency,omitempty"` + ReadIOPS uint64 `protobuf:"varint,5,opt,name=readIOPS,proto3" json:"readIOPS,omitempty"` + WriteIOPS uint64 `protobuf:"varint,6,opt,name=writeIOPS,proto3" json:"writeIOPS,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Metrics) Reset() { *m = Metrics{} } +func (m *Metrics) String() string { return proto.CompactTextString(m) } +func (*Metrics) ProtoMessage() {} +func (*Metrics) Descriptor() ([]byte, []int) { + return fileDescriptor_ed7f10298fa1d90f, []int{18} +} + +func (m *Metrics) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Metrics.Unmarshal(m, b) +} +func (m *Metrics) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Metrics.Marshal(b, m, deterministic) +} +func (m *Metrics) XXX_Merge(src proto.Message) { + xxx_messageInfo_Metrics.Merge(m, src) +} +func (m *Metrics) XXX_Size() int { + return xxx_messageInfo_Metrics.Size(m) +} +func (m *Metrics) XXX_DiscardUnknown() { + xxx_messageInfo_Metrics.DiscardUnknown(m) +} + +var xxx_messageInfo_Metrics proto.InternalMessageInfo + +func (m *Metrics) GetReadThroughput() uint64 { + if m != nil { + return m.ReadThroughput + } + return 0 +} + +func (m *Metrics) GetWriteThroughput() uint64 { + if m != nil { + return m.WriteThroughput + } + return 0 +} + +func (m *Metrics) GetReadLatency() uint64 { + if m != nil { + return m.ReadLatency + } + return 0 +} + +func (m *Metrics) GetWriteLatency() uint64 { + if m != nil { + return m.WriteLatency + } + return 0 +} + +func (m *Metrics) GetReadIOPS() uint64 { + if m != nil { + return m.ReadIOPS + } + return 0 +} + +func (m *Metrics) GetWriteIOPS() uint64 { + if m != nil { + return m.WriteIOPS + } + return 0 +} + +type MetricsGetReply struct { + Metrics *Metrics `protobuf:"bytes,1,opt,name=metrics,proto3" json:"metrics,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MetricsGetReply) Reset() { *m = MetricsGetReply{} } +func (m *MetricsGetReply) String() string { return proto.CompactTextString(m) } +func (*MetricsGetReply) ProtoMessage() {} +func (*MetricsGetReply) Descriptor() ([]byte, []int) { + return fileDescriptor_ed7f10298fa1d90f, []int{19} +} + +func (m *MetricsGetReply) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MetricsGetReply.Unmarshal(m, b) +} +func (m *MetricsGetReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MetricsGetReply.Marshal(b, m, deterministic) +} +func (m *MetricsGetReply) XXX_Merge(src proto.Message) { + xxx_messageInfo_MetricsGetReply.Merge(m, src) +} +func (m *MetricsGetReply) XXX_Size() int { + return xxx_messageInfo_MetricsGetReply.Size(m) +} +func (m *MetricsGetReply) XXX_DiscardUnknown() { + xxx_messageInfo_MetricsGetReply.DiscardUnknown(m) +} + +var xxx_messageInfo_MetricsGetReply proto.InternalMessageInfo + +func (m *MetricsGetReply) GetMetrics() *Metrics { + if m != nil { + return m.Metrics + } + return nil +} + +func init() { + proto.RegisterEnum("ptypes.ReplicaMode", ReplicaMode_name, ReplicaMode_value) + proto.RegisterType((*Volume)(nil), "ptypes.Volume") + proto.RegisterType((*ReplicaAddress)(nil), "ptypes.ReplicaAddress") + proto.RegisterType((*ControllerReplica)(nil), "ptypes.ControllerReplica") + proto.RegisterType((*VolumeStartRequest)(nil), "ptypes.VolumeStartRequest") + proto.RegisterType((*VolumeSnapshotRequest)(nil), "ptypes.VolumeSnapshotRequest") + proto.RegisterMapType((map[string]string)(nil), "ptypes.VolumeSnapshotRequest.LabelsEntry") + proto.RegisterType((*VolumeSnapshotReply)(nil), "ptypes.VolumeSnapshotReply") + proto.RegisterType((*VolumeRevertRequest)(nil), "ptypes.VolumeRevertRequest") + proto.RegisterType((*VolumeExpandRequest)(nil), "ptypes.VolumeExpandRequest") + proto.RegisterType((*VolumeFrontendStartRequest)(nil), "ptypes.VolumeFrontendStartRequest") + proto.RegisterType((*VolumeUnmapMarkSnapChainRemovedSetRequest)(nil), "ptypes.VolumeUnmapMarkSnapChainRemovedSetRequest") + proto.RegisterType((*VolumePrepareRestoreRequest)(nil), "ptypes.VolumePrepareRestoreRequest") + proto.RegisterType((*VolumeFinishRestoreRequest)(nil), "ptypes.VolumeFinishRestoreRequest") + proto.RegisterType((*ReplicaListReply)(nil), "ptypes.ReplicaListReply") + proto.RegisterType((*ControllerReplicaCreateRequest)(nil), "ptypes.ControllerReplicaCreateRequest") + proto.RegisterType((*ReplicaPrepareRebuildReply)(nil), "ptypes.ReplicaPrepareRebuildReply") + proto.RegisterType((*JournalListRequest)(nil), "ptypes.JournalListRequest") + proto.RegisterType((*VersionOutput)(nil), "ptypes.VersionOutput") + proto.RegisterType((*VersionDetailGetReply)(nil), "ptypes.VersionDetailGetReply") + proto.RegisterType((*Metrics)(nil), "ptypes.Metrics") + proto.RegisterType((*MetricsGetReply)(nil), "ptypes.MetricsGetReply") +} + +func init() { proto.RegisterFile("controller.proto", fileDescriptor_ed7f10298fa1d90f) } + +var fileDescriptor_ed7f10298fa1d90f = []byte{ + // 1356 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x56, 0x5d, 0x6f, 0x13, 0x47, + 0x17, 0x7e, 0x6d, 0x27, 0x76, 0x72, 0x1c, 0x82, 0x19, 0x12, 0x58, 0xcc, 0x4b, 0x65, 0xad, 0x2a, + 0xea, 0xd0, 0xca, 0x50, 0xa3, 0xaa, 0xa1, 0x1f, 0x82, 0x28, 0x38, 0xd4, 0x55, 0x02, 0x68, 0x5d, + 0xe0, 0xa6, 0x92, 0x35, 0xf1, 0x8e, 0x93, 0x11, 0xeb, 0x99, 0x65, 0x76, 0x36, 0xd4, 0xbd, 0xeb, + 0x55, 0x6f, 0x7b, 0xd5, 0xff, 0xd0, 0x7f, 0xd3, 0xfb, 0xfe, 0x99, 0x6a, 0x3e, 0x76, 0xbd, 0xbb, + 0xf6, 0x06, 0x7a, 0xe5, 0x9d, 0xe7, 0x3c, 0xe7, 0x63, 0xce, 0x9c, 0x99, 0xc7, 0xd0, 0x9a, 0x70, + 0x26, 0x05, 0x0f, 0x02, 0x22, 0x7a, 0xa1, 0xe0, 0x92, 0xa3, 0x7a, 0x28, 0xe7, 0x21, 0x89, 0xda, + 0xb7, 0xcf, 0x38, 0x3f, 0x0b, 0xc8, 0x7d, 0x8d, 0x9e, 0xc6, 0xd3, 0xfb, 0x64, 0x16, 0xca, 0xb9, + 0x21, 0xb5, 0xb7, 0x26, 0x7c, 0x36, 0xe3, 0xcc, 0xac, 0xdc, 0xdf, 0x6a, 0x50, 0x7f, 0xcd, 0x83, + 0x78, 0x46, 0x10, 0x82, 0x35, 0x86, 0x67, 0xc4, 0xa9, 0x74, 0x2a, 0xdd, 0x4d, 0x4f, 0x7f, 0x2b, + 0x2c, 0xa2, 0xbf, 0x12, 0xa7, 0xda, 0xa9, 0x74, 0x6b, 0x9e, 0xfe, 0x46, 0x2e, 0x6c, 0x09, 0x12, + 0x06, 0x74, 0x82, 0x0f, 0x79, 0xcc, 0xa4, 0x53, 0xeb, 0x54, 0xba, 0xeb, 0x5e, 0x0e, 0x43, 0x6d, + 0xd8, 0x20, 0xcc, 0x0f, 0x39, 0x65, 0xd2, 0x59, 0xd3, 0xf1, 0xd2, 0xb5, 0xb2, 0x4d, 0x05, 0x67, + 0x92, 0x30, 0xdf, 0x59, 0x37, 0xb6, 0x64, 0x8d, 0x3e, 0x85, 0x2b, 0xc9, 0xf7, 0x48, 0x62, 0x49, + 0x9c, 0xba, 0x26, 0xe4, 0x41, 0xd4, 0x81, 0x26, 0x8d, 0x06, 0xbf, 0x84, 0x98, 0xf9, 0x94, 0x9d, + 0x39, 0x8d, 0x4e, 0xa5, 0xbb, 0xe1, 0x65, 0x21, 0xf4, 0x00, 0x76, 0x02, 0x1c, 0xc9, 0x31, 0x51, + 0x48, 0x44, 0x39, 0x1b, 0x13, 0x21, 0xb8, 0x70, 0x36, 0x74, 0x38, 0xa4, 0x6c, 0x83, 0xc4, 0x34, + 0x50, 0x16, 0xf4, 0x35, 0x38, 0x05, 0x8f, 0x29, 0xa6, 0x01, 0xf1, 0xc7, 0x58, 0x3a, 0x9b, 0xda, + 0x6b, 0x37, 0xe7, 0x75, 0xa4, 0xad, 0x07, 0x12, 0x3d, 0x81, 0x3b, 0x31, 0x9b, 0xe1, 0x70, 0x3c, + 0xc3, 0xe2, 0xed, 0x38, 0x62, 0x38, 0x1c, 0x4f, 0xce, 0x31, 0x65, 0x63, 0x41, 0x66, 0xfc, 0x82, + 0xf8, 0x0e, 0xe8, 0xf2, 0x6e, 0x69, 0xd2, 0x09, 0x16, 0x6f, 0x47, 0x0c, 0x87, 0x87, 0x8a, 0xe1, + 0x19, 0x82, 0xfb, 0x1c, 0xb6, 0x3d, 0xd3, 0xbc, 0x03, 0xdf, 0x17, 0x24, 0x8a, 0x90, 0x03, 0x0d, + 0x6c, 0x3e, 0xed, 0x69, 0x24, 0x4b, 0xd5, 0x7c, 0xca, 0x22, 0x89, 0xd9, 0x84, 0x3c, 0x57, 0x87, + 0x55, 0xd5, 0xe6, 0x1c, 0xe6, 0x32, 0xb8, 0x76, 0x98, 0x8e, 0x86, 0x8d, 0x8c, 0x1e, 0xe4, 0x43, + 0x36, 0xfb, 0x37, 0x7a, 0x66, 0x5a, 0x7a, 0xf9, 0xdc, 0x8b, 0x54, 0x9f, 0xc1, 0xda, 0x8c, 0xfb, + 0x26, 0xc5, 0x76, 0xff, 0x7a, 0x81, 0x7e, 0xc2, 0x7d, 0xe2, 0x69, 0x82, 0x7b, 0x01, 0xc8, 0x8c, + 0xd0, 0x48, 0x62, 0x21, 0x3d, 0xf2, 0x2e, 0x26, 0x91, 0x44, 0xf7, 0xa0, 0x25, 0x72, 0x91, 0x89, + 0xca, 0x5c, 0xeb, 0x6e, 0x7a, 0x4b, 0xf8, 0xca, 0x31, 0xeb, 0x40, 0x73, 0x12, 0x0b, 0x41, 0x98, + 0x1c, 0x29, 0x53, 0x4d, 0x9b, 0xb2, 0x90, 0xfb, 0x57, 0x05, 0x76, 0x6d, 0x62, 0x86, 0xc3, 0xe8, + 0x9c, 0xa7, 0xb9, 0x57, 0x8d, 0xf2, 0x01, 0xd4, 0x03, 0x7c, 0x4a, 0x82, 0xc8, 0xa9, 0x76, 0x6a, + 0xdd, 0x66, 0x7f, 0x2f, 0xd9, 0xd0, 0xca, 0x10, 0xbd, 0x63, 0xcd, 0x1d, 0x30, 0x29, 0xe6, 0x9e, + 0x75, 0x6c, 0x3f, 0x82, 0x66, 0x06, 0x46, 0x2d, 0xa8, 0xbd, 0x25, 0x73, 0x9b, 0x44, 0x7d, 0xa2, + 0x1d, 0x58, 0xbf, 0xc0, 0x41, 0x9c, 0x1c, 0x8b, 0x59, 0x7c, 0x53, 0xdd, 0xaf, 0xb8, 0x7b, 0x70, + 0xbd, 0x98, 0x27, 0x0c, 0xe6, 0xab, 0x0a, 0x5d, 0x50, 0x3d, 0x72, 0x41, 0xc4, 0x65, 0x7b, 0x5a, + 0x50, 0xcd, 0xe4, 0x67, 0xa8, 0xba, 0x9d, 0x95, 0x45, 0x3b, 0xdd, 0x7d, 0x68, 0x1b, 0xea, 0xd1, + 0xe2, 0x2a, 0x2d, 0x82, 0x67, 0xef, 0x64, 0x25, 0x7f, 0x27, 0xdd, 0x01, 0xec, 0x19, 0xcf, 0x57, + 0x65, 0x13, 0x3c, 0x22, 0x69, 0x20, 0x07, 0x1a, 0x84, 0xe1, 0xd3, 0x80, 0x98, 0x38, 0x1b, 0x5e, + 0xb2, 0x74, 0x0f, 0xe0, 0xb6, 0x09, 0xf3, 0x52, 0x90, 0x10, 0x0b, 0xe2, 0x91, 0x48, 0x72, 0xf5, + 0x63, 0x1c, 0x5d, 0xd8, 0x52, 0xf7, 0xcb, 0xa2, 0x49, 0x15, 0x39, 0xcc, 0x3d, 0x4a, 0xf7, 0x40, + 0x19, 0x8d, 0xce, 0x0b, 0x11, 0xba, 0x70, 0xd5, 0x4e, 0x47, 0x21, 0x48, 0x11, 0x76, 0x87, 0xd0, + 0xb2, 0x53, 0x7c, 0x4c, 0x23, 0x7b, 0x12, 0x5f, 0xc1, 0x86, 0x1d, 0x4b, 0x33, 0xa6, 0xcd, 0xfe, + 0xad, 0x64, 0x40, 0x96, 0x2e, 0x93, 0x97, 0x52, 0xdd, 0x3f, 0x2a, 0xf0, 0xc9, 0x92, 0xfd, 0x50, + 0x10, 0x2c, 0x49, 0xa6, 0x25, 0x25, 0x97, 0xf9, 0x73, 0xb8, 0x16, 0xd9, 0x71, 0x18, 0x0b, 0xf2, + 0x2e, 0xa6, 0xaa, 0xe6, 0xaa, 0x6e, 0x5b, 0x2b, 0xca, 0xcc, 0xa3, 0xc2, 0xd3, 0xeb, 0x58, 0xfb, + 0xd0, 0x75, 0xfc, 0xb3, 0x02, 0x6d, 0x8b, 0xa6, 0xad, 0x3e, 0x8d, 0x69, 0xe0, 0x9b, 0x8d, 0x3e, + 0x84, 0x86, 0xad, 0xde, 0x3e, 0x04, 0x97, 0xec, 0x33, 0x61, 0xa2, 0x43, 0xb8, 0x1e, 0xcd, 0xd9, + 0x64, 0x3c, 0xa5, 0x01, 0x19, 0x53, 0x36, 0xe5, 0xe3, 0x80, 0x46, 0xd2, 0xde, 0xa4, 0x9d, 0x24, + 0xc0, 0x68, 0xce, 0x26, 0x47, 0x34, 0x20, 0x43, 0x36, 0xe5, 0x5e, 0x2b, 0xca, 0xac, 0x54, 0x9f, + 0xdd, 0x7b, 0x80, 0x7e, 0xe4, 0xb1, 0x60, 0x38, 0x30, 0x6d, 0x37, 0xed, 0xd9, 0x81, 0xf5, 0x80, + 0xce, 0xa8, 0xb4, 0xd3, 0x6a, 0x16, 0xee, 0xef, 0x35, 0xb8, 0xf2, 0x9a, 0x08, 0xf5, 0xd2, 0xbe, + 0x88, 0x65, 0x18, 0xeb, 0x36, 0x5e, 0x18, 0x20, 0x69, 0xa3, 0x5d, 0xa2, 0xff, 0xc3, 0xe6, 0x19, + 0x95, 0x87, 0x7c, 0xa6, 0xa2, 0x98, 0x9b, 0xb7, 0x00, 0x94, 0x55, 0xef, 0xfe, 0xa9, 0x92, 0x93, + 0x9a, 0xb1, 0xa6, 0x80, 0x12, 0x9c, 0x49, 0x40, 0x0f, 0x5e, 0x0e, 0x6d, 0x32, 0xad, 0x56, 0x35, + 0x2f, 0x0f, 0xaa, 0xb7, 0xcc, 0x00, 0x27, 0x94, 0x25, 0xc4, 0x75, 0x4d, 0x5c, 0xc2, 0x51, 0x1f, + 0x76, 0x16, 0xc2, 0x9c, 0x09, 0x5c, 0xd7, 0xfc, 0x95, 0x36, 0xb4, 0x0f, 0x37, 0x73, 0x78, 0x26, + 0x4d, 0x43, 0xbb, 0x95, 0x99, 0xd1, 0x17, 0x70, 0xcd, 0xc7, 0x12, 0x1f, 0x71, 0x31, 0xc3, 0x32, + 0xf1, 0xd9, 0xd0, 0x3e, 0xcb, 0x06, 0x55, 0xdb, 0x02, 0xcc, 0x24, 0xd9, 0x34, 0xb5, 0xad, 0xb2, + 0xb9, 0x3f, 0xc0, 0xae, 0xfd, 0x7c, 0x4a, 0x24, 0xa6, 0xc1, 0x33, 0x62, 0x6f, 0xcc, 0xfd, 0xfc, + 0x81, 0x34, 0xfb, 0xbb, 0xe9, 0x8b, 0x9a, 0x3d, 0xb8, 0xf4, 0x9c, 0xdc, 0x7f, 0x2a, 0xd0, 0x38, + 0x21, 0x52, 0xd0, 0x49, 0x84, 0xee, 0xc2, 0xb6, 0x20, 0xd8, 0xff, 0xe9, 0x5c, 0xf0, 0xf8, 0xec, + 0x3c, 0x8c, 0xcd, 0xf1, 0xaf, 0x79, 0x05, 0x54, 0x5d, 0xea, 0xf7, 0x82, 0x4a, 0x92, 0x21, 0x56, + 0x35, 0xb1, 0x08, 0x2b, 0xbd, 0x50, 0xbe, 0xc7, 0x58, 0x12, 0x36, 0x99, 0xeb, 0x93, 0x5e, 0xf3, + 0xb2, 0x90, 0x7a, 0x62, 0xb4, 0x53, 0x42, 0x59, 0xd3, 0x94, 0x1c, 0xa6, 0x1e, 0x42, 0xe5, 0x32, + 0x7c, 0xf1, 0x72, 0xa4, 0x4f, 0x78, 0xcd, 0x4b, 0xd7, 0x6a, 0x92, 0x34, 0x57, 0x1b, 0xeb, 0xda, + 0xb8, 0x00, 0xdc, 0xef, 0xe0, 0xaa, 0xdd, 0x5c, 0xda, 0xa1, 0x3d, 0x68, 0xcc, 0x0c, 0x64, 0x3b, + 0x74, 0x35, 0xe9, 0x90, 0x65, 0x7a, 0x89, 0xfd, 0xde, 0x5d, 0x68, 0x66, 0x6e, 0x32, 0xaa, 0x43, + 0xf5, 0xcd, 0x8b, 0xd6, 0xff, 0xd4, 0xaf, 0xf7, 0xa6, 0x55, 0x41, 0x0d, 0xa8, 0x0d, 0x3c, 0xaf, + 0x55, 0xed, 0xff, 0x0d, 0x59, 0x71, 0x1f, 0x11, 0x71, 0x41, 0x27, 0x04, 0x3d, 0x84, 0x4d, 0xf3, + 0x30, 0x3e, 0x23, 0x12, 0xdd, 0xe8, 0x99, 0xbf, 0x7f, 0xbd, 0xe4, 0xef, 0x5f, 0x6f, 0xa0, 0xfe, + 0xfe, 0xb5, 0xb7, 0xf3, 0x82, 0x87, 0x1e, 0x41, 0x33, 0x23, 0xdb, 0xa8, 0x5d, 0xd0, 0xc3, 0x8c, + 0x3c, 0x2c, 0xb9, 0xee, 0xc3, 0xb6, 0x65, 0x9d, 0xc7, 0xd2, 0xe7, 0xef, 0xd9, 0x47, 0x27, 0x3d, + 0x4e, 0x3d, 0xed, 0xfb, 0x86, 0xee, 0x5c, 0xaa, 0xc3, 0xed, 0xdb, 0x65, 0x66, 0xd5, 0xe0, 0x6f, + 0x61, 0x2b, 0x2b, 0x95, 0xa8, 0x40, 0xce, 0x09, 0xe8, 0x52, 0x29, 0xa9, 0xb3, 0x11, 0xcf, 0xa2, + 0x73, 0x4e, 0x52, 0x97, 0x9c, 0x87, 0x89, 0xf2, 0xe6, 0xe4, 0x14, 0xb9, 0x79, 0xda, 0x2a, 0xad, + 0x5d, 0x0a, 0xf5, 0x04, 0x6e, 0x14, 0xd8, 0xff, 0xb5, 0xa9, 0x67, 0xe0, 0x7e, 0x58, 0xa1, 0xd1, + 0x97, 0x79, 0xaf, 0x8f, 0x50, 0xf3, 0xa5, 0x44, 0x8f, 0xd3, 0x29, 0x55, 0x2f, 0x78, 0x69, 0x7d, + 0x4e, 0x41, 0x9c, 0x16, 0x2a, 0xfb, 0x18, 0xc0, 0x62, 0x66, 0x52, 0x57, 0xfe, 0x05, 0x6d, 0x97, + 0x2b, 0x12, 0xfa, 0x19, 0x6e, 0x96, 0xc8, 0x2d, 0xba, 0x5b, 0xea, 0x95, 0xd3, 0xe3, 0xcb, 0xa2, + 0x3f, 0x86, 0x2b, 0xf6, 0xf3, 0x29, 0x09, 0x88, 0x24, 0xa5, 0x15, 0x96, 0xec, 0x1c, 0x0d, 0xd2, + 0x00, 0xaf, 0x42, 0x5f, 0x15, 0x55, 0x9e, 0xec, 0xb2, 0x3a, 0x46, 0xb0, 0xbb, 0x52, 0xc1, 0x4b, + 0xeb, 0x71, 0x0b, 0xf8, 0x2a, 0xe1, 0x1f, 0xc2, 0x8e, 0xb5, 0xbe, 0x26, 0x82, 0x4e, 0xe7, 0x1f, + 0x8a, 0x79, 0x49, 0x7d, 0x07, 0xd0, 0xcc, 0x28, 0xf9, 0xe2, 0xe9, 0x58, 0x96, 0xf7, 0xd2, 0x4e, + 0x0d, 0xa1, 0x55, 0x94, 0x95, 0xd2, 0x79, 0xba, 0x53, 0x10, 0x96, 0x82, 0x10, 0x7d, 0x0f, 0xb0, + 0x78, 0x79, 0x4b, 0x83, 0xdc, 0x2c, 0xbc, 0xbd, 0x89, 0xfb, 0x69, 0x5d, 0x13, 0x1f, 0xfe, 0x1b, + 0x00, 0x00, 0xff, 0xff, 0x85, 0x2c, 0x1e, 0x8b, 0x50, 0x0f, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// ControllerServiceClient is the client API for ControllerService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type ControllerServiceClient interface { + VolumeGet(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*Volume, error) + VolumeStart(ctx context.Context, in *VolumeStartRequest, opts ...grpc.CallOption) (*Volume, error) + VolumeShutdown(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*Volume, error) + VolumeSnapshot(ctx context.Context, in *VolumeSnapshotRequest, opts ...grpc.CallOption) (*VolumeSnapshotReply, error) + VolumeRevert(ctx context.Context, in *VolumeRevertRequest, opts ...grpc.CallOption) (*Volume, error) + VolumeExpand(ctx context.Context, in *VolumeExpandRequest, opts ...grpc.CallOption) (*Volume, error) + VolumeFrontendStart(ctx context.Context, in *VolumeFrontendStartRequest, opts ...grpc.CallOption) (*Volume, error) + VolumeFrontendShutdown(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*Volume, error) + VolumeUnmapMarkSnapChainRemovedSet(ctx context.Context, in *VolumeUnmapMarkSnapChainRemovedSetRequest, opts ...grpc.CallOption) (*Volume, error) + ReplicaList(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*ReplicaListReply, error) + ReplicaGet(ctx context.Context, in *ReplicaAddress, opts ...grpc.CallOption) (*ControllerReplica, error) + ControllerReplicaCreate(ctx context.Context, in *ControllerReplicaCreateRequest, opts ...grpc.CallOption) (*ControllerReplica, error) + ReplicaDelete(ctx context.Context, in *ReplicaAddress, opts ...grpc.CallOption) (*empty.Empty, error) + ReplicaUpdate(ctx context.Context, in *ControllerReplica, opts ...grpc.CallOption) (*ControllerReplica, error) + ReplicaPrepareRebuild(ctx context.Context, in *ReplicaAddress, opts ...grpc.CallOption) (*ReplicaPrepareRebuildReply, error) + ReplicaVerifyRebuild(ctx context.Context, in *ReplicaAddress, opts ...grpc.CallOption) (*ControllerReplica, error) + JournalList(ctx context.Context, in *JournalListRequest, opts ...grpc.CallOption) (*empty.Empty, error) + VersionDetailGet(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*VersionDetailGetReply, error) + MetricsGet(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*MetricsGetReply, error) +} + +type controllerServiceClient struct { + cc *grpc.ClientConn +} + +func NewControllerServiceClient(cc *grpc.ClientConn) ControllerServiceClient { + return &controllerServiceClient{cc} +} + +func (c *controllerServiceClient) VolumeGet(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*Volume, error) { + out := new(Volume) + err := c.cc.Invoke(ctx, "/ptypes.ControllerService/VolumeGet", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *controllerServiceClient) VolumeStart(ctx context.Context, in *VolumeStartRequest, opts ...grpc.CallOption) (*Volume, error) { + out := new(Volume) + err := c.cc.Invoke(ctx, "/ptypes.ControllerService/VolumeStart", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *controllerServiceClient) VolumeShutdown(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*Volume, error) { + out := new(Volume) + err := c.cc.Invoke(ctx, "/ptypes.ControllerService/VolumeShutdown", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *controllerServiceClient) VolumeSnapshot(ctx context.Context, in *VolumeSnapshotRequest, opts ...grpc.CallOption) (*VolumeSnapshotReply, error) { + out := new(VolumeSnapshotReply) + err := c.cc.Invoke(ctx, "/ptypes.ControllerService/VolumeSnapshot", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *controllerServiceClient) VolumeRevert(ctx context.Context, in *VolumeRevertRequest, opts ...grpc.CallOption) (*Volume, error) { + out := new(Volume) + err := c.cc.Invoke(ctx, "/ptypes.ControllerService/VolumeRevert", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *controllerServiceClient) VolumeExpand(ctx context.Context, in *VolumeExpandRequest, opts ...grpc.CallOption) (*Volume, error) { + out := new(Volume) + err := c.cc.Invoke(ctx, "/ptypes.ControllerService/VolumeExpand", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *controllerServiceClient) VolumeFrontendStart(ctx context.Context, in *VolumeFrontendStartRequest, opts ...grpc.CallOption) (*Volume, error) { + out := new(Volume) + err := c.cc.Invoke(ctx, "/ptypes.ControllerService/VolumeFrontendStart", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *controllerServiceClient) VolumeFrontendShutdown(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*Volume, error) { + out := new(Volume) + err := c.cc.Invoke(ctx, "/ptypes.ControllerService/VolumeFrontendShutdown", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *controllerServiceClient) VolumeUnmapMarkSnapChainRemovedSet(ctx context.Context, in *VolumeUnmapMarkSnapChainRemovedSetRequest, opts ...grpc.CallOption) (*Volume, error) { + out := new(Volume) + err := c.cc.Invoke(ctx, "/ptypes.ControllerService/VolumeUnmapMarkSnapChainRemovedSet", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *controllerServiceClient) ReplicaList(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*ReplicaListReply, error) { + out := new(ReplicaListReply) + err := c.cc.Invoke(ctx, "/ptypes.ControllerService/ReplicaList", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *controllerServiceClient) ReplicaGet(ctx context.Context, in *ReplicaAddress, opts ...grpc.CallOption) (*ControllerReplica, error) { + out := new(ControllerReplica) + err := c.cc.Invoke(ctx, "/ptypes.ControllerService/ReplicaGet", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *controllerServiceClient) ControllerReplicaCreate(ctx context.Context, in *ControllerReplicaCreateRequest, opts ...grpc.CallOption) (*ControllerReplica, error) { + out := new(ControllerReplica) + err := c.cc.Invoke(ctx, "/ptypes.ControllerService/ControllerReplicaCreate", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *controllerServiceClient) ReplicaDelete(ctx context.Context, in *ReplicaAddress, opts ...grpc.CallOption) (*empty.Empty, error) { + out := new(empty.Empty) + err := c.cc.Invoke(ctx, "/ptypes.ControllerService/ReplicaDelete", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *controllerServiceClient) ReplicaUpdate(ctx context.Context, in *ControllerReplica, opts ...grpc.CallOption) (*ControllerReplica, error) { + out := new(ControllerReplica) + err := c.cc.Invoke(ctx, "/ptypes.ControllerService/ReplicaUpdate", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *controllerServiceClient) ReplicaPrepareRebuild(ctx context.Context, in *ReplicaAddress, opts ...grpc.CallOption) (*ReplicaPrepareRebuildReply, error) { + out := new(ReplicaPrepareRebuildReply) + err := c.cc.Invoke(ctx, "/ptypes.ControllerService/ReplicaPrepareRebuild", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *controllerServiceClient) ReplicaVerifyRebuild(ctx context.Context, in *ReplicaAddress, opts ...grpc.CallOption) (*ControllerReplica, error) { + out := new(ControllerReplica) + err := c.cc.Invoke(ctx, "/ptypes.ControllerService/ReplicaVerifyRebuild", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *controllerServiceClient) JournalList(ctx context.Context, in *JournalListRequest, opts ...grpc.CallOption) (*empty.Empty, error) { + out := new(empty.Empty) + err := c.cc.Invoke(ctx, "/ptypes.ControllerService/JournalList", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *controllerServiceClient) VersionDetailGet(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*VersionDetailGetReply, error) { + out := new(VersionDetailGetReply) + err := c.cc.Invoke(ctx, "/ptypes.ControllerService/VersionDetailGet", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *controllerServiceClient) MetricsGet(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*MetricsGetReply, error) { + out := new(MetricsGetReply) + err := c.cc.Invoke(ctx, "/ptypes.ControllerService/MetricsGet", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// ControllerServiceServer is the server API for ControllerService service. +type ControllerServiceServer interface { + VolumeGet(context.Context, *empty.Empty) (*Volume, error) + VolumeStart(context.Context, *VolumeStartRequest) (*Volume, error) + VolumeShutdown(context.Context, *empty.Empty) (*Volume, error) + VolumeSnapshot(context.Context, *VolumeSnapshotRequest) (*VolumeSnapshotReply, error) + VolumeRevert(context.Context, *VolumeRevertRequest) (*Volume, error) + VolumeExpand(context.Context, *VolumeExpandRequest) (*Volume, error) + VolumeFrontendStart(context.Context, *VolumeFrontendStartRequest) (*Volume, error) + VolumeFrontendShutdown(context.Context, *empty.Empty) (*Volume, error) + VolumeUnmapMarkSnapChainRemovedSet(context.Context, *VolumeUnmapMarkSnapChainRemovedSetRequest) (*Volume, error) + ReplicaList(context.Context, *empty.Empty) (*ReplicaListReply, error) + ReplicaGet(context.Context, *ReplicaAddress) (*ControllerReplica, error) + ControllerReplicaCreate(context.Context, *ControllerReplicaCreateRequest) (*ControllerReplica, error) + ReplicaDelete(context.Context, *ReplicaAddress) (*empty.Empty, error) + ReplicaUpdate(context.Context, *ControllerReplica) (*ControllerReplica, error) + ReplicaPrepareRebuild(context.Context, *ReplicaAddress) (*ReplicaPrepareRebuildReply, error) + ReplicaVerifyRebuild(context.Context, *ReplicaAddress) (*ControllerReplica, error) + JournalList(context.Context, *JournalListRequest) (*empty.Empty, error) + VersionDetailGet(context.Context, *empty.Empty) (*VersionDetailGetReply, error) + MetricsGet(context.Context, *empty.Empty) (*MetricsGetReply, error) +} + +// UnimplementedControllerServiceServer can be embedded to have forward compatible implementations. +type UnimplementedControllerServiceServer struct { +} + +func (*UnimplementedControllerServiceServer) VolumeGet(ctx context.Context, req *empty.Empty) (*Volume, error) { + return nil, status.Errorf(codes.Unimplemented, "method VolumeGet not implemented") +} +func (*UnimplementedControllerServiceServer) VolumeStart(ctx context.Context, req *VolumeStartRequest) (*Volume, error) { + return nil, status.Errorf(codes.Unimplemented, "method VolumeStart not implemented") +} +func (*UnimplementedControllerServiceServer) VolumeShutdown(ctx context.Context, req *empty.Empty) (*Volume, error) { + return nil, status.Errorf(codes.Unimplemented, "method VolumeShutdown not implemented") +} +func (*UnimplementedControllerServiceServer) VolumeSnapshot(ctx context.Context, req *VolumeSnapshotRequest) (*VolumeSnapshotReply, error) { + return nil, status.Errorf(codes.Unimplemented, "method VolumeSnapshot not implemented") +} +func (*UnimplementedControllerServiceServer) VolumeRevert(ctx context.Context, req *VolumeRevertRequest) (*Volume, error) { + return nil, status.Errorf(codes.Unimplemented, "method VolumeRevert not implemented") +} +func (*UnimplementedControllerServiceServer) VolumeExpand(ctx context.Context, req *VolumeExpandRequest) (*Volume, error) { + return nil, status.Errorf(codes.Unimplemented, "method VolumeExpand not implemented") +} +func (*UnimplementedControllerServiceServer) VolumeFrontendStart(ctx context.Context, req *VolumeFrontendStartRequest) (*Volume, error) { + return nil, status.Errorf(codes.Unimplemented, "method VolumeFrontendStart not implemented") +} +func (*UnimplementedControllerServiceServer) VolumeFrontendShutdown(ctx context.Context, req *empty.Empty) (*Volume, error) { + return nil, status.Errorf(codes.Unimplemented, "method VolumeFrontendShutdown not implemented") +} +func (*UnimplementedControllerServiceServer) VolumeUnmapMarkSnapChainRemovedSet(ctx context.Context, req *VolumeUnmapMarkSnapChainRemovedSetRequest) (*Volume, error) { + return nil, status.Errorf(codes.Unimplemented, "method VolumeUnmapMarkSnapChainRemovedSet not implemented") +} +func (*UnimplementedControllerServiceServer) ReplicaList(ctx context.Context, req *empty.Empty) (*ReplicaListReply, error) { + return nil, status.Errorf(codes.Unimplemented, "method ReplicaList not implemented") +} +func (*UnimplementedControllerServiceServer) ReplicaGet(ctx context.Context, req *ReplicaAddress) (*ControllerReplica, error) { + return nil, status.Errorf(codes.Unimplemented, "method ReplicaGet not implemented") +} +func (*UnimplementedControllerServiceServer) ControllerReplicaCreate(ctx context.Context, req *ControllerReplicaCreateRequest) (*ControllerReplica, error) { + return nil, status.Errorf(codes.Unimplemented, "method ControllerReplicaCreate not implemented") +} +func (*UnimplementedControllerServiceServer) ReplicaDelete(ctx context.Context, req *ReplicaAddress) (*empty.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method ReplicaDelete not implemented") +} +func (*UnimplementedControllerServiceServer) ReplicaUpdate(ctx context.Context, req *ControllerReplica) (*ControllerReplica, error) { + return nil, status.Errorf(codes.Unimplemented, "method ReplicaUpdate not implemented") +} +func (*UnimplementedControllerServiceServer) ReplicaPrepareRebuild(ctx context.Context, req *ReplicaAddress) (*ReplicaPrepareRebuildReply, error) { + return nil, status.Errorf(codes.Unimplemented, "method ReplicaPrepareRebuild not implemented") +} +func (*UnimplementedControllerServiceServer) ReplicaVerifyRebuild(ctx context.Context, req *ReplicaAddress) (*ControllerReplica, error) { + return nil, status.Errorf(codes.Unimplemented, "method ReplicaVerifyRebuild not implemented") +} +func (*UnimplementedControllerServiceServer) JournalList(ctx context.Context, req *JournalListRequest) (*empty.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method JournalList not implemented") +} +func (*UnimplementedControllerServiceServer) VersionDetailGet(ctx context.Context, req *empty.Empty) (*VersionDetailGetReply, error) { + return nil, status.Errorf(codes.Unimplemented, "method VersionDetailGet not implemented") +} +func (*UnimplementedControllerServiceServer) MetricsGet(ctx context.Context, req *empty.Empty) (*MetricsGetReply, error) { + return nil, status.Errorf(codes.Unimplemented, "method MetricsGet not implemented") +} + +func RegisterControllerServiceServer(s *grpc.Server, srv ControllerServiceServer) { + s.RegisterService(&_ControllerService_serviceDesc, srv) +} + +func _ControllerService_VolumeGet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(empty.Empty) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ControllerServiceServer).VolumeGet(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ptypes.ControllerService/VolumeGet", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ControllerServiceServer).VolumeGet(ctx, req.(*empty.Empty)) + } + return interceptor(ctx, in, info, handler) +} + +func _ControllerService_VolumeStart_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(VolumeStartRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ControllerServiceServer).VolumeStart(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ptypes.ControllerService/VolumeStart", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ControllerServiceServer).VolumeStart(ctx, req.(*VolumeStartRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ControllerService_VolumeShutdown_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(empty.Empty) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ControllerServiceServer).VolumeShutdown(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ptypes.ControllerService/VolumeShutdown", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ControllerServiceServer).VolumeShutdown(ctx, req.(*empty.Empty)) + } + return interceptor(ctx, in, info, handler) +} + +func _ControllerService_VolumeSnapshot_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(VolumeSnapshotRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ControllerServiceServer).VolumeSnapshot(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ptypes.ControllerService/VolumeSnapshot", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ControllerServiceServer).VolumeSnapshot(ctx, req.(*VolumeSnapshotRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ControllerService_VolumeRevert_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(VolumeRevertRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ControllerServiceServer).VolumeRevert(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ptypes.ControllerService/VolumeRevert", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ControllerServiceServer).VolumeRevert(ctx, req.(*VolumeRevertRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ControllerService_VolumeExpand_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(VolumeExpandRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ControllerServiceServer).VolumeExpand(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ptypes.ControllerService/VolumeExpand", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ControllerServiceServer).VolumeExpand(ctx, req.(*VolumeExpandRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ControllerService_VolumeFrontendStart_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(VolumeFrontendStartRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ControllerServiceServer).VolumeFrontendStart(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ptypes.ControllerService/VolumeFrontendStart", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ControllerServiceServer).VolumeFrontendStart(ctx, req.(*VolumeFrontendStartRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ControllerService_VolumeFrontendShutdown_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(empty.Empty) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ControllerServiceServer).VolumeFrontendShutdown(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ptypes.ControllerService/VolumeFrontendShutdown", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ControllerServiceServer).VolumeFrontendShutdown(ctx, req.(*empty.Empty)) + } + return interceptor(ctx, in, info, handler) +} + +func _ControllerService_VolumeUnmapMarkSnapChainRemovedSet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(VolumeUnmapMarkSnapChainRemovedSetRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ControllerServiceServer).VolumeUnmapMarkSnapChainRemovedSet(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ptypes.ControllerService/VolumeUnmapMarkSnapChainRemovedSet", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ControllerServiceServer).VolumeUnmapMarkSnapChainRemovedSet(ctx, req.(*VolumeUnmapMarkSnapChainRemovedSetRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ControllerService_ReplicaList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(empty.Empty) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ControllerServiceServer).ReplicaList(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ptypes.ControllerService/ReplicaList", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ControllerServiceServer).ReplicaList(ctx, req.(*empty.Empty)) + } + return interceptor(ctx, in, info, handler) +} + +func _ControllerService_ReplicaGet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ReplicaAddress) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ControllerServiceServer).ReplicaGet(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ptypes.ControllerService/ReplicaGet", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ControllerServiceServer).ReplicaGet(ctx, req.(*ReplicaAddress)) + } + return interceptor(ctx, in, info, handler) +} + +func _ControllerService_ControllerReplicaCreate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ControllerReplicaCreateRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ControllerServiceServer).ControllerReplicaCreate(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ptypes.ControllerService/ControllerReplicaCreate", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ControllerServiceServer).ControllerReplicaCreate(ctx, req.(*ControllerReplicaCreateRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ControllerService_ReplicaDelete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ReplicaAddress) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ControllerServiceServer).ReplicaDelete(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ptypes.ControllerService/ReplicaDelete", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ControllerServiceServer).ReplicaDelete(ctx, req.(*ReplicaAddress)) + } + return interceptor(ctx, in, info, handler) +} + +func _ControllerService_ReplicaUpdate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ControllerReplica) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ControllerServiceServer).ReplicaUpdate(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ptypes.ControllerService/ReplicaUpdate", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ControllerServiceServer).ReplicaUpdate(ctx, req.(*ControllerReplica)) + } + return interceptor(ctx, in, info, handler) +} + +func _ControllerService_ReplicaPrepareRebuild_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ReplicaAddress) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ControllerServiceServer).ReplicaPrepareRebuild(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ptypes.ControllerService/ReplicaPrepareRebuild", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ControllerServiceServer).ReplicaPrepareRebuild(ctx, req.(*ReplicaAddress)) + } + return interceptor(ctx, in, info, handler) +} + +func _ControllerService_ReplicaVerifyRebuild_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ReplicaAddress) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ControllerServiceServer).ReplicaVerifyRebuild(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ptypes.ControllerService/ReplicaVerifyRebuild", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ControllerServiceServer).ReplicaVerifyRebuild(ctx, req.(*ReplicaAddress)) + } + return interceptor(ctx, in, info, handler) +} + +func _ControllerService_JournalList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(JournalListRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ControllerServiceServer).JournalList(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ptypes.ControllerService/JournalList", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ControllerServiceServer).JournalList(ctx, req.(*JournalListRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ControllerService_VersionDetailGet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(empty.Empty) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ControllerServiceServer).VersionDetailGet(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ptypes.ControllerService/VersionDetailGet", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ControllerServiceServer).VersionDetailGet(ctx, req.(*empty.Empty)) + } + return interceptor(ctx, in, info, handler) +} + +func _ControllerService_MetricsGet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(empty.Empty) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ControllerServiceServer).MetricsGet(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ptypes.ControllerService/MetricsGet", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ControllerServiceServer).MetricsGet(ctx, req.(*empty.Empty)) + } + return interceptor(ctx, in, info, handler) +} + +var _ControllerService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "ptypes.ControllerService", + HandlerType: (*ControllerServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "VolumeGet", + Handler: _ControllerService_VolumeGet_Handler, + }, + { + MethodName: "VolumeStart", + Handler: _ControllerService_VolumeStart_Handler, + }, + { + MethodName: "VolumeShutdown", + Handler: _ControllerService_VolumeShutdown_Handler, + }, + { + MethodName: "VolumeSnapshot", + Handler: _ControllerService_VolumeSnapshot_Handler, + }, + { + MethodName: "VolumeRevert", + Handler: _ControllerService_VolumeRevert_Handler, + }, + { + MethodName: "VolumeExpand", + Handler: _ControllerService_VolumeExpand_Handler, + }, + { + MethodName: "VolumeFrontendStart", + Handler: _ControllerService_VolumeFrontendStart_Handler, + }, + { + MethodName: "VolumeFrontendShutdown", + Handler: _ControllerService_VolumeFrontendShutdown_Handler, + }, + { + MethodName: "VolumeUnmapMarkSnapChainRemovedSet", + Handler: _ControllerService_VolumeUnmapMarkSnapChainRemovedSet_Handler, + }, + { + MethodName: "ReplicaList", + Handler: _ControllerService_ReplicaList_Handler, + }, + { + MethodName: "ReplicaGet", + Handler: _ControllerService_ReplicaGet_Handler, + }, + { + MethodName: "ControllerReplicaCreate", + Handler: _ControllerService_ControllerReplicaCreate_Handler, + }, + { + MethodName: "ReplicaDelete", + Handler: _ControllerService_ReplicaDelete_Handler, + }, + { + MethodName: "ReplicaUpdate", + Handler: _ControllerService_ReplicaUpdate_Handler, + }, + { + MethodName: "ReplicaPrepareRebuild", + Handler: _ControllerService_ReplicaPrepareRebuild_Handler, + }, + { + MethodName: "ReplicaVerifyRebuild", + Handler: _ControllerService_ReplicaVerifyRebuild_Handler, + }, + { + MethodName: "JournalList", + Handler: _ControllerService_JournalList_Handler, + }, + { + MethodName: "VersionDetailGet", + Handler: _ControllerService_VersionDetailGet_Handler, + }, + { + MethodName: "MetricsGet", + Handler: _ControllerService_MetricsGet_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "controller.proto", +} diff --git a/vendor/github.com/longhorn/longhorn-engine/proto/ptypes/controller.proto b/vendor/github.com/longhorn/longhorn-engine/proto/ptypes/controller.proto new file mode 100644 index 000000000..e1d5226e5 --- /dev/null +++ b/vendor/github.com/longhorn/longhorn-engine/proto/ptypes/controller.proto @@ -0,0 +1,151 @@ +syntax="proto3"; + +package ptypes; + +import "google/protobuf/empty.proto"; +import "common.proto"; + +service ControllerService { + rpc VolumeGet(google.protobuf.Empty) returns (Volume); + rpc VolumeStart(VolumeStartRequest) returns (Volume); + rpc VolumeShutdown(google.protobuf.Empty) returns (Volume); + rpc VolumeSnapshot(VolumeSnapshotRequest) returns (VolumeSnapshotReply); + rpc VolumeRevert(VolumeRevertRequest) returns (Volume); + rpc VolumeExpand(VolumeExpandRequest) returns (Volume); + rpc VolumeFrontendStart(VolumeFrontendStartRequest) returns (Volume); + rpc VolumeFrontendShutdown(google.protobuf.Empty) returns (Volume); + rpc VolumeUnmapMarkSnapChainRemovedSet(VolumeUnmapMarkSnapChainRemovedSetRequest) returns (Volume); + + rpc ReplicaList(google.protobuf.Empty) returns (ReplicaListReply); + rpc ReplicaGet(ReplicaAddress) returns (ControllerReplica); + rpc ControllerReplicaCreate(ControllerReplicaCreateRequest) returns (ControllerReplica); + rpc ReplicaDelete(ReplicaAddress) returns (google.protobuf.Empty); + rpc ReplicaUpdate(ControllerReplica) returns (ControllerReplica); + rpc ReplicaPrepareRebuild(ReplicaAddress) returns (ReplicaPrepareRebuildReply); + rpc ReplicaVerifyRebuild(ReplicaAddress) returns (ControllerReplica); + + rpc JournalList(JournalListRequest) returns (google.protobuf.Empty); + + rpc VersionDetailGet(google.protobuf.Empty) returns(VersionDetailGetReply); + + rpc MetricsGet(google.protobuf.Empty) returns(MetricsGetReply); +} + +message Volume { + string name = 1; + int64 size = 2; + int32 replicaCount = 3; + string endpoint = 4; + string frontend = 5; + string frontendState = 6; + bool isExpanding = 7; + + string last_expansion_error = 8; + string last_expansion_failed_at = 9; + + bool unmap_mark_snap_chain_removed = 10; +} + +message ReplicaAddress { + string address = 1; + string instanceName = 2; +} + +enum ReplicaMode { + WO = 0; + RW = 1; + ERR = 2; +} + +message ControllerReplica { + ReplicaAddress address = 1; + ReplicaMode mode = 2; +} + +message VolumeStartRequest { + repeated string replicaAddresses = 1; + int64 size = 2; + int64 currentSize = 3; +} + +message VolumeSnapshotRequest { + string name = 1; + map labels = 2; +} + +message VolumeSnapshotReply { + string name = 1; +} + +message VolumeRevertRequest { + string name = 1; +} + +message VolumeExpandRequest { + int64 size = 1; +} + +message VolumeFrontendStartRequest { + string frontend = 1; +} + +message VolumeUnmapMarkSnapChainRemovedSetRequest { + bool enabled = 1; +} + +message VolumePrepareRestoreRequest { + string lastRestored = 1; +} + +message VolumeFinishRestoreRequest { + string currentRestored = 1; +} + +message ReplicaListReply { + repeated ControllerReplica replicas = 1; +} + +message ControllerReplicaCreateRequest { + string address = 1; + bool snapshot_required = 2; + ReplicaMode mode = 3; +} + +message ReplicaPrepareRebuildReply { + ControllerReplica replica = 1; + repeated SyncFileInfo sync_file_info_list = 2; +} + +message JournalListRequest { + int64 limit = 1; +} + +message VersionOutput { + string version = 1; + string gitCommit = 2; + string buildDate = 3; + + int64 cliAPIVersion = 4; + int64 cliAPIMinVersion = 5; + int64 controllerAPIVersion = 6; + int64 controllerAPIMinVersion = 7; + int64 dataFormatVersion = 8; + int64 dataFormatMinVersion = 9; +} + +message VersionDetailGetReply { + VersionOutput version = 1; +} + +message Metrics { + uint64 readThroughput = 1; + uint64 writeThroughput = 2; + uint64 readLatency = 3; + uint64 writeLatency = 4; + uint64 readIOPS = 5; + uint64 writeIOPS = 6; +} + +message MetricsGetReply { + Metrics metrics = 1; +} diff --git a/vendor/github.com/longhorn/longhorn-engine/pkg/interceptor/interceptor.go b/vendor/github.com/longhorn/longhorn-engine/proto/ptypes/interceptor.go similarity index 99% rename from vendor/github.com/longhorn/longhorn-engine/pkg/interceptor/interceptor.go rename to vendor/github.com/longhorn/longhorn-engine/proto/ptypes/interceptor.go index 8159ce0a0..18e729229 100644 --- a/vendor/github.com/longhorn/longhorn-engine/pkg/interceptor/interceptor.go +++ b/vendor/github.com/longhorn/longhorn-engine/proto/ptypes/interceptor.go @@ -1,4 +1,4 @@ -package interceptor +package ptypes import ( context "context" diff --git a/vendor/github.com/longhorn/longhorn-engine/proto/ptypes/replica.pb.go b/vendor/github.com/longhorn/longhorn-engine/proto/ptypes/replica.pb.go new file mode 100644 index 000000000..ff021a707 --- /dev/null +++ b/vendor/github.com/longhorn/longhorn-engine/proto/ptypes/replica.pb.go @@ -0,0 +1,2138 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: replica.proto + +package ptypes + +import ( + context "context" + fmt "fmt" + proto "github.com/golang/protobuf/proto" + empty "github.com/golang/protobuf/ptypes/empty" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + math "math" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package + +type ReplicaCreateRequest struct { + Size string `protobuf:"bytes,1,opt,name=size,proto3" json:"size,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ReplicaCreateRequest) Reset() { *m = ReplicaCreateRequest{} } +func (m *ReplicaCreateRequest) String() string { return proto.CompactTextString(m) } +func (*ReplicaCreateRequest) ProtoMessage() {} +func (*ReplicaCreateRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_1e84aa831fb48ea1, []int{0} +} + +func (m *ReplicaCreateRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ReplicaCreateRequest.Unmarshal(m, b) +} +func (m *ReplicaCreateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ReplicaCreateRequest.Marshal(b, m, deterministic) +} +func (m *ReplicaCreateRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_ReplicaCreateRequest.Merge(m, src) +} +func (m *ReplicaCreateRequest) XXX_Size() int { + return xxx_messageInfo_ReplicaCreateRequest.Size(m) +} +func (m *ReplicaCreateRequest) XXX_DiscardUnknown() { + xxx_messageInfo_ReplicaCreateRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_ReplicaCreateRequest proto.InternalMessageInfo + +func (m *ReplicaCreateRequest) GetSize() string { + if m != nil { + return m.Size + } + return "" +} + +type ReplicaCreateResponse struct { + Replica *Replica `protobuf:"bytes,1,opt,name=replica,proto3" json:"replica,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ReplicaCreateResponse) Reset() { *m = ReplicaCreateResponse{} } +func (m *ReplicaCreateResponse) String() string { return proto.CompactTextString(m) } +func (*ReplicaCreateResponse) ProtoMessage() {} +func (*ReplicaCreateResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_1e84aa831fb48ea1, []int{1} +} + +func (m *ReplicaCreateResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ReplicaCreateResponse.Unmarshal(m, b) +} +func (m *ReplicaCreateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ReplicaCreateResponse.Marshal(b, m, deterministic) +} +func (m *ReplicaCreateResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_ReplicaCreateResponse.Merge(m, src) +} +func (m *ReplicaCreateResponse) XXX_Size() int { + return xxx_messageInfo_ReplicaCreateResponse.Size(m) +} +func (m *ReplicaCreateResponse) XXX_DiscardUnknown() { + xxx_messageInfo_ReplicaCreateResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_ReplicaCreateResponse proto.InternalMessageInfo + +func (m *ReplicaCreateResponse) GetReplica() *Replica { + if m != nil { + return m.Replica + } + return nil +} + +type ReplicaGetResponse struct { + Replica *Replica `protobuf:"bytes,1,opt,name=replica,proto3" json:"replica,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ReplicaGetResponse) Reset() { *m = ReplicaGetResponse{} } +func (m *ReplicaGetResponse) String() string { return proto.CompactTextString(m) } +func (*ReplicaGetResponse) ProtoMessage() {} +func (*ReplicaGetResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_1e84aa831fb48ea1, []int{2} +} + +func (m *ReplicaGetResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ReplicaGetResponse.Unmarshal(m, b) +} +func (m *ReplicaGetResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ReplicaGetResponse.Marshal(b, m, deterministic) +} +func (m *ReplicaGetResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_ReplicaGetResponse.Merge(m, src) +} +func (m *ReplicaGetResponse) XXX_Size() int { + return xxx_messageInfo_ReplicaGetResponse.Size(m) +} +func (m *ReplicaGetResponse) XXX_DiscardUnknown() { + xxx_messageInfo_ReplicaGetResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_ReplicaGetResponse proto.InternalMessageInfo + +func (m *ReplicaGetResponse) GetReplica() *Replica { + if m != nil { + return m.Replica + } + return nil +} + +type ReplicaOpenResponse struct { + Replica *Replica `protobuf:"bytes,1,opt,name=replica,proto3" json:"replica,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ReplicaOpenResponse) Reset() { *m = ReplicaOpenResponse{} } +func (m *ReplicaOpenResponse) String() string { return proto.CompactTextString(m) } +func (*ReplicaOpenResponse) ProtoMessage() {} +func (*ReplicaOpenResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_1e84aa831fb48ea1, []int{3} +} + +func (m *ReplicaOpenResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ReplicaOpenResponse.Unmarshal(m, b) +} +func (m *ReplicaOpenResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ReplicaOpenResponse.Marshal(b, m, deterministic) +} +func (m *ReplicaOpenResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_ReplicaOpenResponse.Merge(m, src) +} +func (m *ReplicaOpenResponse) XXX_Size() int { + return xxx_messageInfo_ReplicaOpenResponse.Size(m) +} +func (m *ReplicaOpenResponse) XXX_DiscardUnknown() { + xxx_messageInfo_ReplicaOpenResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_ReplicaOpenResponse proto.InternalMessageInfo + +func (m *ReplicaOpenResponse) GetReplica() *Replica { + if m != nil { + return m.Replica + } + return nil +} + +type ReplicaCloseResponse struct { + Replica *Replica `protobuf:"bytes,1,opt,name=replica,proto3" json:"replica,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ReplicaCloseResponse) Reset() { *m = ReplicaCloseResponse{} } +func (m *ReplicaCloseResponse) String() string { return proto.CompactTextString(m) } +func (*ReplicaCloseResponse) ProtoMessage() {} +func (*ReplicaCloseResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_1e84aa831fb48ea1, []int{4} +} + +func (m *ReplicaCloseResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ReplicaCloseResponse.Unmarshal(m, b) +} +func (m *ReplicaCloseResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ReplicaCloseResponse.Marshal(b, m, deterministic) +} +func (m *ReplicaCloseResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_ReplicaCloseResponse.Merge(m, src) +} +func (m *ReplicaCloseResponse) XXX_Size() int { + return xxx_messageInfo_ReplicaCloseResponse.Size(m) +} +func (m *ReplicaCloseResponse) XXX_DiscardUnknown() { + xxx_messageInfo_ReplicaCloseResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_ReplicaCloseResponse proto.InternalMessageInfo + +func (m *ReplicaCloseResponse) GetReplica() *Replica { + if m != nil { + return m.Replica + } + return nil +} + +type ReplicaReloadResponse struct { + Replica *Replica `protobuf:"bytes,1,opt,name=replica,proto3" json:"replica,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ReplicaReloadResponse) Reset() { *m = ReplicaReloadResponse{} } +func (m *ReplicaReloadResponse) String() string { return proto.CompactTextString(m) } +func (*ReplicaReloadResponse) ProtoMessage() {} +func (*ReplicaReloadResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_1e84aa831fb48ea1, []int{5} +} + +func (m *ReplicaReloadResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ReplicaReloadResponse.Unmarshal(m, b) +} +func (m *ReplicaReloadResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ReplicaReloadResponse.Marshal(b, m, deterministic) +} +func (m *ReplicaReloadResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_ReplicaReloadResponse.Merge(m, src) +} +func (m *ReplicaReloadResponse) XXX_Size() int { + return xxx_messageInfo_ReplicaReloadResponse.Size(m) +} +func (m *ReplicaReloadResponse) XXX_DiscardUnknown() { + xxx_messageInfo_ReplicaReloadResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_ReplicaReloadResponse proto.InternalMessageInfo + +func (m *ReplicaReloadResponse) GetReplica() *Replica { + if m != nil { + return m.Replica + } + return nil +} + +type ReplicaRevertRequest struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Created string `protobuf:"bytes,2,opt,name=created,proto3" json:"created,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ReplicaRevertRequest) Reset() { *m = ReplicaRevertRequest{} } +func (m *ReplicaRevertRequest) String() string { return proto.CompactTextString(m) } +func (*ReplicaRevertRequest) ProtoMessage() {} +func (*ReplicaRevertRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_1e84aa831fb48ea1, []int{6} +} + +func (m *ReplicaRevertRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ReplicaRevertRequest.Unmarshal(m, b) +} +func (m *ReplicaRevertRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ReplicaRevertRequest.Marshal(b, m, deterministic) +} +func (m *ReplicaRevertRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_ReplicaRevertRequest.Merge(m, src) +} +func (m *ReplicaRevertRequest) XXX_Size() int { + return xxx_messageInfo_ReplicaRevertRequest.Size(m) +} +func (m *ReplicaRevertRequest) XXX_DiscardUnknown() { + xxx_messageInfo_ReplicaRevertRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_ReplicaRevertRequest proto.InternalMessageInfo + +func (m *ReplicaRevertRequest) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *ReplicaRevertRequest) GetCreated() string { + if m != nil { + return m.Created + } + return "" +} + +type ReplicaRevertResponse struct { + Replica *Replica `protobuf:"bytes,1,opt,name=replica,proto3" json:"replica,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ReplicaRevertResponse) Reset() { *m = ReplicaRevertResponse{} } +func (m *ReplicaRevertResponse) String() string { return proto.CompactTextString(m) } +func (*ReplicaRevertResponse) ProtoMessage() {} +func (*ReplicaRevertResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_1e84aa831fb48ea1, []int{7} +} + +func (m *ReplicaRevertResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ReplicaRevertResponse.Unmarshal(m, b) +} +func (m *ReplicaRevertResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ReplicaRevertResponse.Marshal(b, m, deterministic) +} +func (m *ReplicaRevertResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_ReplicaRevertResponse.Merge(m, src) +} +func (m *ReplicaRevertResponse) XXX_Size() int { + return xxx_messageInfo_ReplicaRevertResponse.Size(m) +} +func (m *ReplicaRevertResponse) XXX_DiscardUnknown() { + xxx_messageInfo_ReplicaRevertResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_ReplicaRevertResponse proto.InternalMessageInfo + +func (m *ReplicaRevertResponse) GetReplica() *Replica { + if m != nil { + return m.Replica + } + return nil +} + +type ReplicaSnapshotRequest struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + UserCreated bool `protobuf:"varint,2,opt,name=user_created,json=userCreated,proto3" json:"user_created,omitempty"` + Created string `protobuf:"bytes,3,opt,name=created,proto3" json:"created,omitempty"` + Labels map[string]string `protobuf:"bytes,4,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ReplicaSnapshotRequest) Reset() { *m = ReplicaSnapshotRequest{} } +func (m *ReplicaSnapshotRequest) String() string { return proto.CompactTextString(m) } +func (*ReplicaSnapshotRequest) ProtoMessage() {} +func (*ReplicaSnapshotRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_1e84aa831fb48ea1, []int{8} +} + +func (m *ReplicaSnapshotRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ReplicaSnapshotRequest.Unmarshal(m, b) +} +func (m *ReplicaSnapshotRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ReplicaSnapshotRequest.Marshal(b, m, deterministic) +} +func (m *ReplicaSnapshotRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_ReplicaSnapshotRequest.Merge(m, src) +} +func (m *ReplicaSnapshotRequest) XXX_Size() int { + return xxx_messageInfo_ReplicaSnapshotRequest.Size(m) +} +func (m *ReplicaSnapshotRequest) XXX_DiscardUnknown() { + xxx_messageInfo_ReplicaSnapshotRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_ReplicaSnapshotRequest proto.InternalMessageInfo + +func (m *ReplicaSnapshotRequest) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *ReplicaSnapshotRequest) GetUserCreated() bool { + if m != nil { + return m.UserCreated + } + return false +} + +func (m *ReplicaSnapshotRequest) GetCreated() string { + if m != nil { + return m.Created + } + return "" +} + +func (m *ReplicaSnapshotRequest) GetLabels() map[string]string { + if m != nil { + return m.Labels + } + return nil +} + +type ReplicaSnapshotResponse struct { + Replica *Replica `protobuf:"bytes,1,opt,name=replica,proto3" json:"replica,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ReplicaSnapshotResponse) Reset() { *m = ReplicaSnapshotResponse{} } +func (m *ReplicaSnapshotResponse) String() string { return proto.CompactTextString(m) } +func (*ReplicaSnapshotResponse) ProtoMessage() {} +func (*ReplicaSnapshotResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_1e84aa831fb48ea1, []int{9} +} + +func (m *ReplicaSnapshotResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ReplicaSnapshotResponse.Unmarshal(m, b) +} +func (m *ReplicaSnapshotResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ReplicaSnapshotResponse.Marshal(b, m, deterministic) +} +func (m *ReplicaSnapshotResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_ReplicaSnapshotResponse.Merge(m, src) +} +func (m *ReplicaSnapshotResponse) XXX_Size() int { + return xxx_messageInfo_ReplicaSnapshotResponse.Size(m) +} +func (m *ReplicaSnapshotResponse) XXX_DiscardUnknown() { + xxx_messageInfo_ReplicaSnapshotResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_ReplicaSnapshotResponse proto.InternalMessageInfo + +func (m *ReplicaSnapshotResponse) GetReplica() *Replica { + if m != nil { + return m.Replica + } + return nil +} + +type ReplicaExpandRequest struct { + Size int64 `protobuf:"varint,1,opt,name=size,proto3" json:"size,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ReplicaExpandRequest) Reset() { *m = ReplicaExpandRequest{} } +func (m *ReplicaExpandRequest) String() string { return proto.CompactTextString(m) } +func (*ReplicaExpandRequest) ProtoMessage() {} +func (*ReplicaExpandRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_1e84aa831fb48ea1, []int{10} +} + +func (m *ReplicaExpandRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ReplicaExpandRequest.Unmarshal(m, b) +} +func (m *ReplicaExpandRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ReplicaExpandRequest.Marshal(b, m, deterministic) +} +func (m *ReplicaExpandRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_ReplicaExpandRequest.Merge(m, src) +} +func (m *ReplicaExpandRequest) XXX_Size() int { + return xxx_messageInfo_ReplicaExpandRequest.Size(m) +} +func (m *ReplicaExpandRequest) XXX_DiscardUnknown() { + xxx_messageInfo_ReplicaExpandRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_ReplicaExpandRequest proto.InternalMessageInfo + +func (m *ReplicaExpandRequest) GetSize() int64 { + if m != nil { + return m.Size + } + return 0 +} + +type ReplicaExpandResponse struct { + Replica *Replica `protobuf:"bytes,1,opt,name=replica,proto3" json:"replica,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ReplicaExpandResponse) Reset() { *m = ReplicaExpandResponse{} } +func (m *ReplicaExpandResponse) String() string { return proto.CompactTextString(m) } +func (*ReplicaExpandResponse) ProtoMessage() {} +func (*ReplicaExpandResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_1e84aa831fb48ea1, []int{11} +} + +func (m *ReplicaExpandResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ReplicaExpandResponse.Unmarshal(m, b) +} +func (m *ReplicaExpandResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ReplicaExpandResponse.Marshal(b, m, deterministic) +} +func (m *ReplicaExpandResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_ReplicaExpandResponse.Merge(m, src) +} +func (m *ReplicaExpandResponse) XXX_Size() int { + return xxx_messageInfo_ReplicaExpandResponse.Size(m) +} +func (m *ReplicaExpandResponse) XXX_DiscardUnknown() { + xxx_messageInfo_ReplicaExpandResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_ReplicaExpandResponse proto.InternalMessageInfo + +func (m *ReplicaExpandResponse) GetReplica() *Replica { + if m != nil { + return m.Replica + } + return nil +} + +type DiskRemoveRequest struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Force bool `protobuf:"varint,2,opt,name=force,proto3" json:"force,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *DiskRemoveRequest) Reset() { *m = DiskRemoveRequest{} } +func (m *DiskRemoveRequest) String() string { return proto.CompactTextString(m) } +func (*DiskRemoveRequest) ProtoMessage() {} +func (*DiskRemoveRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_1e84aa831fb48ea1, []int{12} +} + +func (m *DiskRemoveRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_DiskRemoveRequest.Unmarshal(m, b) +} +func (m *DiskRemoveRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_DiskRemoveRequest.Marshal(b, m, deterministic) +} +func (m *DiskRemoveRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_DiskRemoveRequest.Merge(m, src) +} +func (m *DiskRemoveRequest) XXX_Size() int { + return xxx_messageInfo_DiskRemoveRequest.Size(m) +} +func (m *DiskRemoveRequest) XXX_DiscardUnknown() { + xxx_messageInfo_DiskRemoveRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_DiskRemoveRequest proto.InternalMessageInfo + +func (m *DiskRemoveRequest) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *DiskRemoveRequest) GetForce() bool { + if m != nil { + return m.Force + } + return false +} + +type DiskRemoveResponse struct { + Replica *Replica `protobuf:"bytes,1,opt,name=replica,proto3" json:"replica,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *DiskRemoveResponse) Reset() { *m = DiskRemoveResponse{} } +func (m *DiskRemoveResponse) String() string { return proto.CompactTextString(m) } +func (*DiskRemoveResponse) ProtoMessage() {} +func (*DiskRemoveResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_1e84aa831fb48ea1, []int{13} +} + +func (m *DiskRemoveResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_DiskRemoveResponse.Unmarshal(m, b) +} +func (m *DiskRemoveResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_DiskRemoveResponse.Marshal(b, m, deterministic) +} +func (m *DiskRemoveResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_DiskRemoveResponse.Merge(m, src) +} +func (m *DiskRemoveResponse) XXX_Size() int { + return xxx_messageInfo_DiskRemoveResponse.Size(m) +} +func (m *DiskRemoveResponse) XXX_DiscardUnknown() { + xxx_messageInfo_DiskRemoveResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_DiskRemoveResponse proto.InternalMessageInfo + +func (m *DiskRemoveResponse) GetReplica() *Replica { + if m != nil { + return m.Replica + } + return nil +} + +type DiskReplaceRequest struct { + Target string `protobuf:"bytes,1,opt,name=target,proto3" json:"target,omitempty"` + Source string `protobuf:"bytes,2,opt,name=source,proto3" json:"source,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *DiskReplaceRequest) Reset() { *m = DiskReplaceRequest{} } +func (m *DiskReplaceRequest) String() string { return proto.CompactTextString(m) } +func (*DiskReplaceRequest) ProtoMessage() {} +func (*DiskReplaceRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_1e84aa831fb48ea1, []int{14} +} + +func (m *DiskReplaceRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_DiskReplaceRequest.Unmarshal(m, b) +} +func (m *DiskReplaceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_DiskReplaceRequest.Marshal(b, m, deterministic) +} +func (m *DiskReplaceRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_DiskReplaceRequest.Merge(m, src) +} +func (m *DiskReplaceRequest) XXX_Size() int { + return xxx_messageInfo_DiskReplaceRequest.Size(m) +} +func (m *DiskReplaceRequest) XXX_DiscardUnknown() { + xxx_messageInfo_DiskReplaceRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_DiskReplaceRequest proto.InternalMessageInfo + +func (m *DiskReplaceRequest) GetTarget() string { + if m != nil { + return m.Target + } + return "" +} + +func (m *DiskReplaceRequest) GetSource() string { + if m != nil { + return m.Source + } + return "" +} + +type DiskReplaceResponse struct { + Replica *Replica `protobuf:"bytes,1,opt,name=replica,proto3" json:"replica,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *DiskReplaceResponse) Reset() { *m = DiskReplaceResponse{} } +func (m *DiskReplaceResponse) String() string { return proto.CompactTextString(m) } +func (*DiskReplaceResponse) ProtoMessage() {} +func (*DiskReplaceResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_1e84aa831fb48ea1, []int{15} +} + +func (m *DiskReplaceResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_DiskReplaceResponse.Unmarshal(m, b) +} +func (m *DiskReplaceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_DiskReplaceResponse.Marshal(b, m, deterministic) +} +func (m *DiskReplaceResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_DiskReplaceResponse.Merge(m, src) +} +func (m *DiskReplaceResponse) XXX_Size() int { + return xxx_messageInfo_DiskReplaceResponse.Size(m) +} +func (m *DiskReplaceResponse) XXX_DiscardUnknown() { + xxx_messageInfo_DiskReplaceResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_DiskReplaceResponse proto.InternalMessageInfo + +func (m *DiskReplaceResponse) GetReplica() *Replica { + if m != nil { + return m.Replica + } + return nil +} + +type DiskPrepareRemoveRequest struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *DiskPrepareRemoveRequest) Reset() { *m = DiskPrepareRemoveRequest{} } +func (m *DiskPrepareRemoveRequest) String() string { return proto.CompactTextString(m) } +func (*DiskPrepareRemoveRequest) ProtoMessage() {} +func (*DiskPrepareRemoveRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_1e84aa831fb48ea1, []int{16} +} + +func (m *DiskPrepareRemoveRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_DiskPrepareRemoveRequest.Unmarshal(m, b) +} +func (m *DiskPrepareRemoveRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_DiskPrepareRemoveRequest.Marshal(b, m, deterministic) +} +func (m *DiskPrepareRemoveRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_DiskPrepareRemoveRequest.Merge(m, src) +} +func (m *DiskPrepareRemoveRequest) XXX_Size() int { + return xxx_messageInfo_DiskPrepareRemoveRequest.Size(m) +} +func (m *DiskPrepareRemoveRequest) XXX_DiscardUnknown() { + xxx_messageInfo_DiskPrepareRemoveRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_DiskPrepareRemoveRequest proto.InternalMessageInfo + +func (m *DiskPrepareRemoveRequest) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +type DiskPrepareRemoveResponse struct { + Operations []*PrepareRemoveAction `protobuf:"bytes,1,rep,name=operations,proto3" json:"operations,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *DiskPrepareRemoveResponse) Reset() { *m = DiskPrepareRemoveResponse{} } +func (m *DiskPrepareRemoveResponse) String() string { return proto.CompactTextString(m) } +func (*DiskPrepareRemoveResponse) ProtoMessage() {} +func (*DiskPrepareRemoveResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_1e84aa831fb48ea1, []int{17} +} + +func (m *DiskPrepareRemoveResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_DiskPrepareRemoveResponse.Unmarshal(m, b) +} +func (m *DiskPrepareRemoveResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_DiskPrepareRemoveResponse.Marshal(b, m, deterministic) +} +func (m *DiskPrepareRemoveResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_DiskPrepareRemoveResponse.Merge(m, src) +} +func (m *DiskPrepareRemoveResponse) XXX_Size() int { + return xxx_messageInfo_DiskPrepareRemoveResponse.Size(m) +} +func (m *DiskPrepareRemoveResponse) XXX_DiscardUnknown() { + xxx_messageInfo_DiskPrepareRemoveResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_DiskPrepareRemoveResponse proto.InternalMessageInfo + +func (m *DiskPrepareRemoveResponse) GetOperations() []*PrepareRemoveAction { + if m != nil { + return m.Operations + } + return nil +} + +type DiskMarkAsRemovedRequest struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *DiskMarkAsRemovedRequest) Reset() { *m = DiskMarkAsRemovedRequest{} } +func (m *DiskMarkAsRemovedRequest) String() string { return proto.CompactTextString(m) } +func (*DiskMarkAsRemovedRequest) ProtoMessage() {} +func (*DiskMarkAsRemovedRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_1e84aa831fb48ea1, []int{18} +} + +func (m *DiskMarkAsRemovedRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_DiskMarkAsRemovedRequest.Unmarshal(m, b) +} +func (m *DiskMarkAsRemovedRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_DiskMarkAsRemovedRequest.Marshal(b, m, deterministic) +} +func (m *DiskMarkAsRemovedRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_DiskMarkAsRemovedRequest.Merge(m, src) +} +func (m *DiskMarkAsRemovedRequest) XXX_Size() int { + return xxx_messageInfo_DiskMarkAsRemovedRequest.Size(m) +} +func (m *DiskMarkAsRemovedRequest) XXX_DiscardUnknown() { + xxx_messageInfo_DiskMarkAsRemovedRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_DiskMarkAsRemovedRequest proto.InternalMessageInfo + +func (m *DiskMarkAsRemovedRequest) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +type DiskMarkAsRemovedResponse struct { + Replica *Replica `protobuf:"bytes,1,opt,name=replica,proto3" json:"replica,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *DiskMarkAsRemovedResponse) Reset() { *m = DiskMarkAsRemovedResponse{} } +func (m *DiskMarkAsRemovedResponse) String() string { return proto.CompactTextString(m) } +func (*DiskMarkAsRemovedResponse) ProtoMessage() {} +func (*DiskMarkAsRemovedResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_1e84aa831fb48ea1, []int{19} +} + +func (m *DiskMarkAsRemovedResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_DiskMarkAsRemovedResponse.Unmarshal(m, b) +} +func (m *DiskMarkAsRemovedResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_DiskMarkAsRemovedResponse.Marshal(b, m, deterministic) +} +func (m *DiskMarkAsRemovedResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_DiskMarkAsRemovedResponse.Merge(m, src) +} +func (m *DiskMarkAsRemovedResponse) XXX_Size() int { + return xxx_messageInfo_DiskMarkAsRemovedResponse.Size(m) +} +func (m *DiskMarkAsRemovedResponse) XXX_DiscardUnknown() { + xxx_messageInfo_DiskMarkAsRemovedResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_DiskMarkAsRemovedResponse proto.InternalMessageInfo + +func (m *DiskMarkAsRemovedResponse) GetReplica() *Replica { + if m != nil { + return m.Replica + } + return nil +} + +type RebuildingSetRequest struct { + Rebuilding bool `protobuf:"varint,1,opt,name=rebuilding,proto3" json:"rebuilding,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RebuildingSetRequest) Reset() { *m = RebuildingSetRequest{} } +func (m *RebuildingSetRequest) String() string { return proto.CompactTextString(m) } +func (*RebuildingSetRequest) ProtoMessage() {} +func (*RebuildingSetRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_1e84aa831fb48ea1, []int{20} +} + +func (m *RebuildingSetRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_RebuildingSetRequest.Unmarshal(m, b) +} +func (m *RebuildingSetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_RebuildingSetRequest.Marshal(b, m, deterministic) +} +func (m *RebuildingSetRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_RebuildingSetRequest.Merge(m, src) +} +func (m *RebuildingSetRequest) XXX_Size() int { + return xxx_messageInfo_RebuildingSetRequest.Size(m) +} +func (m *RebuildingSetRequest) XXX_DiscardUnknown() { + xxx_messageInfo_RebuildingSetRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_RebuildingSetRequest proto.InternalMessageInfo + +func (m *RebuildingSetRequest) GetRebuilding() bool { + if m != nil { + return m.Rebuilding + } + return false +} + +type RebuildingSetResponse struct { + Replica *Replica `protobuf:"bytes,1,opt,name=replica,proto3" json:"replica,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RebuildingSetResponse) Reset() { *m = RebuildingSetResponse{} } +func (m *RebuildingSetResponse) String() string { return proto.CompactTextString(m) } +func (*RebuildingSetResponse) ProtoMessage() {} +func (*RebuildingSetResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_1e84aa831fb48ea1, []int{21} +} + +func (m *RebuildingSetResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_RebuildingSetResponse.Unmarshal(m, b) +} +func (m *RebuildingSetResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_RebuildingSetResponse.Marshal(b, m, deterministic) +} +func (m *RebuildingSetResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_RebuildingSetResponse.Merge(m, src) +} +func (m *RebuildingSetResponse) XXX_Size() int { + return xxx_messageInfo_RebuildingSetResponse.Size(m) +} +func (m *RebuildingSetResponse) XXX_DiscardUnknown() { + xxx_messageInfo_RebuildingSetResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_RebuildingSetResponse proto.InternalMessageInfo + +func (m *RebuildingSetResponse) GetReplica() *Replica { + if m != nil { + return m.Replica + } + return nil +} + +type RevisionCounterSetRequest struct { + Counter int64 `protobuf:"varint,1,opt,name=counter,proto3" json:"counter,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RevisionCounterSetRequest) Reset() { *m = RevisionCounterSetRequest{} } +func (m *RevisionCounterSetRequest) String() string { return proto.CompactTextString(m) } +func (*RevisionCounterSetRequest) ProtoMessage() {} +func (*RevisionCounterSetRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_1e84aa831fb48ea1, []int{22} +} + +func (m *RevisionCounterSetRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_RevisionCounterSetRequest.Unmarshal(m, b) +} +func (m *RevisionCounterSetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_RevisionCounterSetRequest.Marshal(b, m, deterministic) +} +func (m *RevisionCounterSetRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_RevisionCounterSetRequest.Merge(m, src) +} +func (m *RevisionCounterSetRequest) XXX_Size() int { + return xxx_messageInfo_RevisionCounterSetRequest.Size(m) +} +func (m *RevisionCounterSetRequest) XXX_DiscardUnknown() { + xxx_messageInfo_RevisionCounterSetRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_RevisionCounterSetRequest proto.InternalMessageInfo + +func (m *RevisionCounterSetRequest) GetCounter() int64 { + if m != nil { + return m.Counter + } + return 0 +} + +type RevisionCounterSetResponse struct { + Replica *Replica `protobuf:"bytes,1,opt,name=replica,proto3" json:"replica,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RevisionCounterSetResponse) Reset() { *m = RevisionCounterSetResponse{} } +func (m *RevisionCounterSetResponse) String() string { return proto.CompactTextString(m) } +func (*RevisionCounterSetResponse) ProtoMessage() {} +func (*RevisionCounterSetResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_1e84aa831fb48ea1, []int{23} +} + +func (m *RevisionCounterSetResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_RevisionCounterSetResponse.Unmarshal(m, b) +} +func (m *RevisionCounterSetResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_RevisionCounterSetResponse.Marshal(b, m, deterministic) +} +func (m *RevisionCounterSetResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_RevisionCounterSetResponse.Merge(m, src) +} +func (m *RevisionCounterSetResponse) XXX_Size() int { + return xxx_messageInfo_RevisionCounterSetResponse.Size(m) +} +func (m *RevisionCounterSetResponse) XXX_DiscardUnknown() { + xxx_messageInfo_RevisionCounterSetResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_RevisionCounterSetResponse proto.InternalMessageInfo + +func (m *RevisionCounterSetResponse) GetReplica() *Replica { + if m != nil { + return m.Replica + } + return nil +} + +type UnmapMarkDiskChainRemovedSetRequest struct { + Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *UnmapMarkDiskChainRemovedSetRequest) Reset() { *m = UnmapMarkDiskChainRemovedSetRequest{} } +func (m *UnmapMarkDiskChainRemovedSetRequest) String() string { return proto.CompactTextString(m) } +func (*UnmapMarkDiskChainRemovedSetRequest) ProtoMessage() {} +func (*UnmapMarkDiskChainRemovedSetRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_1e84aa831fb48ea1, []int{24} +} + +func (m *UnmapMarkDiskChainRemovedSetRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_UnmapMarkDiskChainRemovedSetRequest.Unmarshal(m, b) +} +func (m *UnmapMarkDiskChainRemovedSetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_UnmapMarkDiskChainRemovedSetRequest.Marshal(b, m, deterministic) +} +func (m *UnmapMarkDiskChainRemovedSetRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_UnmapMarkDiskChainRemovedSetRequest.Merge(m, src) +} +func (m *UnmapMarkDiskChainRemovedSetRequest) XXX_Size() int { + return xxx_messageInfo_UnmapMarkDiskChainRemovedSetRequest.Size(m) +} +func (m *UnmapMarkDiskChainRemovedSetRequest) XXX_DiscardUnknown() { + xxx_messageInfo_UnmapMarkDiskChainRemovedSetRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_UnmapMarkDiskChainRemovedSetRequest proto.InternalMessageInfo + +func (m *UnmapMarkDiskChainRemovedSetRequest) GetEnabled() bool { + if m != nil { + return m.Enabled + } + return false +} + +type UnmapMarkDiskChainRemovedSetResponse struct { + Replica *Replica `protobuf:"bytes,1,opt,name=replica,proto3" json:"replica,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *UnmapMarkDiskChainRemovedSetResponse) Reset() { *m = UnmapMarkDiskChainRemovedSetResponse{} } +func (m *UnmapMarkDiskChainRemovedSetResponse) String() string { return proto.CompactTextString(m) } +func (*UnmapMarkDiskChainRemovedSetResponse) ProtoMessage() {} +func (*UnmapMarkDiskChainRemovedSetResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_1e84aa831fb48ea1, []int{25} +} + +func (m *UnmapMarkDiskChainRemovedSetResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_UnmapMarkDiskChainRemovedSetResponse.Unmarshal(m, b) +} +func (m *UnmapMarkDiskChainRemovedSetResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_UnmapMarkDiskChainRemovedSetResponse.Marshal(b, m, deterministic) +} +func (m *UnmapMarkDiskChainRemovedSetResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_UnmapMarkDiskChainRemovedSetResponse.Merge(m, src) +} +func (m *UnmapMarkDiskChainRemovedSetResponse) XXX_Size() int { + return xxx_messageInfo_UnmapMarkDiskChainRemovedSetResponse.Size(m) +} +func (m *UnmapMarkDiskChainRemovedSetResponse) XXX_DiscardUnknown() { + xxx_messageInfo_UnmapMarkDiskChainRemovedSetResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_UnmapMarkDiskChainRemovedSetResponse proto.InternalMessageInfo + +func (m *UnmapMarkDiskChainRemovedSetResponse) GetReplica() *Replica { + if m != nil { + return m.Replica + } + return nil +} + +type DiskInfo struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Parent string `protobuf:"bytes,2,opt,name=parent,proto3" json:"parent,omitempty"` + Children map[string]bool `protobuf:"bytes,3,rep,name=children,proto3" json:"children,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Removed bool `protobuf:"varint,4,opt,name=removed,proto3" json:"removed,omitempty"` + UserCreated bool `protobuf:"varint,5,opt,name=user_created,json=userCreated,proto3" json:"user_created,omitempty"` + Created string `protobuf:"bytes,6,opt,name=created,proto3" json:"created,omitempty"` + Size string `protobuf:"bytes,7,opt,name=size,proto3" json:"size,omitempty"` + Labels map[string]string `protobuf:"bytes,8,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *DiskInfo) Reset() { *m = DiskInfo{} } +func (m *DiskInfo) String() string { return proto.CompactTextString(m) } +func (*DiskInfo) ProtoMessage() {} +func (*DiskInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_1e84aa831fb48ea1, []int{26} +} + +func (m *DiskInfo) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_DiskInfo.Unmarshal(m, b) +} +func (m *DiskInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_DiskInfo.Marshal(b, m, deterministic) +} +func (m *DiskInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_DiskInfo.Merge(m, src) +} +func (m *DiskInfo) XXX_Size() int { + return xxx_messageInfo_DiskInfo.Size(m) +} +func (m *DiskInfo) XXX_DiscardUnknown() { + xxx_messageInfo_DiskInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_DiskInfo proto.InternalMessageInfo + +func (m *DiskInfo) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *DiskInfo) GetParent() string { + if m != nil { + return m.Parent + } + return "" +} + +func (m *DiskInfo) GetChildren() map[string]bool { + if m != nil { + return m.Children + } + return nil +} + +func (m *DiskInfo) GetRemoved() bool { + if m != nil { + return m.Removed + } + return false +} + +func (m *DiskInfo) GetUserCreated() bool { + if m != nil { + return m.UserCreated + } + return false +} + +func (m *DiskInfo) GetCreated() string { + if m != nil { + return m.Created + } + return "" +} + +func (m *DiskInfo) GetSize() string { + if m != nil { + return m.Size + } + return "" +} + +func (m *DiskInfo) GetLabels() map[string]string { + if m != nil { + return m.Labels + } + return nil +} + +type Replica struct { + Dirty bool `protobuf:"varint,1,opt,name=dirty,proto3" json:"dirty,omitempty"` + Rebuilding bool `protobuf:"varint,2,opt,name=rebuilding,proto3" json:"rebuilding,omitempty"` + Head string `protobuf:"bytes,3,opt,name=head,proto3" json:"head,omitempty"` + Parent string `protobuf:"bytes,4,opt,name=parent,proto3" json:"parent,omitempty"` + Size string `protobuf:"bytes,5,opt,name=size,proto3" json:"size,omitempty"` + SectorSize int64 `protobuf:"varint,6,opt,name=sector_size,json=sectorSize,proto3" json:"sector_size,omitempty"` + BackingFile string `protobuf:"bytes,7,opt,name=backing_file,json=backingFile,proto3" json:"backing_file,omitempty"` + State string `protobuf:"bytes,8,opt,name=state,proto3" json:"state,omitempty"` + Chain []string `protobuf:"bytes,9,rep,name=chain,proto3" json:"chain,omitempty"` + Disks map[string]*DiskInfo `protobuf:"bytes,10,rep,name=disks,proto3" json:"disks,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + RemainSnapshots int32 `protobuf:"varint,11,opt,name=remain_snapshots,json=remainSnapshots,proto3" json:"remain_snapshots,omitempty"` + RevisionCounter int64 `protobuf:"varint,12,opt,name=revision_counter,json=revisionCounter,proto3" json:"revision_counter,omitempty"` + LastModifyTime int64 `protobuf:"varint,13,opt,name=last_modify_time,json=lastModifyTime,proto3" json:"last_modify_time,omitempty"` + HeadFileSize int64 `protobuf:"varint,14,opt,name=head_file_size,json=headFileSize,proto3" json:"head_file_size,omitempty"` + RevisionCounterDisabled bool `protobuf:"varint,15,opt,name=revision_counter_disabled,json=revisionCounterDisabled,proto3" json:"revision_counter_disabled,omitempty"` + UnmapMarkDiskChainRemoved bool `protobuf:"varint,16,opt,name=unmap_mark_disk_chain_removed,json=unmapMarkDiskChainRemoved,proto3" json:"unmap_mark_disk_chain_removed,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Replica) Reset() { *m = Replica{} } +func (m *Replica) String() string { return proto.CompactTextString(m) } +func (*Replica) ProtoMessage() {} +func (*Replica) Descriptor() ([]byte, []int) { + return fileDescriptor_1e84aa831fb48ea1, []int{27} +} + +func (m *Replica) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Replica.Unmarshal(m, b) +} +func (m *Replica) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Replica.Marshal(b, m, deterministic) +} +func (m *Replica) XXX_Merge(src proto.Message) { + xxx_messageInfo_Replica.Merge(m, src) +} +func (m *Replica) XXX_Size() int { + return xxx_messageInfo_Replica.Size(m) +} +func (m *Replica) XXX_DiscardUnknown() { + xxx_messageInfo_Replica.DiscardUnknown(m) +} + +var xxx_messageInfo_Replica proto.InternalMessageInfo + +func (m *Replica) GetDirty() bool { + if m != nil { + return m.Dirty + } + return false +} + +func (m *Replica) GetRebuilding() bool { + if m != nil { + return m.Rebuilding + } + return false +} + +func (m *Replica) GetHead() string { + if m != nil { + return m.Head + } + return "" +} + +func (m *Replica) GetParent() string { + if m != nil { + return m.Parent + } + return "" +} + +func (m *Replica) GetSize() string { + if m != nil { + return m.Size + } + return "" +} + +func (m *Replica) GetSectorSize() int64 { + if m != nil { + return m.SectorSize + } + return 0 +} + +func (m *Replica) GetBackingFile() string { + if m != nil { + return m.BackingFile + } + return "" +} + +func (m *Replica) GetState() string { + if m != nil { + return m.State + } + return "" +} + +func (m *Replica) GetChain() []string { + if m != nil { + return m.Chain + } + return nil +} + +func (m *Replica) GetDisks() map[string]*DiskInfo { + if m != nil { + return m.Disks + } + return nil +} + +func (m *Replica) GetRemainSnapshots() int32 { + if m != nil { + return m.RemainSnapshots + } + return 0 +} + +func (m *Replica) GetRevisionCounter() int64 { + if m != nil { + return m.RevisionCounter + } + return 0 +} + +func (m *Replica) GetLastModifyTime() int64 { + if m != nil { + return m.LastModifyTime + } + return 0 +} + +func (m *Replica) GetHeadFileSize() int64 { + if m != nil { + return m.HeadFileSize + } + return 0 +} + +func (m *Replica) GetRevisionCounterDisabled() bool { + if m != nil { + return m.RevisionCounterDisabled + } + return false +} + +func (m *Replica) GetUnmapMarkDiskChainRemoved() bool { + if m != nil { + return m.UnmapMarkDiskChainRemoved + } + return false +} + +type PrepareRemoveAction struct { + Action string `protobuf:"bytes,1,opt,name=action,proto3" json:"action,omitempty"` + Source string `protobuf:"bytes,2,opt,name=source,proto3" json:"source,omitempty"` + Target string `protobuf:"bytes,3,opt,name=target,proto3" json:"target,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *PrepareRemoveAction) Reset() { *m = PrepareRemoveAction{} } +func (m *PrepareRemoveAction) String() string { return proto.CompactTextString(m) } +func (*PrepareRemoveAction) ProtoMessage() {} +func (*PrepareRemoveAction) Descriptor() ([]byte, []int) { + return fileDescriptor_1e84aa831fb48ea1, []int{28} +} + +func (m *PrepareRemoveAction) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_PrepareRemoveAction.Unmarshal(m, b) +} +func (m *PrepareRemoveAction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_PrepareRemoveAction.Marshal(b, m, deterministic) +} +func (m *PrepareRemoveAction) XXX_Merge(src proto.Message) { + xxx_messageInfo_PrepareRemoveAction.Merge(m, src) +} +func (m *PrepareRemoveAction) XXX_Size() int { + return xxx_messageInfo_PrepareRemoveAction.Size(m) +} +func (m *PrepareRemoveAction) XXX_DiscardUnknown() { + xxx_messageInfo_PrepareRemoveAction.DiscardUnknown(m) +} + +var xxx_messageInfo_PrepareRemoveAction proto.InternalMessageInfo + +func (m *PrepareRemoveAction) GetAction() string { + if m != nil { + return m.Action + } + return "" +} + +func (m *PrepareRemoveAction) GetSource() string { + if m != nil { + return m.Source + } + return "" +} + +func (m *PrepareRemoveAction) GetTarget() string { + if m != nil { + return m.Target + } + return "" +} + +func init() { + proto.RegisterType((*ReplicaCreateRequest)(nil), "ptypes.ReplicaCreateRequest") + proto.RegisterType((*ReplicaCreateResponse)(nil), "ptypes.ReplicaCreateResponse") + proto.RegisterType((*ReplicaGetResponse)(nil), "ptypes.ReplicaGetResponse") + proto.RegisterType((*ReplicaOpenResponse)(nil), "ptypes.ReplicaOpenResponse") + proto.RegisterType((*ReplicaCloseResponse)(nil), "ptypes.ReplicaCloseResponse") + proto.RegisterType((*ReplicaReloadResponse)(nil), "ptypes.ReplicaReloadResponse") + proto.RegisterType((*ReplicaRevertRequest)(nil), "ptypes.ReplicaRevertRequest") + proto.RegisterType((*ReplicaRevertResponse)(nil), "ptypes.ReplicaRevertResponse") + proto.RegisterType((*ReplicaSnapshotRequest)(nil), "ptypes.ReplicaSnapshotRequest") + proto.RegisterMapType((map[string]string)(nil), "ptypes.ReplicaSnapshotRequest.LabelsEntry") + proto.RegisterType((*ReplicaSnapshotResponse)(nil), "ptypes.ReplicaSnapshotResponse") + proto.RegisterType((*ReplicaExpandRequest)(nil), "ptypes.ReplicaExpandRequest") + proto.RegisterType((*ReplicaExpandResponse)(nil), "ptypes.ReplicaExpandResponse") + proto.RegisterType((*DiskRemoveRequest)(nil), "ptypes.DiskRemoveRequest") + proto.RegisterType((*DiskRemoveResponse)(nil), "ptypes.DiskRemoveResponse") + proto.RegisterType((*DiskReplaceRequest)(nil), "ptypes.DiskReplaceRequest") + proto.RegisterType((*DiskReplaceResponse)(nil), "ptypes.DiskReplaceResponse") + proto.RegisterType((*DiskPrepareRemoveRequest)(nil), "ptypes.DiskPrepareRemoveRequest") + proto.RegisterType((*DiskPrepareRemoveResponse)(nil), "ptypes.DiskPrepareRemoveResponse") + proto.RegisterType((*DiskMarkAsRemovedRequest)(nil), "ptypes.DiskMarkAsRemovedRequest") + proto.RegisterType((*DiskMarkAsRemovedResponse)(nil), "ptypes.DiskMarkAsRemovedResponse") + proto.RegisterType((*RebuildingSetRequest)(nil), "ptypes.RebuildingSetRequest") + proto.RegisterType((*RebuildingSetResponse)(nil), "ptypes.RebuildingSetResponse") + proto.RegisterType((*RevisionCounterSetRequest)(nil), "ptypes.RevisionCounterSetRequest") + proto.RegisterType((*RevisionCounterSetResponse)(nil), "ptypes.RevisionCounterSetResponse") + proto.RegisterType((*UnmapMarkDiskChainRemovedSetRequest)(nil), "ptypes.UnmapMarkDiskChainRemovedSetRequest") + proto.RegisterType((*UnmapMarkDiskChainRemovedSetResponse)(nil), "ptypes.UnmapMarkDiskChainRemovedSetResponse") + proto.RegisterType((*DiskInfo)(nil), "ptypes.DiskInfo") + proto.RegisterMapType((map[string]bool)(nil), "ptypes.DiskInfo.ChildrenEntry") + proto.RegisterMapType((map[string]string)(nil), "ptypes.DiskInfo.LabelsEntry") + proto.RegisterType((*Replica)(nil), "ptypes.Replica") + proto.RegisterMapType((map[string]*DiskInfo)(nil), "ptypes.Replica.DisksEntry") + proto.RegisterType((*PrepareRemoveAction)(nil), "ptypes.PrepareRemoveAction") +} + +func init() { proto.RegisterFile("replica.proto", fileDescriptor_1e84aa831fb48ea1) } + +var fileDescriptor_1e84aa831fb48ea1 = []byte{ + // 1258 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x57, 0xeb, 0x72, 0xdb, 0x44, + 0x14, 0xb6, 0xeb, 0xd8, 0x71, 0x8f, 0x73, 0x63, 0x1b, 0x52, 0x45, 0x49, 0xd3, 0x44, 0x74, 0x98, + 0xb4, 0x30, 0x2e, 0x13, 0x2e, 0x03, 0xe9, 0x30, 0x34, 0x89, 0x93, 0x02, 0x43, 0xb9, 0x28, 0x65, + 0x86, 0x61, 0xa6, 0xa3, 0x59, 0x5b, 0x9b, 0x44, 0x63, 0x59, 0x12, 0xbb, 0x72, 0x06, 0xc3, 0x23, + 0xf0, 0x8b, 0xd7, 0xe0, 0xc9, 0x78, 0x0c, 0x66, 0x6f, 0xf2, 0x4a, 0x96, 0xdd, 0xda, 0xfc, 0xd3, + 0x39, 0x3a, 0x7b, 0xf6, 0xdb, 0x73, 0xdb, 0x6f, 0x61, 0x95, 0x92, 0x24, 0x0c, 0x7a, 0xb8, 0x9d, + 0xd0, 0x38, 0x8d, 0x51, 0x23, 0x49, 0x47, 0x09, 0x61, 0xf6, 0xce, 0x75, 0x1c, 0x5f, 0x87, 0xe4, + 0xa9, 0xd0, 0x76, 0x87, 0x57, 0x4f, 0xc9, 0x20, 0x49, 0x47, 0xd2, 0xc8, 0x79, 0x02, 0x9b, 0xae, + 0x5c, 0x75, 0x46, 0x09, 0x4e, 0x89, 0x4b, 0x7e, 0x1b, 0x12, 0x96, 0x22, 0x04, 0x4b, 0x2c, 0xf8, + 0x83, 0x58, 0xd5, 0xfd, 0xea, 0xe1, 0x5d, 0x57, 0x7c, 0x3b, 0xa7, 0xf0, 0x6e, 0xc1, 0x96, 0x25, + 0x71, 0xc4, 0x08, 0x7a, 0x0c, 0xcb, 0x6a, 0x6b, 0x61, 0xdf, 0x3a, 0x5a, 0x6f, 0xcb, 0xbd, 0xdb, + 0xca, 0xde, 0xd5, 0xff, 0x9d, 0xaf, 0x00, 0x29, 0xdd, 0x0b, 0x92, 0x2e, 0xe2, 0xe0, 0x39, 0xdc, + 0x53, 0xba, 0x1f, 0x12, 0x12, 0x2d, 0xe2, 0xe1, 0x64, 0x7c, 0xe4, 0x30, 0x66, 0x0b, 0x9d, 0x62, + 0x1c, 0x09, 0x97, 0x84, 0x31, 0xf6, 0x17, 0xf1, 0xd1, 0xc9, 0x60, 0xb8, 0xe4, 0x96, 0xd0, 0xd4, + 0x88, 0x7c, 0x84, 0x07, 0x59, 0xe4, 0xf9, 0x37, 0xb2, 0x60, 0xb9, 0x27, 0x42, 0xee, 0x5b, 0x77, + 0x84, 0x5a, 0x8b, 0x39, 0x24, 0xd2, 0xcb, 0xfc, 0x48, 0xfe, 0xad, 0xc2, 0x96, 0x52, 0x5e, 0x46, + 0x38, 0x61, 0x37, 0xf1, 0x4c, 0x30, 0x07, 0xb0, 0x32, 0x64, 0x84, 0x7a, 0x26, 0xa2, 0xa6, 0xdb, + 0xe2, 0x3a, 0x59, 0x17, 0xbe, 0x89, 0xb7, 0x96, 0xc3, 0x8b, 0x4e, 0xa1, 0x11, 0xe2, 0x2e, 0x09, + 0x99, 0xb5, 0xb4, 0x5f, 0x3b, 0x6c, 0x1d, 0x3d, 0x29, 0xa0, 0x2a, 0x00, 0x68, 0x7f, 0x27, 0x8c, + 0xcf, 0xa3, 0x94, 0x8e, 0x5c, 0xb5, 0xd2, 0xfe, 0x02, 0x5a, 0x86, 0x1a, 0x6d, 0x40, 0xad, 0x4f, + 0x46, 0x0a, 0x22, 0xff, 0x44, 0x9b, 0x50, 0xbf, 0xc5, 0xe1, 0x90, 0xa8, 0x60, 0x49, 0xe1, 0xf8, + 0xce, 0xe7, 0x55, 0xa7, 0x03, 0xf7, 0x27, 0x36, 0x9a, 0x3f, 0x60, 0xe3, 0xa6, 0x39, 0xff, 0x3d, + 0xc1, 0x91, 0x5f, 0xd6, 0x34, 0xb5, 0x89, 0xa6, 0xd1, 0xb6, 0xf3, 0xef, 0xf7, 0x25, 0xbc, 0xd3, + 0x09, 0x58, 0xdf, 0x25, 0x83, 0xf8, 0x96, 0xcc, 0x4a, 0xcd, 0x26, 0xd4, 0xaf, 0x62, 0xda, 0x23, + 0x2a, 0x27, 0x52, 0xe0, 0x3d, 0x67, 0x2e, 0x5f, 0xa4, 0x54, 0x95, 0x83, 0x24, 0xc4, 0xbd, 0x0c, + 0xc0, 0x16, 0x34, 0x52, 0x4c, 0xaf, 0x49, 0xaa, 0x20, 0x28, 0x89, 0xeb, 0x59, 0x3c, 0xd4, 0x28, + 0xee, 0xba, 0x4a, 0xe2, 0x9d, 0x9b, 0xf3, 0x32, 0x3f, 0x8e, 0x36, 0x58, 0xdc, 0xc3, 0x8f, 0x94, + 0x24, 0x98, 0x92, 0x37, 0x86, 0xc3, 0xf9, 0x05, 0xb6, 0x4b, 0xec, 0xd5, 0xbe, 0xcf, 0x00, 0xe2, + 0x84, 0x50, 0x9c, 0x06, 0x71, 0xc4, 0xac, 0xaa, 0xa8, 0xc6, 0x1d, 0xbd, 0x75, 0x6e, 0xc9, 0x49, + 0x8f, 0xdb, 0xb8, 0x86, 0xb9, 0x46, 0xf2, 0x12, 0xd3, 0xfe, 0x09, 0x93, 0x56, 0xfe, 0x2c, 0x24, + 0x17, 0x12, 0x49, 0xc1, 0x7e, 0xfe, 0x08, 0x7c, 0xc6, 0x2b, 0xaf, 0x3b, 0x0c, 0x42, 0x3f, 0x88, + 0xae, 0x2f, 0x49, 0xd6, 0xa7, 0x7b, 0x00, 0x34, 0xd3, 0x0b, 0x2f, 0x4d, 0xd7, 0xd0, 0xc8, 0x2a, + 0xcc, 0xad, 0x9b, 0x7f, 0xef, 0x4f, 0x61, 0xdb, 0x25, 0xb7, 0x01, 0x0b, 0xe2, 0xe8, 0x2c, 0x1e, + 0x46, 0x29, 0xa1, 0x06, 0x00, 0xde, 0xf1, 0x52, 0xa9, 0xaa, 0x5f, 0x8b, 0xce, 0x0b, 0xb0, 0xcb, + 0x96, 0x2d, 0x72, 0x75, 0xbc, 0xf7, 0x73, 0x34, 0xc0, 0x09, 0x0f, 0x22, 0x0f, 0xe6, 0xd9, 0x0d, + 0x0e, 0x22, 0x15, 0xcb, 0x3c, 0x12, 0x12, 0xe1, 0x6e, 0x48, 0x7c, 0x15, 0x07, 0x2d, 0x3a, 0x3f, + 0xc1, 0xa3, 0xd9, 0x0e, 0xe6, 0xc7, 0xf4, 0x57, 0x0d, 0x9a, 0xdc, 0xd5, 0x37, 0xd1, 0x55, 0x5c, + 0xda, 0x91, 0x5b, 0xd0, 0xe0, 0x85, 0x14, 0xa5, 0xba, 0x19, 0xa4, 0x84, 0x8e, 0xa1, 0xd9, 0xbb, + 0x09, 0x42, 0x9f, 0x92, 0xc8, 0xaa, 0x89, 0xda, 0xdb, 0xd3, 0x9b, 0x68, 0x7f, 0xed, 0x33, 0x65, + 0x20, 0xa7, 0x5f, 0x66, 0xcf, 0x4f, 0x48, 0x25, 0x6a, 0x6b, 0x49, 0x9e, 0x50, 0x89, 0x13, 0xa3, + 0xb9, 0x3e, 0x73, 0x34, 0x37, 0xf2, 0xa3, 0x59, 0x4f, 0xaf, 0xe5, 0xf1, 0x95, 0x8f, 0x3e, 0xc9, + 0xc6, 0x75, 0x53, 0x80, 0xdc, 0x9d, 0x00, 0x59, 0x36, 0xa0, 0x9f, 0xc1, 0x6a, 0x0e, 0xfb, 0x9b, + 0x46, 0x74, 0xd3, 0x18, 0xd1, 0xff, 0x67, 0xba, 0xff, 0x5d, 0x87, 0x65, 0x95, 0x22, 0x6e, 0xe5, + 0x07, 0x34, 0x1d, 0xa9, 0x22, 0x90, 0x42, 0xa1, 0x4f, 0xee, 0x14, 0xfb, 0x84, 0xc7, 0xe0, 0x86, + 0x60, 0x7d, 0x6b, 0x89, 0x6f, 0x23, 0x85, 0x4b, 0xb9, 0x14, 0xea, 0x78, 0xd5, 0x8d, 0x78, 0x3d, + 0x84, 0x16, 0x23, 0xbd, 0x34, 0xa6, 0x9e, 0xf8, 0xd5, 0x10, 0xad, 0x00, 0x52, 0x75, 0xc9, 0x0d, + 0x0e, 0x60, 0xa5, 0x8b, 0x7b, 0xfd, 0x20, 0xba, 0xf6, 0xae, 0x82, 0x50, 0x07, 0xbb, 0xa5, 0x74, + 0x17, 0x41, 0x28, 0x86, 0x38, 0x4b, 0x71, 0x4a, 0xac, 0xa6, 0x3c, 0x9f, 0x10, 0xb8, 0xb6, 0xc7, + 0xeb, 0xd5, 0xba, 0xbb, 0x5f, 0xe3, 0x5a, 0x21, 0xa0, 0x8f, 0xf8, 0x29, 0x59, 0x9f, 0x59, 0x20, + 0xd2, 0x63, 0x17, 0x0a, 0x55, 0xa4, 0x49, 0x25, 0x47, 0x1a, 0xa2, 0xc7, 0xb0, 0x41, 0xc9, 0x00, + 0x07, 0x91, 0xc7, 0xd4, 0x0d, 0xc8, 0xac, 0xd6, 0x7e, 0xf5, 0xb0, 0xee, 0xae, 0x4b, 0xbd, 0xbe, + 0x18, 0x95, 0xa9, 0xec, 0x5c, 0x4f, 0x37, 0xf7, 0x8a, 0x38, 0xd1, 0x3a, 0xcd, 0x77, 0x34, 0x3a, + 0x84, 0x8d, 0x10, 0xb3, 0xd4, 0x1b, 0xc4, 0x7e, 0x70, 0x35, 0xf2, 0xd2, 0x60, 0x40, 0xac, 0x55, + 0x61, 0xba, 0xc6, 0xf5, 0x2f, 0x85, 0xfa, 0x55, 0x30, 0x20, 0xe8, 0x11, 0xac, 0xf1, 0xa8, 0x8a, + 0xd3, 0xcb, 0x20, 0xad, 0x09, 0xbb, 0x15, 0xae, 0xe5, 0xe7, 0x17, 0x61, 0x3a, 0x86, 0xed, 0xe2, + 0xd6, 0x9e, 0x1f, 0x30, 0xd9, 0xd6, 0xeb, 0x22, 0x6d, 0xf7, 0x0b, 0x18, 0x3a, 0xea, 0x37, 0x7a, + 0x0e, 0x0f, 0x86, 0xbc, 0xcd, 0xbd, 0x01, 0xa6, 0x7d, 0xbe, 0xaa, 0xef, 0x89, 0x60, 0x79, 0xba, + 0x69, 0x36, 0xc4, 0xfa, 0xed, 0xe1, 0xb4, 0x59, 0x60, 0x7f, 0x0b, 0x30, 0x0e, 0x5c, 0x49, 0x05, + 0xbe, 0x6f, 0x56, 0x60, 0xeb, 0x68, 0xa3, 0xd8, 0x14, 0x66, 0x4d, 0xbe, 0x86, 0x7b, 0x25, 0x97, + 0x09, 0x2f, 0x2a, 0x2c, 0xbe, 0xf4, 0xe5, 0x89, 0x33, 0x7d, 0xd9, 0xe5, 0x69, 0x5c, 0xb6, 0x35, + 0xf3, 0xb2, 0x3d, 0xfa, 0x07, 0x60, 0x4d, 0x33, 0x1a, 0x42, 0x6f, 0x83, 0x1e, 0x41, 0xdf, 0xc3, + 0x6a, 0x8e, 0xa6, 0xa3, 0xdd, 0x42, 0x55, 0xe4, 0x98, 0xbe, 0xfd, 0x60, 0xca, 0x5f, 0x39, 0x0c, + 0x9d, 0x0a, 0x3a, 0xc9, 0xfc, 0x75, 0x48, 0x48, 0x52, 0x82, 0xb6, 0xda, 0xf2, 0x45, 0xd1, 0xd6, + 0x2f, 0x8a, 0xf6, 0x39, 0x7f, 0x51, 0xd8, 0x53, 0xf4, 0x4e, 0x05, 0x9d, 0x02, 0x8c, 0x59, 0xff, + 0xd4, 0xf5, 0xc5, 0xea, 0x35, 0x5e, 0x08, 0x4e, 0x05, 0x75, 0xa0, 0x65, 0x10, 0xff, 0xa9, 0x4e, + 0x76, 0x0a, 0x4e, 0xcc, 0x57, 0x82, 0x53, 0x41, 0x17, 0xb0, 0x62, 0x92, 0xff, 0xa9, 0x6e, 0x26, + 0x62, 0x66, 0x3e, 0x15, 0x9c, 0x0a, 0xfa, 0x3a, 0x0b, 0x8a, 0x7c, 0x01, 0x4c, 0x75, 0x54, 0x0c, + 0x6f, 0xfe, 0xc1, 0xe0, 0x54, 0x8c, 0x74, 0x49, 0x06, 0x3f, 0x91, 0xae, 0xdc, 0xf3, 0xa0, 0xc4, + 0x9f, 0x49, 0xfb, 0x9d, 0x0a, 0x7a, 0x05, 0xeb, 0x05, 0x8a, 0x8b, 0xf6, 0x66, 0x93, 0x6c, 0xfb, + 0xe1, 0xd4, 0xff, 0x25, 0x28, 0x25, 0x8d, 0x9d, 0x40, 0x99, 0x63, 0xc2, 0x13, 0x28, 0xf3, 0xdc, + 0xd7, 0xa9, 0xa0, 0x73, 0xd9, 0x62, 0xb2, 0x27, 0xd0, 0xb6, 0xd9, 0x41, 0x39, 0x5e, 0x37, 0x2e, + 0x8a, 0x49, 0x0a, 0x2b, 0xd2, 0xd0, 0x32, 0x38, 0x25, 0x2a, 0x18, 0x9b, 0x74, 0x75, 0x5c, 0x18, + 0x25, 0x24, 0xd4, 0xa9, 0xa0, 0x5f, 0x25, 0xc7, 0xce, 0xf5, 0x2a, 0xda, 0x37, 0xd7, 0x94, 0xd1, + 0x4e, 0xfb, 0x60, 0x86, 0x45, 0xd1, 0x77, 0x8e, 0xfd, 0xe5, 0x7d, 0x97, 0x11, 0xc9, 0xbc, 0xef, + 0x52, 0xea, 0xa8, 0x13, 0x63, 0x30, 0x3b, 0x33, 0x31, 0x93, 0x44, 0xd1, 0x4c, 0x4c, 0x09, 0x1d, + 0x74, 0x2a, 0xe8, 0x35, 0x7f, 0xa0, 0x17, 0xe9, 0x1a, 0x3a, 0x18, 0x2f, 0x9b, 0xc2, 0x00, 0x6d, + 0x67, 0x96, 0x49, 0xe6, 0xfe, 0x4f, 0xd8, 0x9d, 0xc5, 0xc1, 0xd0, 0x07, 0xda, 0xcb, 0x5b, 0x50, + 0x3d, 0xfb, 0xc3, 0xb7, 0x33, 0xd6, 0x9b, 0x77, 0x1b, 0xa2, 0x37, 0x3f, 0xfe, 0x2f, 0x00, 0x00, + 0xff, 0xff, 0x14, 0x25, 0x33, 0x7d, 0x29, 0x11, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// ReplicaServiceClient is the client API for ReplicaService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type ReplicaServiceClient interface { + ReplicaCreate(ctx context.Context, in *ReplicaCreateRequest, opts ...grpc.CallOption) (*ReplicaCreateResponse, error) + ReplicaDelete(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*empty.Empty, error) + ReplicaGet(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*ReplicaGetResponse, error) + ReplicaOpen(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*ReplicaOpenResponse, error) + ReplicaClose(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*ReplicaCloseResponse, error) + ReplicaReload(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*ReplicaReloadResponse, error) + ReplicaRevert(ctx context.Context, in *ReplicaRevertRequest, opts ...grpc.CallOption) (*ReplicaRevertResponse, error) + ReplicaSnapshot(ctx context.Context, in *ReplicaSnapshotRequest, opts ...grpc.CallOption) (*ReplicaSnapshotResponse, error) + ReplicaExpand(ctx context.Context, in *ReplicaExpandRequest, opts ...grpc.CallOption) (*ReplicaExpandResponse, error) + DiskRemove(ctx context.Context, in *DiskRemoveRequest, opts ...grpc.CallOption) (*DiskRemoveResponse, error) + DiskReplace(ctx context.Context, in *DiskReplaceRequest, opts ...grpc.CallOption) (*DiskReplaceResponse, error) + DiskPrepareRemove(ctx context.Context, in *DiskPrepareRemoveRequest, opts ...grpc.CallOption) (*DiskPrepareRemoveResponse, error) + DiskMarkAsRemoved(ctx context.Context, in *DiskMarkAsRemovedRequest, opts ...grpc.CallOption) (*DiskMarkAsRemovedResponse, error) + RebuildingSet(ctx context.Context, in *RebuildingSetRequest, opts ...grpc.CallOption) (*RebuildingSetResponse, error) + RevisionCounterSet(ctx context.Context, in *RevisionCounterSetRequest, opts ...grpc.CallOption) (*RevisionCounterSetResponse, error) + UnmapMarkDiskChainRemovedSet(ctx context.Context, in *UnmapMarkDiskChainRemovedSetRequest, opts ...grpc.CallOption) (*UnmapMarkDiskChainRemovedSetResponse, error) +} + +type replicaServiceClient struct { + cc *grpc.ClientConn +} + +func NewReplicaServiceClient(cc *grpc.ClientConn) ReplicaServiceClient { + return &replicaServiceClient{cc} +} + +func (c *replicaServiceClient) ReplicaCreate(ctx context.Context, in *ReplicaCreateRequest, opts ...grpc.CallOption) (*ReplicaCreateResponse, error) { + out := new(ReplicaCreateResponse) + err := c.cc.Invoke(ctx, "/ptypes.ReplicaService/ReplicaCreate", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *replicaServiceClient) ReplicaDelete(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*empty.Empty, error) { + out := new(empty.Empty) + err := c.cc.Invoke(ctx, "/ptypes.ReplicaService/ReplicaDelete", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *replicaServiceClient) ReplicaGet(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*ReplicaGetResponse, error) { + out := new(ReplicaGetResponse) + err := c.cc.Invoke(ctx, "/ptypes.ReplicaService/ReplicaGet", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *replicaServiceClient) ReplicaOpen(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*ReplicaOpenResponse, error) { + out := new(ReplicaOpenResponse) + err := c.cc.Invoke(ctx, "/ptypes.ReplicaService/ReplicaOpen", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *replicaServiceClient) ReplicaClose(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*ReplicaCloseResponse, error) { + out := new(ReplicaCloseResponse) + err := c.cc.Invoke(ctx, "/ptypes.ReplicaService/ReplicaClose", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *replicaServiceClient) ReplicaReload(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*ReplicaReloadResponse, error) { + out := new(ReplicaReloadResponse) + err := c.cc.Invoke(ctx, "/ptypes.ReplicaService/ReplicaReload", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *replicaServiceClient) ReplicaRevert(ctx context.Context, in *ReplicaRevertRequest, opts ...grpc.CallOption) (*ReplicaRevertResponse, error) { + out := new(ReplicaRevertResponse) + err := c.cc.Invoke(ctx, "/ptypes.ReplicaService/ReplicaRevert", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *replicaServiceClient) ReplicaSnapshot(ctx context.Context, in *ReplicaSnapshotRequest, opts ...grpc.CallOption) (*ReplicaSnapshotResponse, error) { + out := new(ReplicaSnapshotResponse) + err := c.cc.Invoke(ctx, "/ptypes.ReplicaService/ReplicaSnapshot", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *replicaServiceClient) ReplicaExpand(ctx context.Context, in *ReplicaExpandRequest, opts ...grpc.CallOption) (*ReplicaExpandResponse, error) { + out := new(ReplicaExpandResponse) + err := c.cc.Invoke(ctx, "/ptypes.ReplicaService/ReplicaExpand", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *replicaServiceClient) DiskRemove(ctx context.Context, in *DiskRemoveRequest, opts ...grpc.CallOption) (*DiskRemoveResponse, error) { + out := new(DiskRemoveResponse) + err := c.cc.Invoke(ctx, "/ptypes.ReplicaService/DiskRemove", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *replicaServiceClient) DiskReplace(ctx context.Context, in *DiskReplaceRequest, opts ...grpc.CallOption) (*DiskReplaceResponse, error) { + out := new(DiskReplaceResponse) + err := c.cc.Invoke(ctx, "/ptypes.ReplicaService/DiskReplace", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *replicaServiceClient) DiskPrepareRemove(ctx context.Context, in *DiskPrepareRemoveRequest, opts ...grpc.CallOption) (*DiskPrepareRemoveResponse, error) { + out := new(DiskPrepareRemoveResponse) + err := c.cc.Invoke(ctx, "/ptypes.ReplicaService/DiskPrepareRemove", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *replicaServiceClient) DiskMarkAsRemoved(ctx context.Context, in *DiskMarkAsRemovedRequest, opts ...grpc.CallOption) (*DiskMarkAsRemovedResponse, error) { + out := new(DiskMarkAsRemovedResponse) + err := c.cc.Invoke(ctx, "/ptypes.ReplicaService/DiskMarkAsRemoved", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *replicaServiceClient) RebuildingSet(ctx context.Context, in *RebuildingSetRequest, opts ...grpc.CallOption) (*RebuildingSetResponse, error) { + out := new(RebuildingSetResponse) + err := c.cc.Invoke(ctx, "/ptypes.ReplicaService/RebuildingSet", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *replicaServiceClient) RevisionCounterSet(ctx context.Context, in *RevisionCounterSetRequest, opts ...grpc.CallOption) (*RevisionCounterSetResponse, error) { + out := new(RevisionCounterSetResponse) + err := c.cc.Invoke(ctx, "/ptypes.ReplicaService/RevisionCounterSet", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *replicaServiceClient) UnmapMarkDiskChainRemovedSet(ctx context.Context, in *UnmapMarkDiskChainRemovedSetRequest, opts ...grpc.CallOption) (*UnmapMarkDiskChainRemovedSetResponse, error) { + out := new(UnmapMarkDiskChainRemovedSetResponse) + err := c.cc.Invoke(ctx, "/ptypes.ReplicaService/UnmapMarkDiskChainRemovedSet", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// ReplicaServiceServer is the server API for ReplicaService service. +type ReplicaServiceServer interface { + ReplicaCreate(context.Context, *ReplicaCreateRequest) (*ReplicaCreateResponse, error) + ReplicaDelete(context.Context, *empty.Empty) (*empty.Empty, error) + ReplicaGet(context.Context, *empty.Empty) (*ReplicaGetResponse, error) + ReplicaOpen(context.Context, *empty.Empty) (*ReplicaOpenResponse, error) + ReplicaClose(context.Context, *empty.Empty) (*ReplicaCloseResponse, error) + ReplicaReload(context.Context, *empty.Empty) (*ReplicaReloadResponse, error) + ReplicaRevert(context.Context, *ReplicaRevertRequest) (*ReplicaRevertResponse, error) + ReplicaSnapshot(context.Context, *ReplicaSnapshotRequest) (*ReplicaSnapshotResponse, error) + ReplicaExpand(context.Context, *ReplicaExpandRequest) (*ReplicaExpandResponse, error) + DiskRemove(context.Context, *DiskRemoveRequest) (*DiskRemoveResponse, error) + DiskReplace(context.Context, *DiskReplaceRequest) (*DiskReplaceResponse, error) + DiskPrepareRemove(context.Context, *DiskPrepareRemoveRequest) (*DiskPrepareRemoveResponse, error) + DiskMarkAsRemoved(context.Context, *DiskMarkAsRemovedRequest) (*DiskMarkAsRemovedResponse, error) + RebuildingSet(context.Context, *RebuildingSetRequest) (*RebuildingSetResponse, error) + RevisionCounterSet(context.Context, *RevisionCounterSetRequest) (*RevisionCounterSetResponse, error) + UnmapMarkDiskChainRemovedSet(context.Context, *UnmapMarkDiskChainRemovedSetRequest) (*UnmapMarkDiskChainRemovedSetResponse, error) +} + +// UnimplementedReplicaServiceServer can be embedded to have forward compatible implementations. +type UnimplementedReplicaServiceServer struct { +} + +func (*UnimplementedReplicaServiceServer) ReplicaCreate(ctx context.Context, req *ReplicaCreateRequest) (*ReplicaCreateResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ReplicaCreate not implemented") +} +func (*UnimplementedReplicaServiceServer) ReplicaDelete(ctx context.Context, req *empty.Empty) (*empty.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method ReplicaDelete not implemented") +} +func (*UnimplementedReplicaServiceServer) ReplicaGet(ctx context.Context, req *empty.Empty) (*ReplicaGetResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ReplicaGet not implemented") +} +func (*UnimplementedReplicaServiceServer) ReplicaOpen(ctx context.Context, req *empty.Empty) (*ReplicaOpenResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ReplicaOpen not implemented") +} +func (*UnimplementedReplicaServiceServer) ReplicaClose(ctx context.Context, req *empty.Empty) (*ReplicaCloseResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ReplicaClose not implemented") +} +func (*UnimplementedReplicaServiceServer) ReplicaReload(ctx context.Context, req *empty.Empty) (*ReplicaReloadResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ReplicaReload not implemented") +} +func (*UnimplementedReplicaServiceServer) ReplicaRevert(ctx context.Context, req *ReplicaRevertRequest) (*ReplicaRevertResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ReplicaRevert not implemented") +} +func (*UnimplementedReplicaServiceServer) ReplicaSnapshot(ctx context.Context, req *ReplicaSnapshotRequest) (*ReplicaSnapshotResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ReplicaSnapshot not implemented") +} +func (*UnimplementedReplicaServiceServer) ReplicaExpand(ctx context.Context, req *ReplicaExpandRequest) (*ReplicaExpandResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ReplicaExpand not implemented") +} +func (*UnimplementedReplicaServiceServer) DiskRemove(ctx context.Context, req *DiskRemoveRequest) (*DiskRemoveResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DiskRemove not implemented") +} +func (*UnimplementedReplicaServiceServer) DiskReplace(ctx context.Context, req *DiskReplaceRequest) (*DiskReplaceResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DiskReplace not implemented") +} +func (*UnimplementedReplicaServiceServer) DiskPrepareRemove(ctx context.Context, req *DiskPrepareRemoveRequest) (*DiskPrepareRemoveResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DiskPrepareRemove not implemented") +} +func (*UnimplementedReplicaServiceServer) DiskMarkAsRemoved(ctx context.Context, req *DiskMarkAsRemovedRequest) (*DiskMarkAsRemovedResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DiskMarkAsRemoved not implemented") +} +func (*UnimplementedReplicaServiceServer) RebuildingSet(ctx context.Context, req *RebuildingSetRequest) (*RebuildingSetResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RebuildingSet not implemented") +} +func (*UnimplementedReplicaServiceServer) RevisionCounterSet(ctx context.Context, req *RevisionCounterSetRequest) (*RevisionCounterSetResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RevisionCounterSet not implemented") +} +func (*UnimplementedReplicaServiceServer) UnmapMarkDiskChainRemovedSet(ctx context.Context, req *UnmapMarkDiskChainRemovedSetRequest) (*UnmapMarkDiskChainRemovedSetResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UnmapMarkDiskChainRemovedSet not implemented") +} + +func RegisterReplicaServiceServer(s *grpc.Server, srv ReplicaServiceServer) { + s.RegisterService(&_ReplicaService_serviceDesc, srv) +} + +func _ReplicaService_ReplicaCreate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ReplicaCreateRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ReplicaServiceServer).ReplicaCreate(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ptypes.ReplicaService/ReplicaCreate", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ReplicaServiceServer).ReplicaCreate(ctx, req.(*ReplicaCreateRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ReplicaService_ReplicaDelete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(empty.Empty) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ReplicaServiceServer).ReplicaDelete(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ptypes.ReplicaService/ReplicaDelete", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ReplicaServiceServer).ReplicaDelete(ctx, req.(*empty.Empty)) + } + return interceptor(ctx, in, info, handler) +} + +func _ReplicaService_ReplicaGet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(empty.Empty) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ReplicaServiceServer).ReplicaGet(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ptypes.ReplicaService/ReplicaGet", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ReplicaServiceServer).ReplicaGet(ctx, req.(*empty.Empty)) + } + return interceptor(ctx, in, info, handler) +} + +func _ReplicaService_ReplicaOpen_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(empty.Empty) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ReplicaServiceServer).ReplicaOpen(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ptypes.ReplicaService/ReplicaOpen", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ReplicaServiceServer).ReplicaOpen(ctx, req.(*empty.Empty)) + } + return interceptor(ctx, in, info, handler) +} + +func _ReplicaService_ReplicaClose_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(empty.Empty) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ReplicaServiceServer).ReplicaClose(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ptypes.ReplicaService/ReplicaClose", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ReplicaServiceServer).ReplicaClose(ctx, req.(*empty.Empty)) + } + return interceptor(ctx, in, info, handler) +} + +func _ReplicaService_ReplicaReload_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(empty.Empty) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ReplicaServiceServer).ReplicaReload(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ptypes.ReplicaService/ReplicaReload", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ReplicaServiceServer).ReplicaReload(ctx, req.(*empty.Empty)) + } + return interceptor(ctx, in, info, handler) +} + +func _ReplicaService_ReplicaRevert_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ReplicaRevertRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ReplicaServiceServer).ReplicaRevert(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ptypes.ReplicaService/ReplicaRevert", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ReplicaServiceServer).ReplicaRevert(ctx, req.(*ReplicaRevertRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ReplicaService_ReplicaSnapshot_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ReplicaSnapshotRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ReplicaServiceServer).ReplicaSnapshot(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ptypes.ReplicaService/ReplicaSnapshot", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ReplicaServiceServer).ReplicaSnapshot(ctx, req.(*ReplicaSnapshotRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ReplicaService_ReplicaExpand_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ReplicaExpandRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ReplicaServiceServer).ReplicaExpand(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ptypes.ReplicaService/ReplicaExpand", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ReplicaServiceServer).ReplicaExpand(ctx, req.(*ReplicaExpandRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ReplicaService_DiskRemove_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DiskRemoveRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ReplicaServiceServer).DiskRemove(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ptypes.ReplicaService/DiskRemove", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ReplicaServiceServer).DiskRemove(ctx, req.(*DiskRemoveRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ReplicaService_DiskReplace_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DiskReplaceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ReplicaServiceServer).DiskReplace(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ptypes.ReplicaService/DiskReplace", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ReplicaServiceServer).DiskReplace(ctx, req.(*DiskReplaceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ReplicaService_DiskPrepareRemove_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DiskPrepareRemoveRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ReplicaServiceServer).DiskPrepareRemove(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ptypes.ReplicaService/DiskPrepareRemove", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ReplicaServiceServer).DiskPrepareRemove(ctx, req.(*DiskPrepareRemoveRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ReplicaService_DiskMarkAsRemoved_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DiskMarkAsRemovedRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ReplicaServiceServer).DiskMarkAsRemoved(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ptypes.ReplicaService/DiskMarkAsRemoved", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ReplicaServiceServer).DiskMarkAsRemoved(ctx, req.(*DiskMarkAsRemovedRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ReplicaService_RebuildingSet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RebuildingSetRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ReplicaServiceServer).RebuildingSet(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ptypes.ReplicaService/RebuildingSet", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ReplicaServiceServer).RebuildingSet(ctx, req.(*RebuildingSetRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ReplicaService_RevisionCounterSet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RevisionCounterSetRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ReplicaServiceServer).RevisionCounterSet(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ptypes.ReplicaService/RevisionCounterSet", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ReplicaServiceServer).RevisionCounterSet(ctx, req.(*RevisionCounterSetRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ReplicaService_UnmapMarkDiskChainRemovedSet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UnmapMarkDiskChainRemovedSetRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ReplicaServiceServer).UnmapMarkDiskChainRemovedSet(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ptypes.ReplicaService/UnmapMarkDiskChainRemovedSet", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ReplicaServiceServer).UnmapMarkDiskChainRemovedSet(ctx, req.(*UnmapMarkDiskChainRemovedSetRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _ReplicaService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "ptypes.ReplicaService", + HandlerType: (*ReplicaServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "ReplicaCreate", + Handler: _ReplicaService_ReplicaCreate_Handler, + }, + { + MethodName: "ReplicaDelete", + Handler: _ReplicaService_ReplicaDelete_Handler, + }, + { + MethodName: "ReplicaGet", + Handler: _ReplicaService_ReplicaGet_Handler, + }, + { + MethodName: "ReplicaOpen", + Handler: _ReplicaService_ReplicaOpen_Handler, + }, + { + MethodName: "ReplicaClose", + Handler: _ReplicaService_ReplicaClose_Handler, + }, + { + MethodName: "ReplicaReload", + Handler: _ReplicaService_ReplicaReload_Handler, + }, + { + MethodName: "ReplicaRevert", + Handler: _ReplicaService_ReplicaRevert_Handler, + }, + { + MethodName: "ReplicaSnapshot", + Handler: _ReplicaService_ReplicaSnapshot_Handler, + }, + { + MethodName: "ReplicaExpand", + Handler: _ReplicaService_ReplicaExpand_Handler, + }, + { + MethodName: "DiskRemove", + Handler: _ReplicaService_DiskRemove_Handler, + }, + { + MethodName: "DiskReplace", + Handler: _ReplicaService_DiskReplace_Handler, + }, + { + MethodName: "DiskPrepareRemove", + Handler: _ReplicaService_DiskPrepareRemove_Handler, + }, + { + MethodName: "DiskMarkAsRemoved", + Handler: _ReplicaService_DiskMarkAsRemoved_Handler, + }, + { + MethodName: "RebuildingSet", + Handler: _ReplicaService_RebuildingSet_Handler, + }, + { + MethodName: "RevisionCounterSet", + Handler: _ReplicaService_RevisionCounterSet_Handler, + }, + { + MethodName: "UnmapMarkDiskChainRemovedSet", + Handler: _ReplicaService_UnmapMarkDiskChainRemovedSet_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "replica.proto", +} diff --git a/vendor/github.com/longhorn/longhorn-engine/proto/ptypes/replica.proto b/vendor/github.com/longhorn/longhorn-engine/proto/ptypes/replica.proto new file mode 100644 index 000000000..15e85b11a --- /dev/null +++ b/vendor/github.com/longhorn/longhorn-engine/proto/ptypes/replica.proto @@ -0,0 +1,175 @@ +syntax="proto3"; + +package ptypes; + +import "google/protobuf/empty.proto"; + +service ReplicaService { + rpc ReplicaCreate(ReplicaCreateRequest) returns (ReplicaCreateResponse) {} + rpc ReplicaDelete(google.protobuf.Empty) returns (google.protobuf.Empty) {} + rpc ReplicaGet(google.protobuf.Empty) returns (ReplicaGetResponse) {} + rpc ReplicaOpen(google.protobuf.Empty) returns (ReplicaOpenResponse) {} + rpc ReplicaClose(google.protobuf.Empty) returns (ReplicaCloseResponse) {} + rpc ReplicaReload(google.protobuf.Empty) returns (ReplicaReloadResponse) {} + rpc ReplicaRevert(ReplicaRevertRequest) returns (ReplicaRevertResponse) {} + rpc ReplicaSnapshot(ReplicaSnapshotRequest) returns + (ReplicaSnapshotResponse) {} + rpc ReplicaExpand(ReplicaExpandRequest) returns (ReplicaExpandResponse) {} + rpc DiskRemove(DiskRemoveRequest) returns (DiskRemoveResponse) {} + rpc DiskReplace(DiskReplaceRequest) returns (DiskReplaceResponse) {} + rpc DiskPrepareRemove(DiskPrepareRemoveRequest) returns + (DiskPrepareRemoveResponse) {} + rpc DiskMarkAsRemoved(DiskMarkAsRemovedRequest) returns + (DiskMarkAsRemovedResponse) {} + rpc RebuildingSet(RebuildingSetRequest) returns (RebuildingSetResponse) {} + rpc RevisionCounterSet(RevisionCounterSetRequest) returns + (RevisionCounterSetResponse) {} + rpc UnmapMarkDiskChainRemovedSet(UnmapMarkDiskChainRemovedSetRequest) returns + (UnmapMarkDiskChainRemovedSetResponse) {} +} + +message ReplicaCreateRequest { + string size = 1; +} + +message ReplicaCreateResponse { + Replica replica = 1; +} + +message ReplicaGetResponse { + Replica replica = 1; +} + +message ReplicaOpenResponse { + Replica replica = 1; +} + +message ReplicaCloseResponse { + Replica replica = 1; +} + +message ReplicaReloadResponse { + Replica replica = 1; +} + +message ReplicaRevertRequest { + string name = 1; + string created = 2; +} + +message ReplicaRevertResponse { + Replica replica = 1; +} + +message ReplicaSnapshotRequest { + string name = 1; + bool user_created = 2; + string created = 3; + map labels = 4; +} + +message ReplicaSnapshotResponse { + Replica replica = 1; +} + +message ReplicaExpandRequest { + int64 size = 1; +} + +message ReplicaExpandResponse { + Replica replica = 1; +} + +message DiskRemoveRequest { + string name = 1; + bool force = 2; +} + +message DiskRemoveResponse { + Replica replica = 1; +} + +message DiskReplaceRequest { + string target = 1; + string source = 2; +} + +message DiskReplaceResponse { + Replica replica = 1; +} + +message DiskPrepareRemoveRequest { + string name = 1; +} + +message DiskPrepareRemoveResponse { + repeated PrepareRemoveAction operations = 1; +} + +message DiskMarkAsRemovedRequest { + string name = 1; +} + +message DiskMarkAsRemovedResponse { + Replica replica = 1; +} + +message RebuildingSetRequest { + bool rebuilding = 1; +} + +message RebuildingSetResponse { + Replica replica = 1; +} + +message RevisionCounterSetRequest { + int64 counter = 1; +} + +message RevisionCounterSetResponse { + Replica replica = 1; +} + +message UnmapMarkDiskChainRemovedSetRequest { + bool enabled = 1; +} + +message UnmapMarkDiskChainRemovedSetResponse { + Replica replica = 1; +} + +message DiskInfo { + string name = 1; + string parent = 2; + map children = 3; + bool removed = 4; + bool user_created = 5; + string created = 6; + string size = 7; + map labels = 8; +} + +message Replica { + bool dirty = 1; + bool rebuilding = 2; + string head = 3; + string parent = 4; + string size = 5; + int64 sector_size = 6; + string backing_file = 7; + string state = 8; + repeated string chain = 9; + map disks = 10; + int32 remain_snapshots = 11; + int64 revision_counter = 12; + int64 last_modify_time = 13; + int64 head_file_size = 14; + bool revision_counter_disabled = 15; + bool unmap_mark_disk_chain_removed = 16; +} + +message PrepareRemoveAction { + string action = 1; + string source = 2; + string target = 3; +} diff --git a/vendor/github.com/longhorn/longhorn-engine/proto/ptypes/syncagent.pb.go b/vendor/github.com/longhorn/longhorn-engine/proto/ptypes/syncagent.pb.go new file mode 100644 index 000000000..019252852 --- /dev/null +++ b/vendor/github.com/longhorn/longhorn-engine/proto/ptypes/syncagent.pb.go @@ -0,0 +1,2415 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: syncagent.proto + +package ptypes + +import ( + context "context" + fmt "fmt" + proto "github.com/golang/protobuf/proto" + empty "github.com/golang/protobuf/ptypes/empty" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + math "math" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package + +type FileRemoveRequest struct { + FileName string `protobuf:"bytes,1,opt,name=file_name,json=fileName,proto3" json:"file_name,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *FileRemoveRequest) Reset() { *m = FileRemoveRequest{} } +func (m *FileRemoveRequest) String() string { return proto.CompactTextString(m) } +func (*FileRemoveRequest) ProtoMessage() {} +func (*FileRemoveRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_68e10ca3dfff6283, []int{0} +} + +func (m *FileRemoveRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_FileRemoveRequest.Unmarshal(m, b) +} +func (m *FileRemoveRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_FileRemoveRequest.Marshal(b, m, deterministic) +} +func (m *FileRemoveRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_FileRemoveRequest.Merge(m, src) +} +func (m *FileRemoveRequest) XXX_Size() int { + return xxx_messageInfo_FileRemoveRequest.Size(m) +} +func (m *FileRemoveRequest) XXX_DiscardUnknown() { + xxx_messageInfo_FileRemoveRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_FileRemoveRequest proto.InternalMessageInfo + +func (m *FileRemoveRequest) GetFileName() string { + if m != nil { + return m.FileName + } + return "" +} + +type FileRenameRequest struct { + OldFileName string `protobuf:"bytes,1,opt,name=old_file_name,json=oldFileName,proto3" json:"old_file_name,omitempty"` + NewFileName string `protobuf:"bytes,2,opt,name=new_file_name,json=newFileName,proto3" json:"new_file_name,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *FileRenameRequest) Reset() { *m = FileRenameRequest{} } +func (m *FileRenameRequest) String() string { return proto.CompactTextString(m) } +func (*FileRenameRequest) ProtoMessage() {} +func (*FileRenameRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_68e10ca3dfff6283, []int{1} +} + +func (m *FileRenameRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_FileRenameRequest.Unmarshal(m, b) +} +func (m *FileRenameRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_FileRenameRequest.Marshal(b, m, deterministic) +} +func (m *FileRenameRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_FileRenameRequest.Merge(m, src) +} +func (m *FileRenameRequest) XXX_Size() int { + return xxx_messageInfo_FileRenameRequest.Size(m) +} +func (m *FileRenameRequest) XXX_DiscardUnknown() { + xxx_messageInfo_FileRenameRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_FileRenameRequest proto.InternalMessageInfo + +func (m *FileRenameRequest) GetOldFileName() string { + if m != nil { + return m.OldFileName + } + return "" +} + +func (m *FileRenameRequest) GetNewFileName() string { + if m != nil { + return m.NewFileName + } + return "" +} + +type ReceiverLaunchRequest struct { + ToFileName string `protobuf:"bytes,1,opt,name=to_file_name,json=toFileName,proto3" json:"to_file_name,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ReceiverLaunchRequest) Reset() { *m = ReceiverLaunchRequest{} } +func (m *ReceiverLaunchRequest) String() string { return proto.CompactTextString(m) } +func (*ReceiverLaunchRequest) ProtoMessage() {} +func (*ReceiverLaunchRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_68e10ca3dfff6283, []int{2} +} + +func (m *ReceiverLaunchRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ReceiverLaunchRequest.Unmarshal(m, b) +} +func (m *ReceiverLaunchRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ReceiverLaunchRequest.Marshal(b, m, deterministic) +} +func (m *ReceiverLaunchRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_ReceiverLaunchRequest.Merge(m, src) +} +func (m *ReceiverLaunchRequest) XXX_Size() int { + return xxx_messageInfo_ReceiverLaunchRequest.Size(m) +} +func (m *ReceiverLaunchRequest) XXX_DiscardUnknown() { + xxx_messageInfo_ReceiverLaunchRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_ReceiverLaunchRequest proto.InternalMessageInfo + +func (m *ReceiverLaunchRequest) GetToFileName() string { + if m != nil { + return m.ToFileName + } + return "" +} + +type ReceiverLaunchResponse struct { + Port int32 `protobuf:"varint,1,opt,name=port,proto3" json:"port,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ReceiverLaunchResponse) Reset() { *m = ReceiverLaunchResponse{} } +func (m *ReceiverLaunchResponse) String() string { return proto.CompactTextString(m) } +func (*ReceiverLaunchResponse) ProtoMessage() {} +func (*ReceiverLaunchResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_68e10ca3dfff6283, []int{3} +} + +func (m *ReceiverLaunchResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ReceiverLaunchResponse.Unmarshal(m, b) +} +func (m *ReceiverLaunchResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ReceiverLaunchResponse.Marshal(b, m, deterministic) +} +func (m *ReceiverLaunchResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_ReceiverLaunchResponse.Merge(m, src) +} +func (m *ReceiverLaunchResponse) XXX_Size() int { + return xxx_messageInfo_ReceiverLaunchResponse.Size(m) +} +func (m *ReceiverLaunchResponse) XXX_DiscardUnknown() { + xxx_messageInfo_ReceiverLaunchResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_ReceiverLaunchResponse proto.InternalMessageInfo + +func (m *ReceiverLaunchResponse) GetPort() int32 { + if m != nil { + return m.Port + } + return 0 +} + +type FileSendRequest struct { + FromFileName string `protobuf:"bytes,1,opt,name=from_file_name,json=fromFileName,proto3" json:"from_file_name,omitempty"` + Host string `protobuf:"bytes,2,opt,name=host,proto3" json:"host,omitempty"` + Port int32 `protobuf:"varint,3,opt,name=port,proto3" json:"port,omitempty"` + FastSync bool `protobuf:"varint,4,opt,name=fast_sync,json=fastSync,proto3" json:"fast_sync,omitempty"` + FileSyncHttpClientTimeout int32 `protobuf:"varint,5,opt,name=file_sync_http_client_timeout,json=fileSyncHttpClientTimeout,proto3" json:"file_sync_http_client_timeout,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *FileSendRequest) Reset() { *m = FileSendRequest{} } +func (m *FileSendRequest) String() string { return proto.CompactTextString(m) } +func (*FileSendRequest) ProtoMessage() {} +func (*FileSendRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_68e10ca3dfff6283, []int{4} +} + +func (m *FileSendRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_FileSendRequest.Unmarshal(m, b) +} +func (m *FileSendRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_FileSendRequest.Marshal(b, m, deterministic) +} +func (m *FileSendRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_FileSendRequest.Merge(m, src) +} +func (m *FileSendRequest) XXX_Size() int { + return xxx_messageInfo_FileSendRequest.Size(m) +} +func (m *FileSendRequest) XXX_DiscardUnknown() { + xxx_messageInfo_FileSendRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_FileSendRequest proto.InternalMessageInfo + +func (m *FileSendRequest) GetFromFileName() string { + if m != nil { + return m.FromFileName + } + return "" +} + +func (m *FileSendRequest) GetHost() string { + if m != nil { + return m.Host + } + return "" +} + +func (m *FileSendRequest) GetPort() int32 { + if m != nil { + return m.Port + } + return 0 +} + +func (m *FileSendRequest) GetFastSync() bool { + if m != nil { + return m.FastSync + } + return false +} + +func (m *FileSendRequest) GetFileSyncHttpClientTimeout() int32 { + if m != nil { + return m.FileSyncHttpClientTimeout + } + return 0 +} + +type FilesSyncRequest struct { + FromAddress string `protobuf:"bytes,1,opt,name=from_address,json=fromAddress,proto3" json:"from_address,omitempty"` + ToHost string `protobuf:"bytes,2,opt,name=to_host,json=toHost,proto3" json:"to_host,omitempty"` + SyncFileInfoList []*SyncFileInfo `protobuf:"bytes,3,rep,name=sync_file_info_list,json=syncFileInfoList,proto3" json:"sync_file_info_list,omitempty"` + FastSync bool `protobuf:"varint,4,opt,name=fast_sync,json=fastSync,proto3" json:"fast_sync,omitempty"` + FileSyncHttpClientTimeout int32 `protobuf:"varint,5,opt,name=file_sync_http_client_timeout,json=fileSyncHttpClientTimeout,proto3" json:"file_sync_http_client_timeout,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *FilesSyncRequest) Reset() { *m = FilesSyncRequest{} } +func (m *FilesSyncRequest) String() string { return proto.CompactTextString(m) } +func (*FilesSyncRequest) ProtoMessage() {} +func (*FilesSyncRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_68e10ca3dfff6283, []int{5} +} + +func (m *FilesSyncRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_FilesSyncRequest.Unmarshal(m, b) +} +func (m *FilesSyncRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_FilesSyncRequest.Marshal(b, m, deterministic) +} +func (m *FilesSyncRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_FilesSyncRequest.Merge(m, src) +} +func (m *FilesSyncRequest) XXX_Size() int { + return xxx_messageInfo_FilesSyncRequest.Size(m) +} +func (m *FilesSyncRequest) XXX_DiscardUnknown() { + xxx_messageInfo_FilesSyncRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_FilesSyncRequest proto.InternalMessageInfo + +func (m *FilesSyncRequest) GetFromAddress() string { + if m != nil { + return m.FromAddress + } + return "" +} + +func (m *FilesSyncRequest) GetToHost() string { + if m != nil { + return m.ToHost + } + return "" +} + +func (m *FilesSyncRequest) GetSyncFileInfoList() []*SyncFileInfo { + if m != nil { + return m.SyncFileInfoList + } + return nil +} + +func (m *FilesSyncRequest) GetFastSync() bool { + if m != nil { + return m.FastSync + } + return false +} + +func (m *FilesSyncRequest) GetFileSyncHttpClientTimeout() int32 { + if m != nil { + return m.FileSyncHttpClientTimeout + } + return 0 +} + +type SnapshotCloneRequest struct { + FromAddress string `protobuf:"bytes,1,opt,name=from_address,json=fromAddress,proto3" json:"from_address,omitempty"` + ToHost string `protobuf:"bytes,2,opt,name=to_host,json=toHost,proto3" json:"to_host,omitempty"` + SnapshotFileName string `protobuf:"bytes,3,opt,name=snapshot_file_name,json=snapshotFileName,proto3" json:"snapshot_file_name,omitempty"` + ExportBackingImageIfExist bool `protobuf:"varint,4,opt,name=export_backing_image_if_exist,json=exportBackingImageIfExist,proto3" json:"export_backing_image_if_exist,omitempty"` + FileSyncHttpClientTimeout int32 `protobuf:"varint,5,opt,name=file_sync_http_client_timeout,json=fileSyncHttpClientTimeout,proto3" json:"file_sync_http_client_timeout,omitempty"` + FromVolumeName string `protobuf:"bytes,6,opt,name=from_volume_name,json=fromVolumeName,proto3" json:"from_volume_name,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SnapshotCloneRequest) Reset() { *m = SnapshotCloneRequest{} } +func (m *SnapshotCloneRequest) String() string { return proto.CompactTextString(m) } +func (*SnapshotCloneRequest) ProtoMessage() {} +func (*SnapshotCloneRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_68e10ca3dfff6283, []int{6} +} + +func (m *SnapshotCloneRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SnapshotCloneRequest.Unmarshal(m, b) +} +func (m *SnapshotCloneRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SnapshotCloneRequest.Marshal(b, m, deterministic) +} +func (m *SnapshotCloneRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_SnapshotCloneRequest.Merge(m, src) +} +func (m *SnapshotCloneRequest) XXX_Size() int { + return xxx_messageInfo_SnapshotCloneRequest.Size(m) +} +func (m *SnapshotCloneRequest) XXX_DiscardUnknown() { + xxx_messageInfo_SnapshotCloneRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_SnapshotCloneRequest proto.InternalMessageInfo + +func (m *SnapshotCloneRequest) GetFromAddress() string { + if m != nil { + return m.FromAddress + } + return "" +} + +func (m *SnapshotCloneRequest) GetToHost() string { + if m != nil { + return m.ToHost + } + return "" +} + +func (m *SnapshotCloneRequest) GetSnapshotFileName() string { + if m != nil { + return m.SnapshotFileName + } + return "" +} + +func (m *SnapshotCloneRequest) GetExportBackingImageIfExist() bool { + if m != nil { + return m.ExportBackingImageIfExist + } + return false +} + +func (m *SnapshotCloneRequest) GetFileSyncHttpClientTimeout() int32 { + if m != nil { + return m.FileSyncHttpClientTimeout + } + return 0 +} + +func (m *SnapshotCloneRequest) GetFromVolumeName() string { + if m != nil { + return m.FromVolumeName + } + return "" +} + +type VolumeExportRequest struct { + SnapshotFileName string `protobuf:"bytes,1,opt,name=snapshot_file_name,json=snapshotFileName,proto3" json:"snapshot_file_name,omitempty"` + Host string `protobuf:"bytes,2,opt,name=host,proto3" json:"host,omitempty"` + Port int32 `protobuf:"varint,3,opt,name=port,proto3" json:"port,omitempty"` + ExportBackingImageIfExist bool `protobuf:"varint,4,opt,name=export_backing_image_if_exist,json=exportBackingImageIfExist,proto3" json:"export_backing_image_if_exist,omitempty"` + FileSyncHttpClientTimeout int32 `protobuf:"varint,5,opt,name=file_sync_http_client_timeout,json=fileSyncHttpClientTimeout,proto3" json:"file_sync_http_client_timeout,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *VolumeExportRequest) Reset() { *m = VolumeExportRequest{} } +func (m *VolumeExportRequest) String() string { return proto.CompactTextString(m) } +func (*VolumeExportRequest) ProtoMessage() {} +func (*VolumeExportRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_68e10ca3dfff6283, []int{7} +} + +func (m *VolumeExportRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_VolumeExportRequest.Unmarshal(m, b) +} +func (m *VolumeExportRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_VolumeExportRequest.Marshal(b, m, deterministic) +} +func (m *VolumeExportRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_VolumeExportRequest.Merge(m, src) +} +func (m *VolumeExportRequest) XXX_Size() int { + return xxx_messageInfo_VolumeExportRequest.Size(m) +} +func (m *VolumeExportRequest) XXX_DiscardUnknown() { + xxx_messageInfo_VolumeExportRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_VolumeExportRequest proto.InternalMessageInfo + +func (m *VolumeExportRequest) GetSnapshotFileName() string { + if m != nil { + return m.SnapshotFileName + } + return "" +} + +func (m *VolumeExportRequest) GetHost() string { + if m != nil { + return m.Host + } + return "" +} + +func (m *VolumeExportRequest) GetPort() int32 { + if m != nil { + return m.Port + } + return 0 +} + +func (m *VolumeExportRequest) GetExportBackingImageIfExist() bool { + if m != nil { + return m.ExportBackingImageIfExist + } + return false +} + +func (m *VolumeExportRequest) GetFileSyncHttpClientTimeout() int32 { + if m != nil { + return m.FileSyncHttpClientTimeout + } + return 0 +} + +type BackupCreateRequest struct { + SnapshotFileName string `protobuf:"bytes,1,opt,name=snapshot_file_name,json=snapshotFileName,proto3" json:"snapshot_file_name,omitempty"` + BackupTarget string `protobuf:"bytes,2,opt,name=backup_target,json=backupTarget,proto3" json:"backup_target,omitempty"` + VolumeName string `protobuf:"bytes,3,opt,name=volume_name,json=volumeName,proto3" json:"volume_name,omitempty"` + Labels []string `protobuf:"bytes,4,rep,name=labels,proto3" json:"labels,omitempty"` + Credential map[string]string `protobuf:"bytes,5,rep,name=credential,proto3" json:"credential,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + BackingImageName string `protobuf:"bytes,6,opt,name=backing_image_name,json=backingImageName,proto3" json:"backing_image_name,omitempty"` + BackingImageChecksum string `protobuf:"bytes,7,opt,name=backing_image_checksum,json=backingImageChecksum,proto3" json:"backing_image_checksum,omitempty"` + BackupName string `protobuf:"bytes,8,opt,name=backup_name,json=backupName,proto3" json:"backup_name,omitempty"` + CompressionMethod string `protobuf:"bytes,9,opt,name=compression_method,json=compressionMethod,proto3" json:"compression_method,omitempty"` + ConcurrentLimit int32 `protobuf:"varint,10,opt,name=concurrent_limit,json=concurrentLimit,proto3" json:"concurrent_limit,omitempty"` + StorageClassName string `protobuf:"bytes,11,opt,name=storage_class_name,json=storageClassName,proto3" json:"storage_class_name,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *BackupCreateRequest) Reset() { *m = BackupCreateRequest{} } +func (m *BackupCreateRequest) String() string { return proto.CompactTextString(m) } +func (*BackupCreateRequest) ProtoMessage() {} +func (*BackupCreateRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_68e10ca3dfff6283, []int{8} +} + +func (m *BackupCreateRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_BackupCreateRequest.Unmarshal(m, b) +} +func (m *BackupCreateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_BackupCreateRequest.Marshal(b, m, deterministic) +} +func (m *BackupCreateRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_BackupCreateRequest.Merge(m, src) +} +func (m *BackupCreateRequest) XXX_Size() int { + return xxx_messageInfo_BackupCreateRequest.Size(m) +} +func (m *BackupCreateRequest) XXX_DiscardUnknown() { + xxx_messageInfo_BackupCreateRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_BackupCreateRequest proto.InternalMessageInfo + +func (m *BackupCreateRequest) GetSnapshotFileName() string { + if m != nil { + return m.SnapshotFileName + } + return "" +} + +func (m *BackupCreateRequest) GetBackupTarget() string { + if m != nil { + return m.BackupTarget + } + return "" +} + +func (m *BackupCreateRequest) GetVolumeName() string { + if m != nil { + return m.VolumeName + } + return "" +} + +func (m *BackupCreateRequest) GetLabels() []string { + if m != nil { + return m.Labels + } + return nil +} + +func (m *BackupCreateRequest) GetCredential() map[string]string { + if m != nil { + return m.Credential + } + return nil +} + +func (m *BackupCreateRequest) GetBackingImageName() string { + if m != nil { + return m.BackingImageName + } + return "" +} + +func (m *BackupCreateRequest) GetBackingImageChecksum() string { + if m != nil { + return m.BackingImageChecksum + } + return "" +} + +func (m *BackupCreateRequest) GetBackupName() string { + if m != nil { + return m.BackupName + } + return "" +} + +func (m *BackupCreateRequest) GetCompressionMethod() string { + if m != nil { + return m.CompressionMethod + } + return "" +} + +func (m *BackupCreateRequest) GetConcurrentLimit() int32 { + if m != nil { + return m.ConcurrentLimit + } + return 0 +} + +func (m *BackupCreateRequest) GetStorageClassName() string { + if m != nil { + return m.StorageClassName + } + return "" +} + +type BackupCreateResponse struct { + Backup string `protobuf:"bytes,1,opt,name=backup,proto3" json:"backup,omitempty"` + IsIncremental bool `protobuf:"varint,2,opt,name=is_incremental,json=isIncremental,proto3" json:"is_incremental,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *BackupCreateResponse) Reset() { *m = BackupCreateResponse{} } +func (m *BackupCreateResponse) String() string { return proto.CompactTextString(m) } +func (*BackupCreateResponse) ProtoMessage() {} +func (*BackupCreateResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_68e10ca3dfff6283, []int{9} +} + +func (m *BackupCreateResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_BackupCreateResponse.Unmarshal(m, b) +} +func (m *BackupCreateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_BackupCreateResponse.Marshal(b, m, deterministic) +} +func (m *BackupCreateResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_BackupCreateResponse.Merge(m, src) +} +func (m *BackupCreateResponse) XXX_Size() int { + return xxx_messageInfo_BackupCreateResponse.Size(m) +} +func (m *BackupCreateResponse) XXX_DiscardUnknown() { + xxx_messageInfo_BackupCreateResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_BackupCreateResponse proto.InternalMessageInfo + +func (m *BackupCreateResponse) GetBackup() string { + if m != nil { + return m.Backup + } + return "" +} + +func (m *BackupCreateResponse) GetIsIncremental() bool { + if m != nil { + return m.IsIncremental + } + return false +} + +type BackupRemoveRequest struct { + Backup string `protobuf:"bytes,1,opt,name=backup,proto3" json:"backup,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *BackupRemoveRequest) Reset() { *m = BackupRemoveRequest{} } +func (m *BackupRemoveRequest) String() string { return proto.CompactTextString(m) } +func (*BackupRemoveRequest) ProtoMessage() {} +func (*BackupRemoveRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_68e10ca3dfff6283, []int{10} +} + +func (m *BackupRemoveRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_BackupRemoveRequest.Unmarshal(m, b) +} +func (m *BackupRemoveRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_BackupRemoveRequest.Marshal(b, m, deterministic) +} +func (m *BackupRemoveRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_BackupRemoveRequest.Merge(m, src) +} +func (m *BackupRemoveRequest) XXX_Size() int { + return xxx_messageInfo_BackupRemoveRequest.Size(m) +} +func (m *BackupRemoveRequest) XXX_DiscardUnknown() { + xxx_messageInfo_BackupRemoveRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_BackupRemoveRequest proto.InternalMessageInfo + +func (m *BackupRemoveRequest) GetBackup() string { + if m != nil { + return m.Backup + } + return "" +} + +type BackupStatusRequest struct { + Backup string `protobuf:"bytes,1,opt,name=backup,proto3" json:"backup,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *BackupStatusRequest) Reset() { *m = BackupStatusRequest{} } +func (m *BackupStatusRequest) String() string { return proto.CompactTextString(m) } +func (*BackupStatusRequest) ProtoMessage() {} +func (*BackupStatusRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_68e10ca3dfff6283, []int{11} +} + +func (m *BackupStatusRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_BackupStatusRequest.Unmarshal(m, b) +} +func (m *BackupStatusRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_BackupStatusRequest.Marshal(b, m, deterministic) +} +func (m *BackupStatusRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_BackupStatusRequest.Merge(m, src) +} +func (m *BackupStatusRequest) XXX_Size() int { + return xxx_messageInfo_BackupStatusRequest.Size(m) +} +func (m *BackupStatusRequest) XXX_DiscardUnknown() { + xxx_messageInfo_BackupStatusRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_BackupStatusRequest proto.InternalMessageInfo + +func (m *BackupStatusRequest) GetBackup() string { + if m != nil { + return m.Backup + } + return "" +} + +type BackupStatusResponse struct { + 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"` + SnapshotName string `protobuf:"bytes,4,opt,name=snapshot_name,json=snapshotName,proto3" json:"snapshot_name,omitempty"` + State string `protobuf:"bytes,5,opt,name=state,proto3" json:"state,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *BackupStatusResponse) Reset() { *m = BackupStatusResponse{} } +func (m *BackupStatusResponse) String() string { return proto.CompactTextString(m) } +func (*BackupStatusResponse) ProtoMessage() {} +func (*BackupStatusResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_68e10ca3dfff6283, []int{12} +} + +func (m *BackupStatusResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_BackupStatusResponse.Unmarshal(m, b) +} +func (m *BackupStatusResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_BackupStatusResponse.Marshal(b, m, deterministic) +} +func (m *BackupStatusResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_BackupStatusResponse.Merge(m, src) +} +func (m *BackupStatusResponse) XXX_Size() int { + return xxx_messageInfo_BackupStatusResponse.Size(m) +} +func (m *BackupStatusResponse) XXX_DiscardUnknown() { + xxx_messageInfo_BackupStatusResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_BackupStatusResponse proto.InternalMessageInfo + +func (m *BackupStatusResponse) GetProgress() int32 { + if m != nil { + return m.Progress + } + return 0 +} + +func (m *BackupStatusResponse) GetBackupUrl() string { + if m != nil { + return m.BackupUrl + } + return "" +} + +func (m *BackupStatusResponse) GetError() string { + if m != nil { + return m.Error + } + return "" +} + +func (m *BackupStatusResponse) GetSnapshotName() string { + if m != nil { + return m.SnapshotName + } + return "" +} + +func (m *BackupStatusResponse) GetState() string { + if m != nil { + return m.State + } + return "" +} + +type BackupRestoreRequest struct { + Backup string `protobuf:"bytes,1,opt,name=backup,proto3" json:"backup,omitempty"` + SnapshotDiskName string `protobuf:"bytes,2,opt,name=snapshot_disk_name,json=snapshotDiskName,proto3" json:"snapshot_disk_name,omitempty"` + Credential map[string]string `protobuf:"bytes,3,rep,name=credential,proto3" json:"credential,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + ConcurrentLimit int32 `protobuf:"varint,4,opt,name=concurrent_limit,json=concurrentLimit,proto3" json:"concurrent_limit,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *BackupRestoreRequest) Reset() { *m = BackupRestoreRequest{} } +func (m *BackupRestoreRequest) String() string { return proto.CompactTextString(m) } +func (*BackupRestoreRequest) ProtoMessage() {} +func (*BackupRestoreRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_68e10ca3dfff6283, []int{13} +} + +func (m *BackupRestoreRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_BackupRestoreRequest.Unmarshal(m, b) +} +func (m *BackupRestoreRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_BackupRestoreRequest.Marshal(b, m, deterministic) +} +func (m *BackupRestoreRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_BackupRestoreRequest.Merge(m, src) +} +func (m *BackupRestoreRequest) XXX_Size() int { + return xxx_messageInfo_BackupRestoreRequest.Size(m) +} +func (m *BackupRestoreRequest) XXX_DiscardUnknown() { + xxx_messageInfo_BackupRestoreRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_BackupRestoreRequest proto.InternalMessageInfo + +func (m *BackupRestoreRequest) GetBackup() string { + if m != nil { + return m.Backup + } + return "" +} + +func (m *BackupRestoreRequest) GetSnapshotDiskName() string { + if m != nil { + return m.SnapshotDiskName + } + return "" +} + +func (m *BackupRestoreRequest) GetCredential() map[string]string { + if m != nil { + return m.Credential + } + return nil +} + +func (m *BackupRestoreRequest) GetConcurrentLimit() int32 { + if m != nil { + return m.ConcurrentLimit + } + return 0 +} + +type BackupRestoreIncrementallyRequest struct { + Backup string `protobuf:"bytes,1,opt,name=backup,proto3" json:"backup,omitempty"` + DeltaFileName string `protobuf:"bytes,2,opt,name=delta_file_name,json=deltaFileName,proto3" json:"delta_file_name,omitempty"` + LastRestoredBackupName string `protobuf:"bytes,3,opt,name=last_restored_backup_name,json=lastRestoredBackupName,proto3" json:"last_restored_backup_name,omitempty"` + SnapshotDiskName string `protobuf:"bytes,4,opt,name=snapshot_disk_name,json=snapshotDiskName,proto3" json:"snapshot_disk_name,omitempty"` + Credential map[string]string `protobuf:"bytes,5,rep,name=credential,proto3" json:"credential,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + ConcurrentLimit int32 `protobuf:"varint,6,opt,name=concurrent_limit,json=concurrentLimit,proto3" json:"concurrent_limit,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *BackupRestoreIncrementallyRequest) Reset() { *m = BackupRestoreIncrementallyRequest{} } +func (m *BackupRestoreIncrementallyRequest) String() string { return proto.CompactTextString(m) } +func (*BackupRestoreIncrementallyRequest) ProtoMessage() {} +func (*BackupRestoreIncrementallyRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_68e10ca3dfff6283, []int{14} +} + +func (m *BackupRestoreIncrementallyRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_BackupRestoreIncrementallyRequest.Unmarshal(m, b) +} +func (m *BackupRestoreIncrementallyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_BackupRestoreIncrementallyRequest.Marshal(b, m, deterministic) +} +func (m *BackupRestoreIncrementallyRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_BackupRestoreIncrementallyRequest.Merge(m, src) +} +func (m *BackupRestoreIncrementallyRequest) XXX_Size() int { + return xxx_messageInfo_BackupRestoreIncrementallyRequest.Size(m) +} +func (m *BackupRestoreIncrementallyRequest) XXX_DiscardUnknown() { + xxx_messageInfo_BackupRestoreIncrementallyRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_BackupRestoreIncrementallyRequest proto.InternalMessageInfo + +func (m *BackupRestoreIncrementallyRequest) GetBackup() string { + if m != nil { + return m.Backup + } + return "" +} + +func (m *BackupRestoreIncrementallyRequest) GetDeltaFileName() string { + if m != nil { + return m.DeltaFileName + } + return "" +} + +func (m *BackupRestoreIncrementallyRequest) GetLastRestoredBackupName() string { + if m != nil { + return m.LastRestoredBackupName + } + return "" +} + +func (m *BackupRestoreIncrementallyRequest) GetSnapshotDiskName() string { + if m != nil { + return m.SnapshotDiskName + } + return "" +} + +func (m *BackupRestoreIncrementallyRequest) GetCredential() map[string]string { + if m != nil { + return m.Credential + } + return nil +} + +func (m *BackupRestoreIncrementallyRequest) GetConcurrentLimit() int32 { + if m != nil { + return m.ConcurrentLimit + } + return 0 +} + +type RestoreStatusResponse struct { + IsRestoring bool `protobuf:"varint,1,opt,name=is_restoring,json=isRestoring,proto3" json:"is_restoring,omitempty"` + LastRestored string `protobuf:"bytes,2,opt,name=last_restored,json=lastRestored,proto3" json:"last_restored,omitempty"` + Progress int32 `protobuf:"varint,3,opt,name=progress,proto3" json:"progress,omitempty"` + Error string `protobuf:"bytes,4,opt,name=error,proto3" json:"error,omitempty"` + DestFileName string `protobuf:"bytes,5,opt,name=dest_file_name,json=destFileName,proto3" json:"dest_file_name,omitempty"` + State string `protobuf:"bytes,6,opt,name=state,proto3" json:"state,omitempty"` + BackupUrl string `protobuf:"bytes,7,opt,name=backup_url,json=backupUrl,proto3" json:"backup_url,omitempty"` + CurrentRestoringBackup string `protobuf:"bytes,8,opt,name=current_restoring_backup,json=currentRestoringBackup,proto3" json:"current_restoring_backup,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RestoreStatusResponse) Reset() { *m = RestoreStatusResponse{} } +func (m *RestoreStatusResponse) String() string { return proto.CompactTextString(m) } +func (*RestoreStatusResponse) ProtoMessage() {} +func (*RestoreStatusResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_68e10ca3dfff6283, []int{15} +} + +func (m *RestoreStatusResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_RestoreStatusResponse.Unmarshal(m, b) +} +func (m *RestoreStatusResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_RestoreStatusResponse.Marshal(b, m, deterministic) +} +func (m *RestoreStatusResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_RestoreStatusResponse.Merge(m, src) +} +func (m *RestoreStatusResponse) XXX_Size() int { + return xxx_messageInfo_RestoreStatusResponse.Size(m) +} +func (m *RestoreStatusResponse) XXX_DiscardUnknown() { + xxx_messageInfo_RestoreStatusResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_RestoreStatusResponse proto.InternalMessageInfo + +func (m *RestoreStatusResponse) GetIsRestoring() bool { + if m != nil { + return m.IsRestoring + } + return false +} + +func (m *RestoreStatusResponse) GetLastRestored() string { + if m != nil { + return m.LastRestored + } + return "" +} + +func (m *RestoreStatusResponse) GetProgress() int32 { + if m != nil { + return m.Progress + } + return 0 +} + +func (m *RestoreStatusResponse) GetError() string { + if m != nil { + return m.Error + } + return "" +} + +func (m *RestoreStatusResponse) GetDestFileName() string { + if m != nil { + return m.DestFileName + } + return "" +} + +func (m *RestoreStatusResponse) GetState() string { + if m != nil { + return m.State + } + return "" +} + +func (m *RestoreStatusResponse) GetBackupUrl() string { + if m != nil { + return m.BackupUrl + } + return "" +} + +func (m *RestoreStatusResponse) GetCurrentRestoringBackup() string { + if m != nil { + return m.CurrentRestoringBackup + } + return "" +} + +type SnapshotPurgeStatusResponse struct { + IsPurging bool `protobuf:"varint,1,opt,name=is_purging,json=isPurging,proto3" json:"is_purging,omitempty"` + Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` + Progress int32 `protobuf:"varint,3,opt,name=progress,proto3" json:"progress,omitempty"` + State string `protobuf:"bytes,4,opt,name=state,proto3" json:"state,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SnapshotPurgeStatusResponse) Reset() { *m = SnapshotPurgeStatusResponse{} } +func (m *SnapshotPurgeStatusResponse) String() string { return proto.CompactTextString(m) } +func (*SnapshotPurgeStatusResponse) ProtoMessage() {} +func (*SnapshotPurgeStatusResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_68e10ca3dfff6283, []int{16} +} + +func (m *SnapshotPurgeStatusResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SnapshotPurgeStatusResponse.Unmarshal(m, b) +} +func (m *SnapshotPurgeStatusResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SnapshotPurgeStatusResponse.Marshal(b, m, deterministic) +} +func (m *SnapshotPurgeStatusResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_SnapshotPurgeStatusResponse.Merge(m, src) +} +func (m *SnapshotPurgeStatusResponse) XXX_Size() int { + return xxx_messageInfo_SnapshotPurgeStatusResponse.Size(m) +} +func (m *SnapshotPurgeStatusResponse) XXX_DiscardUnknown() { + xxx_messageInfo_SnapshotPurgeStatusResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_SnapshotPurgeStatusResponse proto.InternalMessageInfo + +func (m *SnapshotPurgeStatusResponse) GetIsPurging() bool { + if m != nil { + return m.IsPurging + } + return false +} + +func (m *SnapshotPurgeStatusResponse) GetError() string { + if m != nil { + return m.Error + } + return "" +} + +func (m *SnapshotPurgeStatusResponse) GetProgress() int32 { + if m != nil { + return m.Progress + } + return 0 +} + +func (m *SnapshotPurgeStatusResponse) GetState() string { + if m != nil { + return m.State + } + return "" +} + +type ReplicaRebuildStatusResponse struct { + IsRebuilding bool `protobuf:"varint,1,opt,name=is_rebuilding,json=isRebuilding,proto3" json:"is_rebuilding,omitempty"` + Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` + Progress int32 `protobuf:"varint,3,opt,name=progress,proto3" json:"progress,omitempty"` + State string `protobuf:"bytes,4,opt,name=state,proto3" json:"state,omitempty"` + FromReplicaAddress string `protobuf:"bytes,5,opt,name=from_replica_address,json=fromReplicaAddress,proto3" json:"from_replica_address,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ReplicaRebuildStatusResponse) Reset() { *m = ReplicaRebuildStatusResponse{} } +func (m *ReplicaRebuildStatusResponse) String() string { return proto.CompactTextString(m) } +func (*ReplicaRebuildStatusResponse) ProtoMessage() {} +func (*ReplicaRebuildStatusResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_68e10ca3dfff6283, []int{17} +} + +func (m *ReplicaRebuildStatusResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ReplicaRebuildStatusResponse.Unmarshal(m, b) +} +func (m *ReplicaRebuildStatusResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ReplicaRebuildStatusResponse.Marshal(b, m, deterministic) +} +func (m *ReplicaRebuildStatusResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_ReplicaRebuildStatusResponse.Merge(m, src) +} +func (m *ReplicaRebuildStatusResponse) XXX_Size() int { + return xxx_messageInfo_ReplicaRebuildStatusResponse.Size(m) +} +func (m *ReplicaRebuildStatusResponse) XXX_DiscardUnknown() { + xxx_messageInfo_ReplicaRebuildStatusResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_ReplicaRebuildStatusResponse proto.InternalMessageInfo + +func (m *ReplicaRebuildStatusResponse) GetIsRebuilding() bool { + if m != nil { + return m.IsRebuilding + } + return false +} + +func (m *ReplicaRebuildStatusResponse) GetError() string { + if m != nil { + return m.Error + } + return "" +} + +func (m *ReplicaRebuildStatusResponse) GetProgress() int32 { + if m != nil { + return m.Progress + } + return 0 +} + +func (m *ReplicaRebuildStatusResponse) GetState() string { + if m != nil { + return m.State + } + return "" +} + +func (m *ReplicaRebuildStatusResponse) GetFromReplicaAddress() string { + if m != nil { + return m.FromReplicaAddress + } + return "" +} + +type SnapshotCloneStatusResponse struct { + IsCloning bool `protobuf:"varint,1,opt,name=is_cloning,json=isCloning,proto3" json:"is_cloning,omitempty"` + Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` + Progress int32 `protobuf:"varint,3,opt,name=progress,proto3" json:"progress,omitempty"` + State string `protobuf:"bytes,4,opt,name=state,proto3" json:"state,omitempty"` + FromReplicaAddress string `protobuf:"bytes,5,opt,name=from_replica_address,json=fromReplicaAddress,proto3" json:"from_replica_address,omitempty"` + SnapshotName string `protobuf:"bytes,6,opt,name=snapshot_name,json=snapshotName,proto3" json:"snapshot_name,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SnapshotCloneStatusResponse) Reset() { *m = SnapshotCloneStatusResponse{} } +func (m *SnapshotCloneStatusResponse) String() string { return proto.CompactTextString(m) } +func (*SnapshotCloneStatusResponse) ProtoMessage() {} +func (*SnapshotCloneStatusResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_68e10ca3dfff6283, []int{18} +} + +func (m *SnapshotCloneStatusResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SnapshotCloneStatusResponse.Unmarshal(m, b) +} +func (m *SnapshotCloneStatusResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SnapshotCloneStatusResponse.Marshal(b, m, deterministic) +} +func (m *SnapshotCloneStatusResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_SnapshotCloneStatusResponse.Merge(m, src) +} +func (m *SnapshotCloneStatusResponse) XXX_Size() int { + return xxx_messageInfo_SnapshotCloneStatusResponse.Size(m) +} +func (m *SnapshotCloneStatusResponse) XXX_DiscardUnknown() { + xxx_messageInfo_SnapshotCloneStatusResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_SnapshotCloneStatusResponse proto.InternalMessageInfo + +func (m *SnapshotCloneStatusResponse) GetIsCloning() bool { + if m != nil { + return m.IsCloning + } + return false +} + +func (m *SnapshotCloneStatusResponse) GetError() string { + if m != nil { + return m.Error + } + return "" +} + +func (m *SnapshotCloneStatusResponse) GetProgress() int32 { + if m != nil { + return m.Progress + } + return 0 +} + +func (m *SnapshotCloneStatusResponse) GetState() string { + if m != nil { + return m.State + } + return "" +} + +func (m *SnapshotCloneStatusResponse) GetFromReplicaAddress() string { + if m != nil { + return m.FromReplicaAddress + } + return "" +} + +func (m *SnapshotCloneStatusResponse) GetSnapshotName() string { + if m != nil { + return m.SnapshotName + } + return "" +} + +type SnapshotHashRequest struct { + SnapshotName string `protobuf:"bytes,1,opt,name=snapshot_name,json=snapshotName,proto3" json:"snapshot_name,omitempty"` + Rehash bool `protobuf:"varint,2,opt,name=rehash,proto3" json:"rehash,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SnapshotHashRequest) Reset() { *m = SnapshotHashRequest{} } +func (m *SnapshotHashRequest) String() string { return proto.CompactTextString(m) } +func (*SnapshotHashRequest) ProtoMessage() {} +func (*SnapshotHashRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_68e10ca3dfff6283, []int{19} +} + +func (m *SnapshotHashRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SnapshotHashRequest.Unmarshal(m, b) +} +func (m *SnapshotHashRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SnapshotHashRequest.Marshal(b, m, deterministic) +} +func (m *SnapshotHashRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_SnapshotHashRequest.Merge(m, src) +} +func (m *SnapshotHashRequest) XXX_Size() int { + return xxx_messageInfo_SnapshotHashRequest.Size(m) +} +func (m *SnapshotHashRequest) XXX_DiscardUnknown() { + xxx_messageInfo_SnapshotHashRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_SnapshotHashRequest proto.InternalMessageInfo + +func (m *SnapshotHashRequest) GetSnapshotName() string { + if m != nil { + return m.SnapshotName + } + return "" +} + +func (m *SnapshotHashRequest) GetRehash() bool { + if m != nil { + return m.Rehash + } + return false +} + +type SnapshotHashStatusRequest struct { + SnapshotName string `protobuf:"bytes,1,opt,name=snapshot_name,json=snapshotName,proto3" json:"snapshot_name,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SnapshotHashStatusRequest) Reset() { *m = SnapshotHashStatusRequest{} } +func (m *SnapshotHashStatusRequest) String() string { return proto.CompactTextString(m) } +func (*SnapshotHashStatusRequest) ProtoMessage() {} +func (*SnapshotHashStatusRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_68e10ca3dfff6283, []int{20} +} + +func (m *SnapshotHashStatusRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SnapshotHashStatusRequest.Unmarshal(m, b) +} +func (m *SnapshotHashStatusRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SnapshotHashStatusRequest.Marshal(b, m, deterministic) +} +func (m *SnapshotHashStatusRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_SnapshotHashStatusRequest.Merge(m, src) +} +func (m *SnapshotHashStatusRequest) XXX_Size() int { + return xxx_messageInfo_SnapshotHashStatusRequest.Size(m) +} +func (m *SnapshotHashStatusRequest) XXX_DiscardUnknown() { + xxx_messageInfo_SnapshotHashStatusRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_SnapshotHashStatusRequest proto.InternalMessageInfo + +func (m *SnapshotHashStatusRequest) GetSnapshotName() string { + if m != nil { + return m.SnapshotName + } + return "" +} + +type SnapshotHashStatusResponse struct { + State string `protobuf:"bytes,1,opt,name=state,proto3" json:"state,omitempty"` + Checksum string `protobuf:"bytes,2,opt,name=checksum,proto3" json:"checksum,omitempty"` + Error string `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"` + SilentlyCorrupted bool `protobuf:"varint,4,opt,name=silently_corrupted,json=silentlyCorrupted,proto3" json:"silently_corrupted,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SnapshotHashStatusResponse) Reset() { *m = SnapshotHashStatusResponse{} } +func (m *SnapshotHashStatusResponse) String() string { return proto.CompactTextString(m) } +func (*SnapshotHashStatusResponse) ProtoMessage() {} +func (*SnapshotHashStatusResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_68e10ca3dfff6283, []int{21} +} + +func (m *SnapshotHashStatusResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SnapshotHashStatusResponse.Unmarshal(m, b) +} +func (m *SnapshotHashStatusResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SnapshotHashStatusResponse.Marshal(b, m, deterministic) +} +func (m *SnapshotHashStatusResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_SnapshotHashStatusResponse.Merge(m, src) +} +func (m *SnapshotHashStatusResponse) XXX_Size() int { + return xxx_messageInfo_SnapshotHashStatusResponse.Size(m) +} +func (m *SnapshotHashStatusResponse) XXX_DiscardUnknown() { + xxx_messageInfo_SnapshotHashStatusResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_SnapshotHashStatusResponse proto.InternalMessageInfo + +func (m *SnapshotHashStatusResponse) GetState() string { + if m != nil { + return m.State + } + return "" +} + +func (m *SnapshotHashStatusResponse) GetChecksum() string { + if m != nil { + return m.Checksum + } + return "" +} + +func (m *SnapshotHashStatusResponse) GetError() string { + if m != nil { + return m.Error + } + return "" +} + +func (m *SnapshotHashStatusResponse) GetSilentlyCorrupted() bool { + if m != nil { + return m.SilentlyCorrupted + } + return false +} + +type SnapshotHashCancelRequest struct { + SnapshotName string `protobuf:"bytes,1,opt,name=snapshot_name,json=snapshotName,proto3" json:"snapshot_name,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SnapshotHashCancelRequest) Reset() { *m = SnapshotHashCancelRequest{} } +func (m *SnapshotHashCancelRequest) String() string { return proto.CompactTextString(m) } +func (*SnapshotHashCancelRequest) ProtoMessage() {} +func (*SnapshotHashCancelRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_68e10ca3dfff6283, []int{22} +} + +func (m *SnapshotHashCancelRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SnapshotHashCancelRequest.Unmarshal(m, b) +} +func (m *SnapshotHashCancelRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SnapshotHashCancelRequest.Marshal(b, m, deterministic) +} +func (m *SnapshotHashCancelRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_SnapshotHashCancelRequest.Merge(m, src) +} +func (m *SnapshotHashCancelRequest) XXX_Size() int { + return xxx_messageInfo_SnapshotHashCancelRequest.Size(m) +} +func (m *SnapshotHashCancelRequest) XXX_DiscardUnknown() { + xxx_messageInfo_SnapshotHashCancelRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_SnapshotHashCancelRequest proto.InternalMessageInfo + +func (m *SnapshotHashCancelRequest) GetSnapshotName() string { + if m != nil { + return m.SnapshotName + } + return "" +} + +type SnapshotHashLockStateResponse struct { + IsLocked bool `protobuf:"varint,1,opt,name=is_locked,json=isLocked,proto3" json:"is_locked,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SnapshotHashLockStateResponse) Reset() { *m = SnapshotHashLockStateResponse{} } +func (m *SnapshotHashLockStateResponse) String() string { return proto.CompactTextString(m) } +func (*SnapshotHashLockStateResponse) ProtoMessage() {} +func (*SnapshotHashLockStateResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_68e10ca3dfff6283, []int{23} +} + +func (m *SnapshotHashLockStateResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SnapshotHashLockStateResponse.Unmarshal(m, b) +} +func (m *SnapshotHashLockStateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SnapshotHashLockStateResponse.Marshal(b, m, deterministic) +} +func (m *SnapshotHashLockStateResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_SnapshotHashLockStateResponse.Merge(m, src) +} +func (m *SnapshotHashLockStateResponse) XXX_Size() int { + return xxx_messageInfo_SnapshotHashLockStateResponse.Size(m) +} +func (m *SnapshotHashLockStateResponse) XXX_DiscardUnknown() { + xxx_messageInfo_SnapshotHashLockStateResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_SnapshotHashLockStateResponse proto.InternalMessageInfo + +func (m *SnapshotHashLockStateResponse) GetIsLocked() bool { + if m != nil { + return m.IsLocked + } + return false +} + +func init() { + proto.RegisterType((*FileRemoveRequest)(nil), "ptypes.FileRemoveRequest") + proto.RegisterType((*FileRenameRequest)(nil), "ptypes.FileRenameRequest") + proto.RegisterType((*ReceiverLaunchRequest)(nil), "ptypes.ReceiverLaunchRequest") + proto.RegisterType((*ReceiverLaunchResponse)(nil), "ptypes.ReceiverLaunchResponse") + proto.RegisterType((*FileSendRequest)(nil), "ptypes.FileSendRequest") + proto.RegisterType((*FilesSyncRequest)(nil), "ptypes.FilesSyncRequest") + proto.RegisterType((*SnapshotCloneRequest)(nil), "ptypes.SnapshotCloneRequest") + proto.RegisterType((*VolumeExportRequest)(nil), "ptypes.VolumeExportRequest") + proto.RegisterType((*BackupCreateRequest)(nil), "ptypes.BackupCreateRequest") + proto.RegisterMapType((map[string]string)(nil), "ptypes.BackupCreateRequest.CredentialEntry") + proto.RegisterType((*BackupCreateResponse)(nil), "ptypes.BackupCreateResponse") + proto.RegisterType((*BackupRemoveRequest)(nil), "ptypes.BackupRemoveRequest") + proto.RegisterType((*BackupStatusRequest)(nil), "ptypes.BackupStatusRequest") + proto.RegisterType((*BackupStatusResponse)(nil), "ptypes.BackupStatusResponse") + proto.RegisterType((*BackupRestoreRequest)(nil), "ptypes.BackupRestoreRequest") + proto.RegisterMapType((map[string]string)(nil), "ptypes.BackupRestoreRequest.CredentialEntry") + proto.RegisterType((*BackupRestoreIncrementallyRequest)(nil), "ptypes.BackupRestoreIncrementallyRequest") + proto.RegisterMapType((map[string]string)(nil), "ptypes.BackupRestoreIncrementallyRequest.CredentialEntry") + proto.RegisterType((*RestoreStatusResponse)(nil), "ptypes.RestoreStatusResponse") + proto.RegisterType((*SnapshotPurgeStatusResponse)(nil), "ptypes.SnapshotPurgeStatusResponse") + proto.RegisterType((*ReplicaRebuildStatusResponse)(nil), "ptypes.ReplicaRebuildStatusResponse") + proto.RegisterType((*SnapshotCloneStatusResponse)(nil), "ptypes.SnapshotCloneStatusResponse") + proto.RegisterType((*SnapshotHashRequest)(nil), "ptypes.SnapshotHashRequest") + proto.RegisterType((*SnapshotHashStatusRequest)(nil), "ptypes.SnapshotHashStatusRequest") + proto.RegisterType((*SnapshotHashStatusResponse)(nil), "ptypes.SnapshotHashStatusResponse") + proto.RegisterType((*SnapshotHashCancelRequest)(nil), "ptypes.SnapshotHashCancelRequest") + proto.RegisterType((*SnapshotHashLockStateResponse)(nil), "ptypes.SnapshotHashLockStateResponse") +} + +func init() { proto.RegisterFile("syncagent.proto", fileDescriptor_68e10ca3dfff6283) } + +var fileDescriptor_68e10ca3dfff6283 = []byte{ + // 1674 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x58, 0xdd, 0x6e, 0xdb, 0xc8, + 0x15, 0xb6, 0x6c, 0x59, 0x91, 0x8e, 0x25, 0x5b, 0x19, 0x2b, 0x8a, 0x2c, 0xdb, 0xad, 0xcd, 0x24, + 0x85, 0x8b, 0x26, 0x4e, 0x90, 0xf6, 0x22, 0x2e, 0x1a, 0x34, 0x89, 0xea, 0xc4, 0x46, 0xdc, 0x22, + 0xa1, 0x93, 0xa0, 0x45, 0x51, 0x10, 0x34, 0x35, 0x96, 0x06, 0x26, 0x39, 0x2c, 0x67, 0xe4, 0x44, + 0xf7, 0x7d, 0x81, 0xa2, 0x7d, 0x82, 0xbd, 0xd8, 0xcb, 0x7d, 0x80, 0x05, 0x76, 0xaf, 0xf6, 0x2d, + 0xf6, 0x21, 0x16, 0xd8, 0x27, 0x58, 0xcc, 0x0c, 0x87, 0x1a, 0x4a, 0x94, 0xec, 0xfc, 0x61, 0xf7, + 0x8e, 0x73, 0xe6, 0x9c, 0x33, 0xdf, 0xf9, 0x9b, 0x73, 0x86, 0xb0, 0xc2, 0x86, 0xa1, 0xe7, 0xf6, + 0x70, 0xc8, 0x77, 0xa3, 0x98, 0x72, 0x8a, 0x4a, 0x11, 0x1f, 0x46, 0x98, 0xb5, 0xd7, 0x7b, 0x94, + 0xf6, 0x7c, 0x7c, 0x57, 0x52, 0x4f, 0x06, 0xa7, 0x77, 0x71, 0x10, 0xf1, 0xa1, 0x62, 0x6a, 0x57, + 0x3d, 0x1a, 0x04, 0x34, 0x54, 0x2b, 0xeb, 0x1e, 0x5c, 0x7d, 0x4a, 0x7c, 0x6c, 0xe3, 0x80, 0x9e, + 0x63, 0x1b, 0xff, 0x7b, 0x80, 0x19, 0x47, 0xeb, 0x50, 0x39, 0x25, 0x3e, 0x76, 0x42, 0x37, 0xc0, + 0xad, 0xc2, 0x56, 0x61, 0xa7, 0x62, 0x97, 0x05, 0xe1, 0x6f, 0x6e, 0x80, 0xad, 0x7f, 0x6a, 0x09, + 0xb1, 0xab, 0x25, 0x2c, 0xa8, 0x51, 0xbf, 0xeb, 0x8c, 0x4b, 0x2d, 0x51, 0xbf, 0xfb, 0x34, 0x11, + 0x14, 0x3c, 0x21, 0x7e, 0x6b, 0xf0, 0xcc, 0x2b, 0x9e, 0x10, 0xbf, 0xd5, 0x3c, 0xd6, 0x1e, 0x5c, + 0xb3, 0xb1, 0x87, 0xc9, 0x39, 0x8e, 0x8f, 0xdc, 0x41, 0xe8, 0xf5, 0xf5, 0x01, 0x5b, 0x50, 0xe5, + 0x74, 0x42, 0x3f, 0x70, 0x9a, 0x8a, 0xde, 0x86, 0xe6, 0xb8, 0x28, 0x8b, 0x68, 0xc8, 0x30, 0x42, + 0x50, 0x8c, 0x68, 0xcc, 0xa5, 0xcc, 0xa2, 0x2d, 0xbf, 0xad, 0x6f, 0x0b, 0xb0, 0x22, 0x44, 0x8f, + 0x71, 0xd8, 0xd5, 0x67, 0xdc, 0x84, 0xe5, 0xd3, 0x98, 0x06, 0x13, 0xa7, 0x54, 0x05, 0x35, 0x35, + 0x03, 0x41, 0xb1, 0x4f, 0x19, 0x4f, 0xd0, 0xcb, 0xef, 0xf4, 0x84, 0x85, 0xd1, 0x09, 0xd2, 0x89, + 0x2e, 0xe3, 0x8e, 0x08, 0x52, 0xab, 0xb8, 0x55, 0xd8, 0x29, 0xdb, 0x65, 0x41, 0x38, 0x1e, 0x86, + 0x1e, 0x7a, 0x04, 0x9b, 0xf2, 0x14, 0xb1, 0xe9, 0xf4, 0x39, 0x8f, 0x1c, 0xcf, 0x27, 0x38, 0xe4, + 0x0e, 0x27, 0x01, 0xa6, 0x03, 0xde, 0x5a, 0x94, 0x9a, 0xd6, 0x04, 0x93, 0x10, 0x38, 0xe0, 0x3c, + 0xea, 0x48, 0x8e, 0x57, 0x8a, 0xc1, 0xfa, 0xb1, 0x00, 0x75, 0x81, 0x89, 0x89, 0x6d, 0x6d, 0xc1, + 0x36, 0x48, 0xac, 0x8e, 0xdb, 0xed, 0xc6, 0x98, 0x31, 0x1d, 0x05, 0x41, 0x7b, 0xac, 0x48, 0xe8, + 0x3a, 0x5c, 0xe1, 0xd4, 0x31, 0x2c, 0x28, 0x71, 0x7a, 0x20, 0x6c, 0xe8, 0xc0, 0xaa, 0x44, 0x23, + 0x71, 0x91, 0xf0, 0x94, 0x3a, 0x3e, 0x61, 0xc2, 0xa4, 0x85, 0x9d, 0xa5, 0xfb, 0x8d, 0x5d, 0x95, + 0x5a, 0xbb, 0xe2, 0x34, 0x71, 0xec, 0x61, 0x78, 0x4a, 0xed, 0x3a, 0x33, 0x56, 0x47, 0x84, 0x7d, + 0x76, 0xa3, 0xbf, 0x9a, 0x87, 0xc6, 0x71, 0xe8, 0x46, 0xac, 0x4f, 0x79, 0xc7, 0xa7, 0x21, 0xfe, + 0x14, 0x86, 0xdf, 0x06, 0xc4, 0x12, 0x9d, 0x46, 0xe8, 0x17, 0x24, 0x4f, 0x5d, 0xef, 0xa4, 0xe1, + 0x7f, 0x04, 0x9b, 0xf8, 0x9d, 0x08, 0xb0, 0x73, 0xe2, 0x7a, 0x67, 0x24, 0xec, 0x39, 0x24, 0x70, + 0x7b, 0xd8, 0x21, 0xa7, 0x0e, 0x7e, 0x27, 0x1c, 0xa6, 0xac, 0x5e, 0x53, 0x4c, 0x4f, 0x14, 0xcf, + 0xa1, 0x60, 0x39, 0x3c, 0xdd, 0x17, 0x0c, 0x1f, 0xef, 0x06, 0xb4, 0x03, 0x75, 0x69, 0xed, 0x39, + 0xf5, 0x07, 0x41, 0x82, 0xb7, 0x24, 0xf1, 0xca, 0x04, 0x7e, 0x23, 0xc9, 0xb2, 0x28, 0x7e, 0x28, + 0xc0, 0xaa, 0x5a, 0xee, 0x4b, 0x3c, 0xda, 0x5f, 0xf9, 0x36, 0x17, 0xa6, 0xd8, 0x7c, 0xd9, 0x94, + 0xff, 0x05, 0xf8, 0xc6, 0xfa, 0xba, 0x08, 0xab, 0x42, 0xf3, 0x20, 0xea, 0xc4, 0xd8, 0xe5, 0xf8, + 0xc3, 0x2c, 0xbe, 0x01, 0xb5, 0x13, 0xa9, 0xc4, 0xe1, 0x6e, 0xdc, 0xc3, 0xda, 0xf4, 0xaa, 0x22, + 0xbe, 0x92, 0x34, 0xf4, 0x6b, 0x58, 0x32, 0x23, 0xa0, 0x32, 0x06, 0xce, 0x53, 0xef, 0xa3, 0x26, + 0x94, 0x7c, 0xf7, 0x04, 0xfb, 0xac, 0x55, 0xdc, 0x5a, 0x10, 0x19, 0xa7, 0x56, 0xe8, 0x39, 0x80, + 0x17, 0xe3, 0x2e, 0x0e, 0x39, 0x71, 0xfd, 0xd6, 0xa2, 0xac, 0xb0, 0xdf, 0xe9, 0x0a, 0xcb, 0x01, + 0xbf, 0xdb, 0x49, 0xb9, 0xf7, 0x43, 0x1e, 0x0f, 0x6d, 0x43, 0x5c, 0x18, 0x96, 0xf5, 0xb6, 0x91, + 0x0e, 0xf5, 0x13, 0xc3, 0xc7, 0x12, 0xd2, 0x1f, 0xa0, 0x99, 0xe5, 0xf6, 0xfa, 0xd8, 0x3b, 0x63, + 0x83, 0xa0, 0x75, 0x45, 0x4a, 0x34, 0x4c, 0x89, 0x4e, 0xb2, 0x27, 0x2c, 0x4d, 0xdc, 0x21, 0x95, + 0x97, 0x95, 0xa5, 0x8a, 0x24, 0xd5, 0xde, 0x01, 0xe4, 0xd1, 0x20, 0x12, 0x85, 0x46, 0x68, 0xe8, + 0x04, 0x98, 0xf7, 0x69, 0xb7, 0x55, 0x91, 0x7c, 0x57, 0x8d, 0x9d, 0xbf, 0xca, 0x0d, 0xf4, 0x5b, + 0xa8, 0x7b, 0x34, 0xf4, 0x06, 0x71, 0x2c, 0x62, 0xeb, 0x93, 0x80, 0xf0, 0x16, 0xc8, 0xc8, 0xae, + 0x8c, 0xe8, 0x47, 0x82, 0x2c, 0xe3, 0xc6, 0x69, 0x2c, 0xa1, 0xfa, 0x2e, 0x63, 0x0a, 0xc1, 0x52, + 0x12, 0x37, 0xb5, 0xd3, 0x11, 0x1b, 0x02, 0x47, 0xfb, 0x21, 0xac, 0x8c, 0xf9, 0x0a, 0xd5, 0x61, + 0xe1, 0x0c, 0x0f, 0x93, 0x48, 0x8b, 0x4f, 0xd4, 0x80, 0xc5, 0x73, 0xd7, 0x1f, 0xe8, 0x06, 0xa4, + 0x16, 0x7f, 0x9c, 0x7f, 0x50, 0xb0, 0x5e, 0x43, 0x23, 0xeb, 0xfe, 0xa4, 0x83, 0x34, 0xa1, 0xa4, + 0x8c, 0x4d, 0xd4, 0x24, 0x2b, 0x74, 0x0b, 0x96, 0x09, 0x73, 0x48, 0xe8, 0xc5, 0x38, 0xc0, 0x21, + 0x77, 0x7d, 0xa9, 0xb2, 0x6c, 0xd7, 0x08, 0x3b, 0x1c, 0x11, 0xad, 0x3b, 0x3a, 0x25, 0xb3, 0x6d, + 0x76, 0x8a, 0xd6, 0x11, 0xfb, 0x31, 0x77, 0xf9, 0x80, 0x5d, 0xc4, 0xfe, 0x45, 0x41, 0xa3, 0xd6, + 0xfc, 0x09, 0xea, 0x36, 0x94, 0xa3, 0x98, 0xf6, 0xd2, 0x0b, 0x71, 0xd1, 0x4e, 0xd7, 0x68, 0x13, + 0x92, 0xf0, 0x39, 0x83, 0xd8, 0x4f, 0x1c, 0x51, 0x51, 0x94, 0xd7, 0xb1, 0x2f, 0x5c, 0x84, 0xe3, + 0x98, 0xc6, 0x49, 0x52, 0xab, 0x85, 0xa8, 0x8a, 0xb4, 0x86, 0x64, 0x18, 0x8a, 0xaa, 0x2a, 0x34, + 0x51, 0xa6, 0x42, 0x03, 0x16, 0x19, 0x77, 0x39, 0x96, 0xa5, 0x5a, 0xb1, 0xd5, 0xc2, 0xfa, 0xff, + 0xbc, 0x06, 0x69, 0x63, 0x11, 0xb5, 0x8b, 0x9c, 0x90, 0xa9, 0xd7, 0x2e, 0x61, 0x67, 0xe6, 0xc8, + 0x90, 0xd6, 0xeb, 0x5f, 0x08, 0x3b, 0x93, 0x87, 0x1e, 0x65, 0x2a, 0x4a, 0xf5, 0xac, 0xdb, 0xd9, + 0x8a, 0xca, 0x9e, 0x3b, 0xb3, 0xa4, 0xf2, 0xd2, 0xb3, 0x98, 0x9b, 0x9e, 0x1f, 0x9b, 0x70, 0xff, + 0x5d, 0x80, 0xed, 0x0c, 0x3c, 0x23, 0x6d, 0xfc, 0xe1, 0x45, 0x3e, 0xfa, 0x0d, 0xac, 0x74, 0xb1, + 0xcf, 0xdd, 0x89, 0x99, 0xaa, 0x26, 0xc9, 0xe9, 0x6d, 0xb6, 0x07, 0x6b, 0xbe, 0xe8, 0xca, 0xb1, + 0x3a, 0xa3, 0xeb, 0x98, 0xc5, 0xac, 0x22, 0xdc, 0x14, 0x0c, 0x09, 0x86, 0xee, 0x93, 0x51, 0x61, + 0xe7, 0x87, 0xa1, 0x38, 0x25, 0x0c, 0xff, 0xc8, 0xb9, 0xd8, 0xf6, 0x72, 0xc3, 0x90, 0x67, 0xe7, + 0x7b, 0xc7, 0xa4, 0xf4, 0x59, 0x62, 0xf2, 0xe5, 0xbc, 0x18, 0x42, 0x25, 0xca, 0xb1, 0x82, 0xda, + 0x86, 0x2a, 0x61, 0x89, 0x17, 0x49, 0xd8, 0x93, 0xea, 0xca, 0xf6, 0x12, 0x61, 0xb6, 0x26, 0x89, + 0x12, 0xc9, 0xb8, 0x5a, 0x37, 0x0e, 0xd3, 0xbd, 0x99, 0xc2, 0x5c, 0x18, 0x2b, 0xcc, 0xb4, 0xf2, + 0x8a, 0x66, 0xe5, 0xdd, 0x84, 0xe5, 0x2e, 0x66, 0x66, 0xe7, 0x52, 0xd5, 0x55, 0x15, 0xd4, 0x34, + 0xce, 0x69, 0xe9, 0x95, 0x8c, 0xd2, 0x1b, 0x2b, 0xf5, 0x2b, 0xe3, 0xa5, 0xfe, 0x00, 0x5a, 0xda, + 0xab, 0xa9, 0x65, 0x49, 0x82, 0x24, 0x17, 0x7d, 0x33, 0xd9, 0x4f, 0xad, 0x54, 0x91, 0xb4, 0xfe, + 0x53, 0x80, 0x75, 0x3d, 0x8d, 0xbd, 0x18, 0xc4, 0xbd, 0x71, 0x77, 0x6d, 0x02, 0x10, 0xe6, 0x44, + 0x83, 0xb8, 0x37, 0x72, 0x56, 0x85, 0xb0, 0x17, 0x8a, 0x30, 0xb2, 0x74, 0xde, 0xb4, 0xf4, 0x02, + 0xdf, 0x28, 0xfb, 0x8a, 0xe6, 0xd5, 0xf2, 0x4d, 0x01, 0x36, 0x6c, 0x1c, 0xf9, 0xc4, 0x73, 0x6d, + 0x7c, 0x32, 0x20, 0x7e, 0x77, 0x0c, 0xc7, 0x0d, 0xa8, 0xc9, 0xb0, 0xc9, 0xbd, 0x11, 0x94, 0xaa, + 0x88, 0x9b, 0xa6, 0x7d, 0x2a, 0x34, 0xe8, 0x1e, 0x34, 0xe4, 0x6c, 0x16, 0x2b, 0x44, 0xe9, 0x44, + 0xaa, 0xe2, 0x85, 0xc4, 0x5e, 0x02, 0x36, 0x19, 0x4c, 0xad, 0xef, 0x0d, 0x37, 0xca, 0xa1, 0x36, + 0xd7, 0x8d, 0x9e, 0x4f, 0xc3, 0x8c, 0x1b, 0x3b, 0x8a, 0xf0, 0xf3, 0x01, 0x9f, 0x6c, 0x07, 0xa5, + 0xc9, 0x76, 0x60, 0xd9, 0xb0, 0xaa, 0x8d, 0x3b, 0x70, 0x59, 0xfa, 0x9e, 0x9b, 0x90, 0x2d, 0xe4, + 0xb4, 0x92, 0x26, 0x94, 0x62, 0xdc, 0x77, 0x59, 0x3f, 0x69, 0xab, 0xc9, 0xca, 0x7a, 0x04, 0x6b, + 0xa6, 0xce, 0x6c, 0x9b, 0xbc, 0x8c, 0x66, 0xeb, 0x7f, 0x05, 0x68, 0xe7, 0xa9, 0x48, 0x5c, 0x9e, + 0x7a, 0xa8, 0x60, 0x7a, 0xa8, 0x0d, 0xe5, 0x74, 0x5a, 0x52, 0xce, 0x4e, 0xd7, 0x53, 0x1a, 0xe6, + 0x1d, 0x40, 0x8c, 0xf8, 0x38, 0xe4, 0xfe, 0xd0, 0xf1, 0x68, 0x1c, 0x0f, 0x22, 0x8e, 0xbb, 0xc9, + 0x14, 0x7c, 0x55, 0xef, 0x74, 0xf4, 0xc6, 0xb8, 0x5d, 0x1d, 0x37, 0xf4, 0xb0, 0xff, 0x5e, 0x76, + 0xfd, 0x09, 0x36, 0x4d, 0x0d, 0x47, 0xd4, 0x3b, 0x13, 0xa6, 0x8d, 0x26, 0x99, 0x75, 0xa8, 0x10, + 0xe6, 0xf8, 0xd4, 0x3b, 0xc3, 0xdd, 0x24, 0x97, 0xca, 0x84, 0x1d, 0xc9, 0xf5, 0xfd, 0xef, 0xaa, + 0x50, 0x17, 0x53, 0xf5, 0xe3, 0x1e, 0x0e, 0xf9, 0x31, 0x8e, 0xcf, 0x89, 0x87, 0xd1, 0x63, 0x80, + 0xd1, 0x1f, 0x02, 0xb4, 0xa6, 0x6f, 0xf3, 0x89, 0xbf, 0x06, 0xed, 0xe6, 0xae, 0xfa, 0xed, 0xb0, + 0xab, 0x7f, 0x3b, 0xec, 0xee, 0x07, 0x11, 0x1f, 0x5a, 0x73, 0x23, 0x15, 0x02, 0xf7, 0xb8, 0x0a, + 0xe3, 0x37, 0xc2, 0x0c, 0x15, 0x0f, 0xa1, 0xac, 0x9f, 0xeb, 0xe8, 0xba, 0xa9, 0xc0, 0x78, 0xc0, + 0xcf, 0x10, 0xff, 0x33, 0x54, 0xd2, 0xc7, 0x32, 0x6a, 0x99, 0xf2, 0xe6, 0xfb, 0x79, 0x86, 0x82, + 0x67, 0x50, 0xcb, 0xd4, 0x28, 0xda, 0x48, 0x5f, 0xc4, 0x39, 0xef, 0xd1, 0x19, 0x8a, 0xf6, 0xa1, + 0x6a, 0x3e, 0xc8, 0xd0, 0xba, 0xd6, 0x93, 0xf3, 0x4c, 0x9b, 0xa1, 0xe6, 0x25, 0x2c, 0x67, 0xff, + 0x76, 0xa0, 0x4d, 0xad, 0x28, 0xf7, 0x07, 0x4a, 0xfb, 0x57, 0xd3, 0xb6, 0x55, 0x62, 0x58, 0x73, + 0xe8, 0x39, 0x54, 0xcd, 0xe1, 0x77, 0x84, 0x2c, 0xe7, 0x45, 0xd2, 0xde, 0xc8, 0xdf, 0x4c, 0x95, + 0xed, 0x6b, 0x65, 0x49, 0xde, 0xac, 0x8f, 0x4f, 0x01, 0x97, 0xcb, 0x9c, 0x67, 0x50, 0xcb, 0x8c, + 0x0d, 0x68, 0x63, 0xd6, 0x50, 0x37, 0x43, 0x51, 0x6a, 0x9c, 0xaa, 0xf4, 0x71, 0x3c, 0x99, 0x2b, + 0x64, 0xdc, 0xb8, 0xec, 0xe5, 0x60, 0xcd, 0xa1, 0x3d, 0x58, 0xb4, 0x31, 0xc3, 0x1c, 0x4d, 0x39, + 0x6f, 0x06, 0x8e, 0x03, 0xa8, 0x65, 0x66, 0x8b, 0xa9, 0x2a, 0x8c, 0x70, 0xe6, 0x8c, 0x22, 0xb2, + 0xa8, 0x6a, 0x99, 0xe6, 0xfb, 0x01, 0x60, 0x5e, 0x8d, 0xee, 0x66, 0xa3, 0x7f, 0x4f, 0x55, 0x74, + 0x63, 0x3c, 0xe5, 0x73, 0x9a, 0xbe, 0x35, 0x87, 0xde, 0x40, 0x23, 0xaf, 0x1d, 0x4f, 0x55, 0x7b, + 0x73, 0x64, 0xe9, 0xf4, 0x26, 0x9e, 0x45, 0x6b, 0xb4, 0xc9, 0xcb, 0xa3, 0xcd, 0xe9, 0xad, 0x2a, + 0x51, 0xcd, 0x1b, 0x73, 0x94, 0x18, 0x39, 0x5d, 0x6b, 0x86, 0x2b, 0xff, 0x05, 0x68, 0xb2, 0x9f, + 0xa0, 0xed, 0x3c, 0x65, 0xd9, 0x5c, 0xb3, 0x66, 0xb1, 0xa4, 0x28, 0x5f, 0x66, 0xd5, 0xab, 0xce, + 0x90, 0xaf, 0x3e, 0xd3, 0x35, 0x66, 0x20, 0xfe, 0x3b, 0x5c, 0xcb, 0x6d, 0x15, 0x53, 0x1d, 0x7a, + 0x2b, 0xef, 0xb4, 0x89, 0x0e, 0x63, 0xcd, 0x9d, 0x94, 0xa4, 0xe0, 0xef, 0x7f, 0x0a, 0x00, 0x00, + 0xff, 0xff, 0xe5, 0x48, 0x22, 0xcf, 0xa0, 0x16, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// SyncAgentServiceClient is the client API for SyncAgentService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type SyncAgentServiceClient interface { + FileRemove(ctx context.Context, in *FileRemoveRequest, opts ...grpc.CallOption) (*empty.Empty, error) + FileRename(ctx context.Context, in *FileRenameRequest, opts ...grpc.CallOption) (*empty.Empty, error) + FileSend(ctx context.Context, in *FileSendRequest, opts ...grpc.CallOption) (*empty.Empty, error) + FilesSync(ctx context.Context, in *FilesSyncRequest, opts ...grpc.CallOption) (*empty.Empty, error) + SnapshotClone(ctx context.Context, in *SnapshotCloneRequest, opts ...grpc.CallOption) (*empty.Empty, error) + VolumeExport(ctx context.Context, in *VolumeExportRequest, opts ...grpc.CallOption) (*empty.Empty, error) + ReceiverLaunch(ctx context.Context, in *ReceiverLaunchRequest, opts ...grpc.CallOption) (*ReceiverLaunchResponse, error) + BackupCreate(ctx context.Context, in *BackupCreateRequest, opts ...grpc.CallOption) (*BackupCreateResponse, error) + BackupRemove(ctx context.Context, in *BackupRemoveRequest, opts ...grpc.CallOption) (*empty.Empty, error) + BackupRestore(ctx context.Context, in *BackupRestoreRequest, opts ...grpc.CallOption) (*empty.Empty, error) + BackupStatus(ctx context.Context, in *BackupStatusRequest, opts ...grpc.CallOption) (*BackupStatusResponse, error) + Reset(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*empty.Empty, error) + RestoreStatus(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*RestoreStatusResponse, error) + SnapshotPurge(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*empty.Empty, error) + SnapshotPurgeStatus(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*SnapshotPurgeStatusResponse, error) + ReplicaRebuildStatus(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*ReplicaRebuildStatusResponse, error) + SnapshotCloneStatus(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*SnapshotCloneStatusResponse, error) + SnapshotHash(ctx context.Context, in *SnapshotHashRequest, opts ...grpc.CallOption) (*empty.Empty, error) + SnapshotHashStatus(ctx context.Context, in *SnapshotHashStatusRequest, opts ...grpc.CallOption) (*SnapshotHashStatusResponse, error) + SnapshotHashCancel(ctx context.Context, in *SnapshotHashCancelRequest, opts ...grpc.CallOption) (*empty.Empty, error) + SnapshotHashLockState(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*SnapshotHashLockStateResponse, error) +} + +type syncAgentServiceClient struct { + cc *grpc.ClientConn +} + +func NewSyncAgentServiceClient(cc *grpc.ClientConn) SyncAgentServiceClient { + return &syncAgentServiceClient{cc} +} + +func (c *syncAgentServiceClient) FileRemove(ctx context.Context, in *FileRemoveRequest, opts ...grpc.CallOption) (*empty.Empty, error) { + out := new(empty.Empty) + err := c.cc.Invoke(ctx, "/ptypes.SyncAgentService/FileRemove", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *syncAgentServiceClient) FileRename(ctx context.Context, in *FileRenameRequest, opts ...grpc.CallOption) (*empty.Empty, error) { + out := new(empty.Empty) + err := c.cc.Invoke(ctx, "/ptypes.SyncAgentService/FileRename", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *syncAgentServiceClient) FileSend(ctx context.Context, in *FileSendRequest, opts ...grpc.CallOption) (*empty.Empty, error) { + out := new(empty.Empty) + err := c.cc.Invoke(ctx, "/ptypes.SyncAgentService/FileSend", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *syncAgentServiceClient) FilesSync(ctx context.Context, in *FilesSyncRequest, opts ...grpc.CallOption) (*empty.Empty, error) { + out := new(empty.Empty) + err := c.cc.Invoke(ctx, "/ptypes.SyncAgentService/FilesSync", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *syncAgentServiceClient) SnapshotClone(ctx context.Context, in *SnapshotCloneRequest, opts ...grpc.CallOption) (*empty.Empty, error) { + out := new(empty.Empty) + err := c.cc.Invoke(ctx, "/ptypes.SyncAgentService/SnapshotClone", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *syncAgentServiceClient) VolumeExport(ctx context.Context, in *VolumeExportRequest, opts ...grpc.CallOption) (*empty.Empty, error) { + out := new(empty.Empty) + err := c.cc.Invoke(ctx, "/ptypes.SyncAgentService/VolumeExport", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *syncAgentServiceClient) ReceiverLaunch(ctx context.Context, in *ReceiverLaunchRequest, opts ...grpc.CallOption) (*ReceiverLaunchResponse, error) { + out := new(ReceiverLaunchResponse) + err := c.cc.Invoke(ctx, "/ptypes.SyncAgentService/ReceiverLaunch", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *syncAgentServiceClient) BackupCreate(ctx context.Context, in *BackupCreateRequest, opts ...grpc.CallOption) (*BackupCreateResponse, error) { + out := new(BackupCreateResponse) + err := c.cc.Invoke(ctx, "/ptypes.SyncAgentService/BackupCreate", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *syncAgentServiceClient) BackupRemove(ctx context.Context, in *BackupRemoveRequest, opts ...grpc.CallOption) (*empty.Empty, error) { + out := new(empty.Empty) + err := c.cc.Invoke(ctx, "/ptypes.SyncAgentService/BackupRemove", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *syncAgentServiceClient) BackupRestore(ctx context.Context, in *BackupRestoreRequest, opts ...grpc.CallOption) (*empty.Empty, error) { + out := new(empty.Empty) + err := c.cc.Invoke(ctx, "/ptypes.SyncAgentService/BackupRestore", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *syncAgentServiceClient) BackupStatus(ctx context.Context, in *BackupStatusRequest, opts ...grpc.CallOption) (*BackupStatusResponse, error) { + out := new(BackupStatusResponse) + err := c.cc.Invoke(ctx, "/ptypes.SyncAgentService/BackupStatus", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *syncAgentServiceClient) Reset(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*empty.Empty, error) { + out := new(empty.Empty) + err := c.cc.Invoke(ctx, "/ptypes.SyncAgentService/Reset", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *syncAgentServiceClient) RestoreStatus(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*RestoreStatusResponse, error) { + out := new(RestoreStatusResponse) + err := c.cc.Invoke(ctx, "/ptypes.SyncAgentService/RestoreStatus", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *syncAgentServiceClient) SnapshotPurge(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*empty.Empty, error) { + out := new(empty.Empty) + err := c.cc.Invoke(ctx, "/ptypes.SyncAgentService/SnapshotPurge", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *syncAgentServiceClient) SnapshotPurgeStatus(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*SnapshotPurgeStatusResponse, error) { + out := new(SnapshotPurgeStatusResponse) + err := c.cc.Invoke(ctx, "/ptypes.SyncAgentService/SnapshotPurgeStatus", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *syncAgentServiceClient) ReplicaRebuildStatus(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*ReplicaRebuildStatusResponse, error) { + out := new(ReplicaRebuildStatusResponse) + err := c.cc.Invoke(ctx, "/ptypes.SyncAgentService/ReplicaRebuildStatus", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *syncAgentServiceClient) SnapshotCloneStatus(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*SnapshotCloneStatusResponse, error) { + out := new(SnapshotCloneStatusResponse) + err := c.cc.Invoke(ctx, "/ptypes.SyncAgentService/SnapshotCloneStatus", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *syncAgentServiceClient) SnapshotHash(ctx context.Context, in *SnapshotHashRequest, opts ...grpc.CallOption) (*empty.Empty, error) { + out := new(empty.Empty) + err := c.cc.Invoke(ctx, "/ptypes.SyncAgentService/SnapshotHash", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *syncAgentServiceClient) SnapshotHashStatus(ctx context.Context, in *SnapshotHashStatusRequest, opts ...grpc.CallOption) (*SnapshotHashStatusResponse, error) { + out := new(SnapshotHashStatusResponse) + err := c.cc.Invoke(ctx, "/ptypes.SyncAgentService/SnapshotHashStatus", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *syncAgentServiceClient) SnapshotHashCancel(ctx context.Context, in *SnapshotHashCancelRequest, opts ...grpc.CallOption) (*empty.Empty, error) { + out := new(empty.Empty) + err := c.cc.Invoke(ctx, "/ptypes.SyncAgentService/SnapshotHashCancel", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *syncAgentServiceClient) SnapshotHashLockState(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*SnapshotHashLockStateResponse, error) { + out := new(SnapshotHashLockStateResponse) + err := c.cc.Invoke(ctx, "/ptypes.SyncAgentService/SnapshotHashLockState", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// SyncAgentServiceServer is the server API for SyncAgentService service. +type SyncAgentServiceServer interface { + FileRemove(context.Context, *FileRemoveRequest) (*empty.Empty, error) + FileRename(context.Context, *FileRenameRequest) (*empty.Empty, error) + FileSend(context.Context, *FileSendRequest) (*empty.Empty, error) + FilesSync(context.Context, *FilesSyncRequest) (*empty.Empty, error) + SnapshotClone(context.Context, *SnapshotCloneRequest) (*empty.Empty, error) + VolumeExport(context.Context, *VolumeExportRequest) (*empty.Empty, error) + ReceiverLaunch(context.Context, *ReceiverLaunchRequest) (*ReceiverLaunchResponse, error) + BackupCreate(context.Context, *BackupCreateRequest) (*BackupCreateResponse, error) + BackupRemove(context.Context, *BackupRemoveRequest) (*empty.Empty, error) + BackupRestore(context.Context, *BackupRestoreRequest) (*empty.Empty, error) + BackupStatus(context.Context, *BackupStatusRequest) (*BackupStatusResponse, error) + Reset(context.Context, *empty.Empty) (*empty.Empty, error) + RestoreStatus(context.Context, *empty.Empty) (*RestoreStatusResponse, error) + SnapshotPurge(context.Context, *empty.Empty) (*empty.Empty, error) + SnapshotPurgeStatus(context.Context, *empty.Empty) (*SnapshotPurgeStatusResponse, error) + ReplicaRebuildStatus(context.Context, *empty.Empty) (*ReplicaRebuildStatusResponse, error) + SnapshotCloneStatus(context.Context, *empty.Empty) (*SnapshotCloneStatusResponse, error) + SnapshotHash(context.Context, *SnapshotHashRequest) (*empty.Empty, error) + SnapshotHashStatus(context.Context, *SnapshotHashStatusRequest) (*SnapshotHashStatusResponse, error) + SnapshotHashCancel(context.Context, *SnapshotHashCancelRequest) (*empty.Empty, error) + SnapshotHashLockState(context.Context, *empty.Empty) (*SnapshotHashLockStateResponse, error) +} + +// UnimplementedSyncAgentServiceServer can be embedded to have forward compatible implementations. +type UnimplementedSyncAgentServiceServer struct { +} + +func (*UnimplementedSyncAgentServiceServer) FileRemove(ctx context.Context, req *FileRemoveRequest) (*empty.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method FileRemove not implemented") +} +func (*UnimplementedSyncAgentServiceServer) FileRename(ctx context.Context, req *FileRenameRequest) (*empty.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method FileRename not implemented") +} +func (*UnimplementedSyncAgentServiceServer) FileSend(ctx context.Context, req *FileSendRequest) (*empty.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method FileSend not implemented") +} +func (*UnimplementedSyncAgentServiceServer) FilesSync(ctx context.Context, req *FilesSyncRequest) (*empty.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method FilesSync not implemented") +} +func (*UnimplementedSyncAgentServiceServer) SnapshotClone(ctx context.Context, req *SnapshotCloneRequest) (*empty.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method SnapshotClone not implemented") +} +func (*UnimplementedSyncAgentServiceServer) VolumeExport(ctx context.Context, req *VolumeExportRequest) (*empty.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method VolumeExport not implemented") +} +func (*UnimplementedSyncAgentServiceServer) ReceiverLaunch(ctx context.Context, req *ReceiverLaunchRequest) (*ReceiverLaunchResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ReceiverLaunch not implemented") +} +func (*UnimplementedSyncAgentServiceServer) BackupCreate(ctx context.Context, req *BackupCreateRequest) (*BackupCreateResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method BackupCreate not implemented") +} +func (*UnimplementedSyncAgentServiceServer) BackupRemove(ctx context.Context, req *BackupRemoveRequest) (*empty.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method BackupRemove not implemented") +} +func (*UnimplementedSyncAgentServiceServer) BackupRestore(ctx context.Context, req *BackupRestoreRequest) (*empty.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method BackupRestore not implemented") +} +func (*UnimplementedSyncAgentServiceServer) BackupStatus(ctx context.Context, req *BackupStatusRequest) (*BackupStatusResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method BackupStatus not implemented") +} +func (*UnimplementedSyncAgentServiceServer) Reset(ctx context.Context, req *empty.Empty) (*empty.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method Reset not implemented") +} +func (*UnimplementedSyncAgentServiceServer) RestoreStatus(ctx context.Context, req *empty.Empty) (*RestoreStatusResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RestoreStatus not implemented") +} +func (*UnimplementedSyncAgentServiceServer) SnapshotPurge(ctx context.Context, req *empty.Empty) (*empty.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method SnapshotPurge not implemented") +} +func (*UnimplementedSyncAgentServiceServer) SnapshotPurgeStatus(ctx context.Context, req *empty.Empty) (*SnapshotPurgeStatusResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SnapshotPurgeStatus not implemented") +} +func (*UnimplementedSyncAgentServiceServer) ReplicaRebuildStatus(ctx context.Context, req *empty.Empty) (*ReplicaRebuildStatusResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ReplicaRebuildStatus not implemented") +} +func (*UnimplementedSyncAgentServiceServer) SnapshotCloneStatus(ctx context.Context, req *empty.Empty) (*SnapshotCloneStatusResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SnapshotCloneStatus not implemented") +} +func (*UnimplementedSyncAgentServiceServer) SnapshotHash(ctx context.Context, req *SnapshotHashRequest) (*empty.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method SnapshotHash not implemented") +} +func (*UnimplementedSyncAgentServiceServer) SnapshotHashStatus(ctx context.Context, req *SnapshotHashStatusRequest) (*SnapshotHashStatusResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SnapshotHashStatus not implemented") +} +func (*UnimplementedSyncAgentServiceServer) SnapshotHashCancel(ctx context.Context, req *SnapshotHashCancelRequest) (*empty.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method SnapshotHashCancel not implemented") +} +func (*UnimplementedSyncAgentServiceServer) SnapshotHashLockState(ctx context.Context, req *empty.Empty) (*SnapshotHashLockStateResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SnapshotHashLockState not implemented") +} + +func RegisterSyncAgentServiceServer(s *grpc.Server, srv SyncAgentServiceServer) { + s.RegisterService(&_SyncAgentService_serviceDesc, srv) +} + +func _SyncAgentService_FileRemove_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(FileRemoveRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SyncAgentServiceServer).FileRemove(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ptypes.SyncAgentService/FileRemove", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SyncAgentServiceServer).FileRemove(ctx, req.(*FileRemoveRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _SyncAgentService_FileRename_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(FileRenameRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SyncAgentServiceServer).FileRename(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ptypes.SyncAgentService/FileRename", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SyncAgentServiceServer).FileRename(ctx, req.(*FileRenameRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _SyncAgentService_FileSend_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(FileSendRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SyncAgentServiceServer).FileSend(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ptypes.SyncAgentService/FileSend", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SyncAgentServiceServer).FileSend(ctx, req.(*FileSendRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _SyncAgentService_FilesSync_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(FilesSyncRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SyncAgentServiceServer).FilesSync(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ptypes.SyncAgentService/FilesSync", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SyncAgentServiceServer).FilesSync(ctx, req.(*FilesSyncRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _SyncAgentService_SnapshotClone_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SnapshotCloneRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SyncAgentServiceServer).SnapshotClone(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ptypes.SyncAgentService/SnapshotClone", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SyncAgentServiceServer).SnapshotClone(ctx, req.(*SnapshotCloneRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _SyncAgentService_VolumeExport_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(VolumeExportRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SyncAgentServiceServer).VolumeExport(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ptypes.SyncAgentService/VolumeExport", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SyncAgentServiceServer).VolumeExport(ctx, req.(*VolumeExportRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _SyncAgentService_ReceiverLaunch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ReceiverLaunchRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SyncAgentServiceServer).ReceiverLaunch(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ptypes.SyncAgentService/ReceiverLaunch", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SyncAgentServiceServer).ReceiverLaunch(ctx, req.(*ReceiverLaunchRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _SyncAgentService_BackupCreate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(BackupCreateRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SyncAgentServiceServer).BackupCreate(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ptypes.SyncAgentService/BackupCreate", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SyncAgentServiceServer).BackupCreate(ctx, req.(*BackupCreateRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _SyncAgentService_BackupRemove_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(BackupRemoveRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SyncAgentServiceServer).BackupRemove(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ptypes.SyncAgentService/BackupRemove", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SyncAgentServiceServer).BackupRemove(ctx, req.(*BackupRemoveRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _SyncAgentService_BackupRestore_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(BackupRestoreRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SyncAgentServiceServer).BackupRestore(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ptypes.SyncAgentService/BackupRestore", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SyncAgentServiceServer).BackupRestore(ctx, req.(*BackupRestoreRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _SyncAgentService_BackupStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(BackupStatusRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SyncAgentServiceServer).BackupStatus(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ptypes.SyncAgentService/BackupStatus", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SyncAgentServiceServer).BackupStatus(ctx, req.(*BackupStatusRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _SyncAgentService_Reset_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(empty.Empty) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SyncAgentServiceServer).Reset(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ptypes.SyncAgentService/Reset", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SyncAgentServiceServer).Reset(ctx, req.(*empty.Empty)) + } + return interceptor(ctx, in, info, handler) +} + +func _SyncAgentService_RestoreStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(empty.Empty) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SyncAgentServiceServer).RestoreStatus(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ptypes.SyncAgentService/RestoreStatus", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SyncAgentServiceServer).RestoreStatus(ctx, req.(*empty.Empty)) + } + return interceptor(ctx, in, info, handler) +} + +func _SyncAgentService_SnapshotPurge_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(empty.Empty) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SyncAgentServiceServer).SnapshotPurge(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ptypes.SyncAgentService/SnapshotPurge", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SyncAgentServiceServer).SnapshotPurge(ctx, req.(*empty.Empty)) + } + return interceptor(ctx, in, info, handler) +} + +func _SyncAgentService_SnapshotPurgeStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(empty.Empty) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SyncAgentServiceServer).SnapshotPurgeStatus(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ptypes.SyncAgentService/SnapshotPurgeStatus", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SyncAgentServiceServer).SnapshotPurgeStatus(ctx, req.(*empty.Empty)) + } + return interceptor(ctx, in, info, handler) +} + +func _SyncAgentService_ReplicaRebuildStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(empty.Empty) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SyncAgentServiceServer).ReplicaRebuildStatus(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ptypes.SyncAgentService/ReplicaRebuildStatus", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SyncAgentServiceServer).ReplicaRebuildStatus(ctx, req.(*empty.Empty)) + } + return interceptor(ctx, in, info, handler) +} + +func _SyncAgentService_SnapshotCloneStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(empty.Empty) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SyncAgentServiceServer).SnapshotCloneStatus(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ptypes.SyncAgentService/SnapshotCloneStatus", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SyncAgentServiceServer).SnapshotCloneStatus(ctx, req.(*empty.Empty)) + } + return interceptor(ctx, in, info, handler) +} + +func _SyncAgentService_SnapshotHash_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SnapshotHashRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SyncAgentServiceServer).SnapshotHash(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ptypes.SyncAgentService/SnapshotHash", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SyncAgentServiceServer).SnapshotHash(ctx, req.(*SnapshotHashRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _SyncAgentService_SnapshotHashStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SnapshotHashStatusRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SyncAgentServiceServer).SnapshotHashStatus(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ptypes.SyncAgentService/SnapshotHashStatus", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SyncAgentServiceServer).SnapshotHashStatus(ctx, req.(*SnapshotHashStatusRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _SyncAgentService_SnapshotHashCancel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SnapshotHashCancelRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SyncAgentServiceServer).SnapshotHashCancel(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ptypes.SyncAgentService/SnapshotHashCancel", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SyncAgentServiceServer).SnapshotHashCancel(ctx, req.(*SnapshotHashCancelRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _SyncAgentService_SnapshotHashLockState_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(empty.Empty) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SyncAgentServiceServer).SnapshotHashLockState(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ptypes.SyncAgentService/SnapshotHashLockState", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SyncAgentServiceServer).SnapshotHashLockState(ctx, req.(*empty.Empty)) + } + return interceptor(ctx, in, info, handler) +} + +var _SyncAgentService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "ptypes.SyncAgentService", + HandlerType: (*SyncAgentServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "FileRemove", + Handler: _SyncAgentService_FileRemove_Handler, + }, + { + MethodName: "FileRename", + Handler: _SyncAgentService_FileRename_Handler, + }, + { + MethodName: "FileSend", + Handler: _SyncAgentService_FileSend_Handler, + }, + { + MethodName: "FilesSync", + Handler: _SyncAgentService_FilesSync_Handler, + }, + { + MethodName: "SnapshotClone", + Handler: _SyncAgentService_SnapshotClone_Handler, + }, + { + MethodName: "VolumeExport", + Handler: _SyncAgentService_VolumeExport_Handler, + }, + { + MethodName: "ReceiverLaunch", + Handler: _SyncAgentService_ReceiverLaunch_Handler, + }, + { + MethodName: "BackupCreate", + Handler: _SyncAgentService_BackupCreate_Handler, + }, + { + MethodName: "BackupRemove", + Handler: _SyncAgentService_BackupRemove_Handler, + }, + { + MethodName: "BackupRestore", + Handler: _SyncAgentService_BackupRestore_Handler, + }, + { + MethodName: "BackupStatus", + Handler: _SyncAgentService_BackupStatus_Handler, + }, + { + MethodName: "Reset", + Handler: _SyncAgentService_Reset_Handler, + }, + { + MethodName: "RestoreStatus", + Handler: _SyncAgentService_RestoreStatus_Handler, + }, + { + MethodName: "SnapshotPurge", + Handler: _SyncAgentService_SnapshotPurge_Handler, + }, + { + MethodName: "SnapshotPurgeStatus", + Handler: _SyncAgentService_SnapshotPurgeStatus_Handler, + }, + { + MethodName: "ReplicaRebuildStatus", + Handler: _SyncAgentService_ReplicaRebuildStatus_Handler, + }, + { + MethodName: "SnapshotCloneStatus", + Handler: _SyncAgentService_SnapshotCloneStatus_Handler, + }, + { + MethodName: "SnapshotHash", + Handler: _SyncAgentService_SnapshotHash_Handler, + }, + { + MethodName: "SnapshotHashStatus", + Handler: _SyncAgentService_SnapshotHashStatus_Handler, + }, + { + MethodName: "SnapshotHashCancel", + Handler: _SyncAgentService_SnapshotHashCancel_Handler, + }, + { + MethodName: "SnapshotHashLockState", + Handler: _SyncAgentService_SnapshotHashLockState_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "syncagent.proto", +} diff --git a/vendor/github.com/longhorn/longhorn-engine/proto/ptypes/syncagent.proto b/vendor/github.com/longhorn/longhorn-engine/proto/ptypes/syncagent.proto new file mode 100644 index 000000000..dfba39151 --- /dev/null +++ b/vendor/github.com/longhorn/longhorn-engine/proto/ptypes/syncagent.proto @@ -0,0 +1,193 @@ +syntax="proto3"; + +package ptypes; + +import "google/protobuf/empty.proto"; +import "common.proto"; + +service SyncAgentService { + rpc FileRemove(FileRemoveRequest) returns (google.protobuf.Empty) {} + rpc FileRename(FileRenameRequest) returns (google.protobuf.Empty) {} + rpc FileSend(FileSendRequest) returns (google.protobuf.Empty) {} + rpc FilesSync(FilesSyncRequest) returns (google.protobuf.Empty) {} + rpc SnapshotClone(SnapshotCloneRequest) returns (google.protobuf.Empty) {} + rpc VolumeExport(VolumeExportRequest) returns (google.protobuf.Empty) {} + rpc ReceiverLaunch(ReceiverLaunchRequest) returns (ReceiverLaunchResponse) {} + rpc BackupCreate(BackupCreateRequest) returns (BackupCreateResponse) {} + rpc BackupRemove(BackupRemoveRequest) returns (google.protobuf.Empty) {} + rpc BackupRestore(BackupRestoreRequest) returns (google.protobuf.Empty) {} + rpc BackupStatus(BackupStatusRequest) returns (BackupStatusResponse) {} + rpc Reset(google.protobuf.Empty) returns (google.protobuf.Empty) {} + rpc RestoreStatus(google.protobuf.Empty) returns (RestoreStatusResponse) {} + rpc SnapshotPurge(google.protobuf.Empty) returns (google.protobuf.Empty) {} + rpc SnapshotPurgeStatus(google.protobuf.Empty) returns + (SnapshotPurgeStatusResponse) {} + rpc ReplicaRebuildStatus(google.protobuf.Empty) returns + (ReplicaRebuildStatusResponse) {} + rpc SnapshotCloneStatus(google.protobuf.Empty) returns (SnapshotCloneStatusResponse) {} + rpc SnapshotHash(SnapshotHashRequest) returns (google.protobuf.Empty) {} + rpc SnapshotHashStatus(SnapshotHashStatusRequest) returns + (SnapshotHashStatusResponse) {} + rpc SnapshotHashCancel(SnapshotHashCancelRequest) returns (google.protobuf.Empty) {} + rpc SnapshotHashLockState(google.protobuf.Empty) returns (SnapshotHashLockStateResponse) {} +} + +message FileRemoveRequest { + string file_name = 1; +} + +message FileRenameRequest { + string old_file_name = 1; + string new_file_name = 2; +} + +message ReceiverLaunchRequest { + string to_file_name = 1; +} + +message ReceiverLaunchResponse { + int32 port = 1; +} + +message FileSendRequest { + string from_file_name = 1; + string host = 2; + int32 port = 3; + bool fast_sync = 4; + int32 file_sync_http_client_timeout = 5; +} + +message FilesSyncRequest { + string from_address = 1; + string to_host = 2; + repeated SyncFileInfo sync_file_info_list = 3; + bool fast_sync = 4; + int32 file_sync_http_client_timeout = 5; +} + +message SnapshotCloneRequest { + string from_address = 1; + string to_host = 2; + string snapshot_file_name = 3; + bool export_backing_image_if_exist = 4; + int32 file_sync_http_client_timeout = 5; + string from_volume_name = 6; +} + +message VolumeExportRequest { + string snapshot_file_name = 1; + string host = 2; + int32 port = 3; + bool export_backing_image_if_exist = 4; + int32 file_sync_http_client_timeout = 5; +} + +message BackupCreateRequest { + string snapshot_file_name = 1; + string backup_target = 2; + string volume_name = 3; + repeated string labels = 4; + map credential = 5; + string backing_image_name = 6; + string backing_image_checksum = 7; + string backup_name = 8; + string compression_method = 9; + int32 concurrent_limit = 10; + string storage_class_name = 11; +} + +message BackupCreateResponse { + string backup = 1; + bool is_incremental = 2; +} + +message BackupRemoveRequest { + string backup = 1; +}; + +message BackupStatusRequest { + string backup = 1; +} + +message BackupStatusResponse { + int32 progress = 1; + string backup_url = 2; + string error = 3; + string snapshot_name = 4; + string state = 5; +} + +message BackupRestoreRequest { + string backup = 1; + string snapshot_disk_name = 2; + map credential = 3; + int32 concurrent_limit = 4; +} + +message BackupRestoreIncrementallyRequest { + string backup = 1; + string delta_file_name = 2; + string last_restored_backup_name = 3; + string snapshot_disk_name = 4; + map credential = 5; + int32 concurrent_limit = 6; +} + +message RestoreStatusResponse { + bool is_restoring = 1; + string last_restored = 2; + int32 progress = 3; + string error = 4; + string dest_file_name = 5; + string state = 6; + string backup_url = 7; + string current_restoring_backup = 8; +} + +message SnapshotPurgeStatusResponse { + bool is_purging = 1; + string error = 2; + int32 progress = 3; + string state = 4; +} + +message ReplicaRebuildStatusResponse { + bool is_rebuilding = 1; + string error = 2; + int32 progress = 3; + string state = 4; + string from_replica_address = 5; +} + +message SnapshotCloneStatusResponse { + bool is_cloning = 1; + string error = 2; + int32 progress = 3; + string state = 4; + string from_replica_address = 5; + string snapshot_name = 6; +} + +message SnapshotHashRequest { + string snapshot_name = 1; + bool rehash = 2; +} + +message SnapshotHashStatusRequest { + string snapshot_name = 1; +} + +message SnapshotHashStatusResponse { + string state = 1; + string checksum = 2; + string error = 3; + bool silently_corrupted = 4; +} + +message SnapshotHashCancelRequest { + string snapshot_name = 1; +} + +message SnapshotHashLockStateResponse { + bool is_locked = 1; +} diff --git a/vendor/github.com/longhorn/longhorn-engine/proto/ptypes/util.go b/vendor/github.com/longhorn/longhorn-engine/proto/ptypes/util.go new file mode 100644 index 000000000..05599cd89 --- /dev/null +++ b/vendor/github.com/longhorn/longhorn-engine/proto/ptypes/util.go @@ -0,0 +1,29 @@ +package ptypes + +import ( + "github.com/longhorn/longhorn-engine/pkg/types" +) + +func ReplicaModeToGRPCReplicaMode(mode types.Mode) ReplicaMode { + switch mode { + case types.WO: + return ReplicaMode_WO + case types.RW: + return ReplicaMode_RW + case types.ERR: + return ReplicaMode_ERR + } + return ReplicaMode_ERR +} + +func GRPCReplicaModeToReplicaMode(replicaMode ReplicaMode) types.Mode { + switch replicaMode { + case ReplicaMode_WO: + return types.WO + case ReplicaMode_RW: + return types.RW + case ReplicaMode_ERR: + return types.ERR + } + return types.ERR +} diff --git a/vendor/modules.txt b/vendor/modules.txt index 77149e4d3..bc5cba126 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -170,6 +170,7 @@ github.com/golang/protobuf/proto github.com/golang/protobuf/ptypes github.com/golang/protobuf/ptypes/any github.com/golang/protobuf/ptypes/duration +github.com/golang/protobuf/ptypes/empty github.com/golang/protobuf/ptypes/timestamp # github.com/google/gnostic-models v0.6.8 ## explicit; go 1.18 @@ -238,13 +239,6 @@ github.com/longhorn/go-common-libs/sync github.com/longhorn/go-common-libs/sys github.com/longhorn/go-common-libs/types github.com/longhorn/go-common-libs/utils -# github.com/longhorn/go-iscsi-helper v0.0.0-20240811043302-df8de353dd58 -## explicit; go 1.22.0 -github.com/longhorn/go-iscsi-helper/iscsi -github.com/longhorn/go-iscsi-helper/iscsidev -github.com/longhorn/go-iscsi-helper/longhorndev -github.com/longhorn/go-iscsi-helper/types -github.com/longhorn/go-iscsi-helper/util # github.com/longhorn/go-spdk-helper v0.0.0-20240820144231-33c0873802ff ## explicit; go 1.22.0 github.com/longhorn/go-spdk-helper/pkg/jsonrpc @@ -254,11 +248,10 @@ github.com/longhorn/go-spdk-helper/pkg/spdk/setup github.com/longhorn/go-spdk-helper/pkg/spdk/types github.com/longhorn/go-spdk-helper/pkg/types github.com/longhorn/go-spdk-helper/pkg/util -# github.com/longhorn/longhorn-engine v1.7.0-dev.0.20240824053610-9d2b194f765f -## explicit; go 1.22.2 +# github.com/longhorn/longhorn-engine v1.5.5 +## explicit; go 1.21 github.com/longhorn/longhorn-engine/pkg/backingfile github.com/longhorn/longhorn-engine/pkg/controller/client -github.com/longhorn/longhorn-engine/pkg/interceptor github.com/longhorn/longhorn-engine/pkg/meta github.com/longhorn/longhorn-engine/pkg/qcow github.com/longhorn/longhorn-engine/pkg/replica @@ -267,6 +260,7 @@ github.com/longhorn/longhorn-engine/pkg/sync github.com/longhorn/longhorn-engine/pkg/types github.com/longhorn/longhorn-engine/pkg/util github.com/longhorn/longhorn-engine/pkg/util/disk +github.com/longhorn/longhorn-engine/proto/ptypes # github.com/longhorn/longhorn-spdk-engine v0.0.0-20240821075759-df0d2ae1b9bb ## explicit; go 1.22.0 github.com/longhorn/longhorn-spdk-engine/pkg/api