2018-06-20 20:20:37 +02:00
|
|
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
|
|
|
// source: pdu.proto
|
|
|
|
|
2018-08-16 21:05:21 +02:00
|
|
|
package pdu
|
2018-06-20 20:20:37 +02:00
|
|
|
|
2018-12-01 14:09:32 +01:00
|
|
|
import proto "github.com/golang/protobuf/proto"
|
|
|
|
import fmt "fmt"
|
|
|
|
import math "math"
|
2018-06-20 20:20:37 +02:00
|
|
|
|
2018-12-11 22:01:50 +01:00
|
|
|
import (
|
|
|
|
context "golang.org/x/net/context"
|
|
|
|
grpc "google.golang.org/grpc"
|
|
|
|
)
|
|
|
|
|
2018-06-20 20:20:37 +02:00
|
|
|
// 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.ProtoPackageIsVersion2 // please upgrade the proto package
|
|
|
|
|
new features: {resumable,encrypted,hold-protected} send-recv, last-received-hold
- **Resumable Send & Recv Support**
No knobs required, automatically used where supported.
- **Hold-Protected Send & Recv**
Automatic ZFS holds to ensure that we can always resume a replication step.
- **Encrypted Send & Recv Support** for OpenZFS native encryption.
Configurable at the job level, i.e., for all filesystems a job is responsible for.
- **Receive-side hold on last received dataset**
The counterpart to the replication cursor bookmark on the send-side.
Ensures that incremental replication will always be possible between a sender and receiver.
Design Doc
----------
`replication/design.md` doc describes how we use ZFS holds and bookmarks to ensure that a single replication step is always resumable.
The replication algorithm described in the design doc introduces the notion of job IDs (please read the details on this design doc).
We reuse the job names for job IDs and use `JobID` type to ensure that a job name can be embedded into hold tags, bookmark names, etc.
This might BREAK CONFIG on upgrade.
Protocol Version Bump
---------------------
This commit makes backwards-incompatible changes to the replication/pdu protobufs.
Thus, bump the version number used in the protocol handshake.
Replication Cursor Format Change
--------------------------------
The new replication cursor bookmark format is: `#zrepl_CURSOR_G_${this.GUID}_J_${jobid}`
Including the GUID enables transaction-safe moving-forward of the cursor.
Including the job id enables that multiple sending jobs can send the same filesystem without interfering.
The `zrepl migrate replication-cursor:v1-v2` subcommand can be used to safely destroy old-format cursors once zrepl has created new-format cursors.
Changes in This Commit
----------------------
- package zfs
- infrastructure for holds
- infrastructure for resume token decoding
- implement a variant of OpenZFS's `entity_namecheck` and use it for validation in new code
- ZFSSendArgs to specify a ZFS send operation
- validation code protects against malicious resume tokens by checking that the token encodes the same send parameters that the send-side would use if no resume token were available (i.e. same filesystem, `fromguid`, `toguid`)
- RecvOptions support for `recv -s` flag
- convert a bunch of ZFS operations to be idempotent
- achieved through more differentiated error message scraping / additional pre-/post-checks
- package replication/pdu
- add field for encryption to send request messages
- add fields for resume handling to send & recv request messages
- receive requests now contain `FilesystemVersion To` in addition to the filesystem into which the stream should be `recv`d into
- can use `zfs recv $root_fs/$client_id/path/to/dataset@${To.Name}`, which enables additional validation after recv (i.e. whether `To.Guid` matched what we received in the stream)
- used to set `last-received-hold`
- package replication/logic
- introduce `PlannerPolicy` struct, currently only used to configure whether encrypted sends should be requested from the sender
- integrate encryption and resume token support into `Step` struct
- package endpoint
- move the concepts that endpoint builds on top of ZFS to a single file `endpoint/endpoint_zfs.go`
- step-holds + step-bookmarks
- last-received-hold
- new replication cursor + old replication cursor compat code
- adjust `endpoint/endpoint.go` handlers for
- encryption
- resumability
- new replication cursor
- last-received-hold
- client subcommand `zrepl holds list`: list all holds and hold-like bookmarks that zrepl thinks belong to it
- client subcommand `zrepl migrate replication-cursor:v1-v2`
2019-09-11 17:19:17 +02:00
|
|
|
type Tri int32
|
|
|
|
|
|
|
|
const (
|
|
|
|
Tri_DontCare Tri = 0
|
|
|
|
Tri_False Tri = 1
|
|
|
|
Tri_True Tri = 2
|
|
|
|
)
|
|
|
|
|
|
|
|
var Tri_name = map[int32]string{
|
|
|
|
0: "DontCare",
|
|
|
|
1: "False",
|
|
|
|
2: "True",
|
|
|
|
}
|
|
|
|
var Tri_value = map[string]int32{
|
|
|
|
"DontCare": 0,
|
|
|
|
"False": 1,
|
|
|
|
"True": 2,
|
|
|
|
}
|
|
|
|
|
|
|
|
func (x Tri) String() string {
|
|
|
|
return proto.EnumName(Tri_name, int32(x))
|
|
|
|
}
|
|
|
|
func (Tri) EnumDescriptor() ([]byte, []int) {
|
2020-06-27 23:53:33 +02:00
|
|
|
return fileDescriptor_pdu_616c27178643eca4, []int{0}
|
|
|
|
}
|
|
|
|
|
|
|
|
type ReplicationGuaranteeKind int32
|
|
|
|
|
|
|
|
const (
|
|
|
|
ReplicationGuaranteeKind_GuaranteeInvalid ReplicationGuaranteeKind = 0
|
|
|
|
ReplicationGuaranteeKind_GuaranteeResumability ReplicationGuaranteeKind = 1
|
|
|
|
ReplicationGuaranteeKind_GuaranteeIncrementalReplication ReplicationGuaranteeKind = 2
|
|
|
|
ReplicationGuaranteeKind_GuaranteeNothing ReplicationGuaranteeKind = 3
|
|
|
|
)
|
|
|
|
|
|
|
|
var ReplicationGuaranteeKind_name = map[int32]string{
|
|
|
|
0: "GuaranteeInvalid",
|
|
|
|
1: "GuaranteeResumability",
|
|
|
|
2: "GuaranteeIncrementalReplication",
|
|
|
|
3: "GuaranteeNothing",
|
|
|
|
}
|
|
|
|
var ReplicationGuaranteeKind_value = map[string]int32{
|
|
|
|
"GuaranteeInvalid": 0,
|
|
|
|
"GuaranteeResumability": 1,
|
|
|
|
"GuaranteeIncrementalReplication": 2,
|
|
|
|
"GuaranteeNothing": 3,
|
|
|
|
}
|
|
|
|
|
|
|
|
func (x ReplicationGuaranteeKind) String() string {
|
|
|
|
return proto.EnumName(ReplicationGuaranteeKind_name, int32(x))
|
|
|
|
}
|
|
|
|
func (ReplicationGuaranteeKind) EnumDescriptor() ([]byte, []int) {
|
|
|
|
return fileDescriptor_pdu_616c27178643eca4, []int{1}
|
new features: {resumable,encrypted,hold-protected} send-recv, last-received-hold
- **Resumable Send & Recv Support**
No knobs required, automatically used where supported.
- **Hold-Protected Send & Recv**
Automatic ZFS holds to ensure that we can always resume a replication step.
- **Encrypted Send & Recv Support** for OpenZFS native encryption.
Configurable at the job level, i.e., for all filesystems a job is responsible for.
- **Receive-side hold on last received dataset**
The counterpart to the replication cursor bookmark on the send-side.
Ensures that incremental replication will always be possible between a sender and receiver.
Design Doc
----------
`replication/design.md` doc describes how we use ZFS holds and bookmarks to ensure that a single replication step is always resumable.
The replication algorithm described in the design doc introduces the notion of job IDs (please read the details on this design doc).
We reuse the job names for job IDs and use `JobID` type to ensure that a job name can be embedded into hold tags, bookmark names, etc.
This might BREAK CONFIG on upgrade.
Protocol Version Bump
---------------------
This commit makes backwards-incompatible changes to the replication/pdu protobufs.
Thus, bump the version number used in the protocol handshake.
Replication Cursor Format Change
--------------------------------
The new replication cursor bookmark format is: `#zrepl_CURSOR_G_${this.GUID}_J_${jobid}`
Including the GUID enables transaction-safe moving-forward of the cursor.
Including the job id enables that multiple sending jobs can send the same filesystem without interfering.
The `zrepl migrate replication-cursor:v1-v2` subcommand can be used to safely destroy old-format cursors once zrepl has created new-format cursors.
Changes in This Commit
----------------------
- package zfs
- infrastructure for holds
- infrastructure for resume token decoding
- implement a variant of OpenZFS's `entity_namecheck` and use it for validation in new code
- ZFSSendArgs to specify a ZFS send operation
- validation code protects against malicious resume tokens by checking that the token encodes the same send parameters that the send-side would use if no resume token were available (i.e. same filesystem, `fromguid`, `toguid`)
- RecvOptions support for `recv -s` flag
- convert a bunch of ZFS operations to be idempotent
- achieved through more differentiated error message scraping / additional pre-/post-checks
- package replication/pdu
- add field for encryption to send request messages
- add fields for resume handling to send & recv request messages
- receive requests now contain `FilesystemVersion To` in addition to the filesystem into which the stream should be `recv`d into
- can use `zfs recv $root_fs/$client_id/path/to/dataset@${To.Name}`, which enables additional validation after recv (i.e. whether `To.Guid` matched what we received in the stream)
- used to set `last-received-hold`
- package replication/logic
- introduce `PlannerPolicy` struct, currently only used to configure whether encrypted sends should be requested from the sender
- integrate encryption and resume token support into `Step` struct
- package endpoint
- move the concepts that endpoint builds on top of ZFS to a single file `endpoint/endpoint_zfs.go`
- step-holds + step-bookmarks
- last-received-hold
- new replication cursor + old replication cursor compat code
- adjust `endpoint/endpoint.go` handlers for
- encryption
- resumability
- new replication cursor
- last-received-hold
- client subcommand `zrepl holds list`: list all holds and hold-like bookmarks that zrepl thinks belong to it
- client subcommand `zrepl migrate replication-cursor:v1-v2`
2019-09-11 17:19:17 +02:00
|
|
|
}
|
|
|
|
|
2018-06-20 20:20:37 +02:00
|
|
|
type FilesystemVersion_VersionType int32
|
|
|
|
|
|
|
|
const (
|
|
|
|
FilesystemVersion_Snapshot FilesystemVersion_VersionType = 0
|
|
|
|
FilesystemVersion_Bookmark FilesystemVersion_VersionType = 1
|
|
|
|
)
|
|
|
|
|
|
|
|
var FilesystemVersion_VersionType_name = map[int32]string{
|
|
|
|
0: "Snapshot",
|
|
|
|
1: "Bookmark",
|
|
|
|
}
|
|
|
|
var FilesystemVersion_VersionType_value = map[string]int32{
|
|
|
|
"Snapshot": 0,
|
|
|
|
"Bookmark": 1,
|
|
|
|
}
|
|
|
|
|
|
|
|
func (x FilesystemVersion_VersionType) String() string {
|
|
|
|
return proto.EnumName(FilesystemVersion_VersionType_name, int32(x))
|
|
|
|
}
|
|
|
|
func (FilesystemVersion_VersionType) EnumDescriptor() ([]byte, []int) {
|
2020-06-27 23:53:33 +02:00
|
|
|
return fileDescriptor_pdu_616c27178643eca4, []int{5, 0}
|
2018-06-20 20:20:37 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
type ListFilesystemReq struct {
|
2018-08-26 14:35:18 +02:00
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
2018-06-20 20:20:37 +02:00
|
|
|
}
|
|
|
|
|
2018-08-26 14:35:18 +02:00
|
|
|
func (m *ListFilesystemReq) Reset() { *m = ListFilesystemReq{} }
|
|
|
|
func (m *ListFilesystemReq) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*ListFilesystemReq) ProtoMessage() {}
|
|
|
|
func (*ListFilesystemReq) Descriptor() ([]byte, []int) {
|
2020-06-27 23:53:33 +02:00
|
|
|
return fileDescriptor_pdu_616c27178643eca4, []int{0}
|
2018-08-26 14:35:18 +02:00
|
|
|
}
|
|
|
|
func (m *ListFilesystemReq) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_ListFilesystemReq.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *ListFilesystemReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_ListFilesystemReq.Marshal(b, m, deterministic)
|
|
|
|
}
|
2018-12-01 14:09:32 +01:00
|
|
|
func (dst *ListFilesystemReq) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_ListFilesystemReq.Merge(dst, src)
|
2018-08-26 14:35:18 +02:00
|
|
|
}
|
|
|
|
func (m *ListFilesystemReq) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_ListFilesystemReq.Size(m)
|
|
|
|
}
|
|
|
|
func (m *ListFilesystemReq) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_ListFilesystemReq.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_ListFilesystemReq proto.InternalMessageInfo
|
2018-06-20 20:20:37 +02:00
|
|
|
|
|
|
|
type ListFilesystemRes struct {
|
2018-08-26 14:35:18 +02:00
|
|
|
Filesystems []*Filesystem `protobuf:"bytes,1,rep,name=Filesystems,proto3" json:"Filesystems,omitempty"`
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *ListFilesystemRes) Reset() { *m = ListFilesystemRes{} }
|
|
|
|
func (m *ListFilesystemRes) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*ListFilesystemRes) ProtoMessage() {}
|
|
|
|
func (*ListFilesystemRes) Descriptor() ([]byte, []int) {
|
2020-06-27 23:53:33 +02:00
|
|
|
return fileDescriptor_pdu_616c27178643eca4, []int{1}
|
2018-08-26 14:35:18 +02:00
|
|
|
}
|
|
|
|
func (m *ListFilesystemRes) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_ListFilesystemRes.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *ListFilesystemRes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_ListFilesystemRes.Marshal(b, m, deterministic)
|
|
|
|
}
|
2018-12-01 14:09:32 +01:00
|
|
|
func (dst *ListFilesystemRes) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_ListFilesystemRes.Merge(dst, src)
|
2018-08-26 14:35:18 +02:00
|
|
|
}
|
|
|
|
func (m *ListFilesystemRes) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_ListFilesystemRes.Size(m)
|
|
|
|
}
|
|
|
|
func (m *ListFilesystemRes) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_ListFilesystemRes.DiscardUnknown(m)
|
2018-06-20 20:20:37 +02:00
|
|
|
}
|
|
|
|
|
2018-08-26 14:35:18 +02:00
|
|
|
var xxx_messageInfo_ListFilesystemRes proto.InternalMessageInfo
|
2018-06-20 20:20:37 +02:00
|
|
|
|
|
|
|
func (m *ListFilesystemRes) GetFilesystems() []*Filesystem {
|
|
|
|
if m != nil {
|
|
|
|
return m.Filesystems
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
type Filesystem struct {
|
2018-08-26 14:35:18 +02:00
|
|
|
Path string `protobuf:"bytes,1,opt,name=Path,proto3" json:"Path,omitempty"`
|
|
|
|
ResumeToken string `protobuf:"bytes,2,opt,name=ResumeToken,proto3" json:"ResumeToken,omitempty"`
|
2019-03-13 18:33:20 +01:00
|
|
|
IsPlaceholder bool `protobuf:"varint,3,opt,name=IsPlaceholder,proto3" json:"IsPlaceholder,omitempty"`
|
new features: {resumable,encrypted,hold-protected} send-recv, last-received-hold
- **Resumable Send & Recv Support**
No knobs required, automatically used where supported.
- **Hold-Protected Send & Recv**
Automatic ZFS holds to ensure that we can always resume a replication step.
- **Encrypted Send & Recv Support** for OpenZFS native encryption.
Configurable at the job level, i.e., for all filesystems a job is responsible for.
- **Receive-side hold on last received dataset**
The counterpart to the replication cursor bookmark on the send-side.
Ensures that incremental replication will always be possible between a sender and receiver.
Design Doc
----------
`replication/design.md` doc describes how we use ZFS holds and bookmarks to ensure that a single replication step is always resumable.
The replication algorithm described in the design doc introduces the notion of job IDs (please read the details on this design doc).
We reuse the job names for job IDs and use `JobID` type to ensure that a job name can be embedded into hold tags, bookmark names, etc.
This might BREAK CONFIG on upgrade.
Protocol Version Bump
---------------------
This commit makes backwards-incompatible changes to the replication/pdu protobufs.
Thus, bump the version number used in the protocol handshake.
Replication Cursor Format Change
--------------------------------
The new replication cursor bookmark format is: `#zrepl_CURSOR_G_${this.GUID}_J_${jobid}`
Including the GUID enables transaction-safe moving-forward of the cursor.
Including the job id enables that multiple sending jobs can send the same filesystem without interfering.
The `zrepl migrate replication-cursor:v1-v2` subcommand can be used to safely destroy old-format cursors once zrepl has created new-format cursors.
Changes in This Commit
----------------------
- package zfs
- infrastructure for holds
- infrastructure for resume token decoding
- implement a variant of OpenZFS's `entity_namecheck` and use it for validation in new code
- ZFSSendArgs to specify a ZFS send operation
- validation code protects against malicious resume tokens by checking that the token encodes the same send parameters that the send-side would use if no resume token were available (i.e. same filesystem, `fromguid`, `toguid`)
- RecvOptions support for `recv -s` flag
- convert a bunch of ZFS operations to be idempotent
- achieved through more differentiated error message scraping / additional pre-/post-checks
- package replication/pdu
- add field for encryption to send request messages
- add fields for resume handling to send & recv request messages
- receive requests now contain `FilesystemVersion To` in addition to the filesystem into which the stream should be `recv`d into
- can use `zfs recv $root_fs/$client_id/path/to/dataset@${To.Name}`, which enables additional validation after recv (i.e. whether `To.Guid` matched what we received in the stream)
- used to set `last-received-hold`
- package replication/logic
- introduce `PlannerPolicy` struct, currently only used to configure whether encrypted sends should be requested from the sender
- integrate encryption and resume token support into `Step` struct
- package endpoint
- move the concepts that endpoint builds on top of ZFS to a single file `endpoint/endpoint_zfs.go`
- step-holds + step-bookmarks
- last-received-hold
- new replication cursor + old replication cursor compat code
- adjust `endpoint/endpoint.go` handlers for
- encryption
- resumability
- new replication cursor
- last-received-hold
- client subcommand `zrepl holds list`: list all holds and hold-like bookmarks that zrepl thinks belong to it
- client subcommand `zrepl migrate replication-cursor:v1-v2`
2019-09-11 17:19:17 +02:00
|
|
|
IsEncrypted bool `protobuf:"varint,4,opt,name=IsEncrypted,proto3" json:"IsEncrypted,omitempty"`
|
2018-08-26 14:35:18 +02:00
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
2018-06-20 20:20:37 +02:00
|
|
|
}
|
|
|
|
|
2018-08-26 14:35:18 +02:00
|
|
|
func (m *Filesystem) Reset() { *m = Filesystem{} }
|
|
|
|
func (m *Filesystem) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*Filesystem) ProtoMessage() {}
|
|
|
|
func (*Filesystem) Descriptor() ([]byte, []int) {
|
2020-06-27 23:53:33 +02:00
|
|
|
return fileDescriptor_pdu_616c27178643eca4, []int{2}
|
2018-08-26 14:35:18 +02:00
|
|
|
}
|
|
|
|
func (m *Filesystem) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_Filesystem.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *Filesystem) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_Filesystem.Marshal(b, m, deterministic)
|
|
|
|
}
|
2018-12-01 14:09:32 +01:00
|
|
|
func (dst *Filesystem) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_Filesystem.Merge(dst, src)
|
2018-08-26 14:35:18 +02:00
|
|
|
}
|
|
|
|
func (m *Filesystem) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_Filesystem.Size(m)
|
|
|
|
}
|
|
|
|
func (m *Filesystem) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_Filesystem.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_Filesystem proto.InternalMessageInfo
|
2018-06-20 20:20:37 +02:00
|
|
|
|
|
|
|
func (m *Filesystem) GetPath() string {
|
|
|
|
if m != nil {
|
|
|
|
return m.Path
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Filesystem) GetResumeToken() string {
|
|
|
|
if m != nil {
|
|
|
|
return m.ResumeToken
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
2019-03-13 18:33:20 +01:00
|
|
|
func (m *Filesystem) GetIsPlaceholder() bool {
|
|
|
|
if m != nil {
|
|
|
|
return m.IsPlaceholder
|
|
|
|
}
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
|
new features: {resumable,encrypted,hold-protected} send-recv, last-received-hold
- **Resumable Send & Recv Support**
No knobs required, automatically used where supported.
- **Hold-Protected Send & Recv**
Automatic ZFS holds to ensure that we can always resume a replication step.
- **Encrypted Send & Recv Support** for OpenZFS native encryption.
Configurable at the job level, i.e., for all filesystems a job is responsible for.
- **Receive-side hold on last received dataset**
The counterpart to the replication cursor bookmark on the send-side.
Ensures that incremental replication will always be possible between a sender and receiver.
Design Doc
----------
`replication/design.md` doc describes how we use ZFS holds and bookmarks to ensure that a single replication step is always resumable.
The replication algorithm described in the design doc introduces the notion of job IDs (please read the details on this design doc).
We reuse the job names for job IDs and use `JobID` type to ensure that a job name can be embedded into hold tags, bookmark names, etc.
This might BREAK CONFIG on upgrade.
Protocol Version Bump
---------------------
This commit makes backwards-incompatible changes to the replication/pdu protobufs.
Thus, bump the version number used in the protocol handshake.
Replication Cursor Format Change
--------------------------------
The new replication cursor bookmark format is: `#zrepl_CURSOR_G_${this.GUID}_J_${jobid}`
Including the GUID enables transaction-safe moving-forward of the cursor.
Including the job id enables that multiple sending jobs can send the same filesystem without interfering.
The `zrepl migrate replication-cursor:v1-v2` subcommand can be used to safely destroy old-format cursors once zrepl has created new-format cursors.
Changes in This Commit
----------------------
- package zfs
- infrastructure for holds
- infrastructure for resume token decoding
- implement a variant of OpenZFS's `entity_namecheck` and use it for validation in new code
- ZFSSendArgs to specify a ZFS send operation
- validation code protects against malicious resume tokens by checking that the token encodes the same send parameters that the send-side would use if no resume token were available (i.e. same filesystem, `fromguid`, `toguid`)
- RecvOptions support for `recv -s` flag
- convert a bunch of ZFS operations to be idempotent
- achieved through more differentiated error message scraping / additional pre-/post-checks
- package replication/pdu
- add field for encryption to send request messages
- add fields for resume handling to send & recv request messages
- receive requests now contain `FilesystemVersion To` in addition to the filesystem into which the stream should be `recv`d into
- can use `zfs recv $root_fs/$client_id/path/to/dataset@${To.Name}`, which enables additional validation after recv (i.e. whether `To.Guid` matched what we received in the stream)
- used to set `last-received-hold`
- package replication/logic
- introduce `PlannerPolicy` struct, currently only used to configure whether encrypted sends should be requested from the sender
- integrate encryption and resume token support into `Step` struct
- package endpoint
- move the concepts that endpoint builds on top of ZFS to a single file `endpoint/endpoint_zfs.go`
- step-holds + step-bookmarks
- last-received-hold
- new replication cursor + old replication cursor compat code
- adjust `endpoint/endpoint.go` handlers for
- encryption
- resumability
- new replication cursor
- last-received-hold
- client subcommand `zrepl holds list`: list all holds and hold-like bookmarks that zrepl thinks belong to it
- client subcommand `zrepl migrate replication-cursor:v1-v2`
2019-09-11 17:19:17 +02:00
|
|
|
func (m *Filesystem) GetIsEncrypted() bool {
|
|
|
|
if m != nil {
|
|
|
|
return m.IsEncrypted
|
|
|
|
}
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
|
2018-06-20 20:20:37 +02:00
|
|
|
type ListFilesystemVersionsReq struct {
|
2018-08-26 14:35:18 +02:00
|
|
|
Filesystem string `protobuf:"bytes,1,opt,name=Filesystem,proto3" json:"Filesystem,omitempty"`
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *ListFilesystemVersionsReq) Reset() { *m = ListFilesystemVersionsReq{} }
|
|
|
|
func (m *ListFilesystemVersionsReq) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*ListFilesystemVersionsReq) ProtoMessage() {}
|
|
|
|
func (*ListFilesystemVersionsReq) Descriptor() ([]byte, []int) {
|
2020-06-27 23:53:33 +02:00
|
|
|
return fileDescriptor_pdu_616c27178643eca4, []int{3}
|
2018-08-26 14:35:18 +02:00
|
|
|
}
|
|
|
|
func (m *ListFilesystemVersionsReq) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_ListFilesystemVersionsReq.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *ListFilesystemVersionsReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_ListFilesystemVersionsReq.Marshal(b, m, deterministic)
|
|
|
|
}
|
2018-12-01 14:09:32 +01:00
|
|
|
func (dst *ListFilesystemVersionsReq) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_ListFilesystemVersionsReq.Merge(dst, src)
|
2018-08-26 14:35:18 +02:00
|
|
|
}
|
|
|
|
func (m *ListFilesystemVersionsReq) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_ListFilesystemVersionsReq.Size(m)
|
|
|
|
}
|
|
|
|
func (m *ListFilesystemVersionsReq) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_ListFilesystemVersionsReq.DiscardUnknown(m)
|
2018-06-20 20:20:37 +02:00
|
|
|
}
|
|
|
|
|
2018-08-26 14:35:18 +02:00
|
|
|
var xxx_messageInfo_ListFilesystemVersionsReq proto.InternalMessageInfo
|
2018-06-20 20:20:37 +02:00
|
|
|
|
|
|
|
func (m *ListFilesystemVersionsReq) GetFilesystem() string {
|
|
|
|
if m != nil {
|
|
|
|
return m.Filesystem
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
|
|
|
type ListFilesystemVersionsRes struct {
|
2018-08-26 14:35:18 +02:00
|
|
|
Versions []*FilesystemVersion `protobuf:"bytes,1,rep,name=Versions,proto3" json:"Versions,omitempty"`
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
2018-06-20 20:20:37 +02:00
|
|
|
}
|
|
|
|
|
2018-08-26 14:35:18 +02:00
|
|
|
func (m *ListFilesystemVersionsRes) Reset() { *m = ListFilesystemVersionsRes{} }
|
|
|
|
func (m *ListFilesystemVersionsRes) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*ListFilesystemVersionsRes) ProtoMessage() {}
|
|
|
|
func (*ListFilesystemVersionsRes) Descriptor() ([]byte, []int) {
|
2020-06-27 23:53:33 +02:00
|
|
|
return fileDescriptor_pdu_616c27178643eca4, []int{4}
|
2018-08-26 14:35:18 +02:00
|
|
|
}
|
|
|
|
func (m *ListFilesystemVersionsRes) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_ListFilesystemVersionsRes.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *ListFilesystemVersionsRes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_ListFilesystemVersionsRes.Marshal(b, m, deterministic)
|
|
|
|
}
|
2018-12-01 14:09:32 +01:00
|
|
|
func (dst *ListFilesystemVersionsRes) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_ListFilesystemVersionsRes.Merge(dst, src)
|
2018-08-26 14:35:18 +02:00
|
|
|
}
|
|
|
|
func (m *ListFilesystemVersionsRes) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_ListFilesystemVersionsRes.Size(m)
|
|
|
|
}
|
|
|
|
func (m *ListFilesystemVersionsRes) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_ListFilesystemVersionsRes.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_ListFilesystemVersionsRes proto.InternalMessageInfo
|
2018-06-20 20:20:37 +02:00
|
|
|
|
|
|
|
func (m *ListFilesystemVersionsRes) GetVersions() []*FilesystemVersion {
|
|
|
|
if m != nil {
|
|
|
|
return m.Versions
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
type FilesystemVersion struct {
|
2018-12-11 22:01:50 +01:00
|
|
|
Type FilesystemVersion_VersionType `protobuf:"varint,1,opt,name=Type,proto3,enum=FilesystemVersion_VersionType" json:"Type,omitempty"`
|
2018-08-26 14:35:18 +02:00
|
|
|
Name string `protobuf:"bytes,2,opt,name=Name,proto3" json:"Name,omitempty"`
|
|
|
|
Guid uint64 `protobuf:"varint,3,opt,name=Guid,proto3" json:"Guid,omitempty"`
|
|
|
|
CreateTXG uint64 `protobuf:"varint,4,opt,name=CreateTXG,proto3" json:"CreateTXG,omitempty"`
|
|
|
|
Creation string `protobuf:"bytes,5,opt,name=Creation,proto3" json:"Creation,omitempty"`
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
2018-06-20 20:20:37 +02:00
|
|
|
}
|
|
|
|
|
2018-08-26 14:35:18 +02:00
|
|
|
func (m *FilesystemVersion) Reset() { *m = FilesystemVersion{} }
|
|
|
|
func (m *FilesystemVersion) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*FilesystemVersion) ProtoMessage() {}
|
|
|
|
func (*FilesystemVersion) Descriptor() ([]byte, []int) {
|
2020-06-27 23:53:33 +02:00
|
|
|
return fileDescriptor_pdu_616c27178643eca4, []int{5}
|
2018-08-26 14:35:18 +02:00
|
|
|
}
|
|
|
|
func (m *FilesystemVersion) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_FilesystemVersion.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *FilesystemVersion) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_FilesystemVersion.Marshal(b, m, deterministic)
|
|
|
|
}
|
2018-12-01 14:09:32 +01:00
|
|
|
func (dst *FilesystemVersion) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_FilesystemVersion.Merge(dst, src)
|
2018-08-26 14:35:18 +02:00
|
|
|
}
|
|
|
|
func (m *FilesystemVersion) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_FilesystemVersion.Size(m)
|
|
|
|
}
|
|
|
|
func (m *FilesystemVersion) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_FilesystemVersion.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_FilesystemVersion proto.InternalMessageInfo
|
2018-06-20 20:20:37 +02:00
|
|
|
|
|
|
|
func (m *FilesystemVersion) GetType() FilesystemVersion_VersionType {
|
|
|
|
if m != nil {
|
|
|
|
return m.Type
|
|
|
|
}
|
|
|
|
return FilesystemVersion_Snapshot
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *FilesystemVersion) GetName() string {
|
|
|
|
if m != nil {
|
|
|
|
return m.Name
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *FilesystemVersion) GetGuid() uint64 {
|
|
|
|
if m != nil {
|
|
|
|
return m.Guid
|
|
|
|
}
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *FilesystemVersion) GetCreateTXG() uint64 {
|
|
|
|
if m != nil {
|
|
|
|
return m.CreateTXG
|
|
|
|
}
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *FilesystemVersion) GetCreation() string {
|
|
|
|
if m != nil {
|
|
|
|
return m.Creation
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
|
|
|
type SendReq struct {
|
2018-08-26 14:35:18 +02:00
|
|
|
Filesystem string `protobuf:"bytes,1,opt,name=Filesystem,proto3" json:"Filesystem,omitempty"`
|
new features: {resumable,encrypted,hold-protected} send-recv, last-received-hold
- **Resumable Send & Recv Support**
No knobs required, automatically used where supported.
- **Hold-Protected Send & Recv**
Automatic ZFS holds to ensure that we can always resume a replication step.
- **Encrypted Send & Recv Support** for OpenZFS native encryption.
Configurable at the job level, i.e., for all filesystems a job is responsible for.
- **Receive-side hold on last received dataset**
The counterpart to the replication cursor bookmark on the send-side.
Ensures that incremental replication will always be possible between a sender and receiver.
Design Doc
----------
`replication/design.md` doc describes how we use ZFS holds and bookmarks to ensure that a single replication step is always resumable.
The replication algorithm described in the design doc introduces the notion of job IDs (please read the details on this design doc).
We reuse the job names for job IDs and use `JobID` type to ensure that a job name can be embedded into hold tags, bookmark names, etc.
This might BREAK CONFIG on upgrade.
Protocol Version Bump
---------------------
This commit makes backwards-incompatible changes to the replication/pdu protobufs.
Thus, bump the version number used in the protocol handshake.
Replication Cursor Format Change
--------------------------------
The new replication cursor bookmark format is: `#zrepl_CURSOR_G_${this.GUID}_J_${jobid}`
Including the GUID enables transaction-safe moving-forward of the cursor.
Including the job id enables that multiple sending jobs can send the same filesystem without interfering.
The `zrepl migrate replication-cursor:v1-v2` subcommand can be used to safely destroy old-format cursors once zrepl has created new-format cursors.
Changes in This Commit
----------------------
- package zfs
- infrastructure for holds
- infrastructure for resume token decoding
- implement a variant of OpenZFS's `entity_namecheck` and use it for validation in new code
- ZFSSendArgs to specify a ZFS send operation
- validation code protects against malicious resume tokens by checking that the token encodes the same send parameters that the send-side would use if no resume token were available (i.e. same filesystem, `fromguid`, `toguid`)
- RecvOptions support for `recv -s` flag
- convert a bunch of ZFS operations to be idempotent
- achieved through more differentiated error message scraping / additional pre-/post-checks
- package replication/pdu
- add field for encryption to send request messages
- add fields for resume handling to send & recv request messages
- receive requests now contain `FilesystemVersion To` in addition to the filesystem into which the stream should be `recv`d into
- can use `zfs recv $root_fs/$client_id/path/to/dataset@${To.Name}`, which enables additional validation after recv (i.e. whether `To.Guid` matched what we received in the stream)
- used to set `last-received-hold`
- package replication/logic
- introduce `PlannerPolicy` struct, currently only used to configure whether encrypted sends should be requested from the sender
- integrate encryption and resume token support into `Step` struct
- package endpoint
- move the concepts that endpoint builds on top of ZFS to a single file `endpoint/endpoint_zfs.go`
- step-holds + step-bookmarks
- last-received-hold
- new replication cursor + old replication cursor compat code
- adjust `endpoint/endpoint.go` handlers for
- encryption
- resumability
- new replication cursor
- last-received-hold
- client subcommand `zrepl holds list`: list all holds and hold-like bookmarks that zrepl thinks belong to it
- client subcommand `zrepl migrate replication-cursor:v1-v2`
2019-09-11 17:19:17 +02:00
|
|
|
// May be empty / null to request a full transfer of To
|
|
|
|
From *FilesystemVersion `protobuf:"bytes,2,opt,name=From,proto3" json:"From,omitempty"`
|
|
|
|
To *FilesystemVersion `protobuf:"bytes,3,opt,name=To,proto3" json:"To,omitempty"`
|
|
|
|
// If ResumeToken is not empty, the resume token that CAN be used for 'zfs
|
|
|
|
// send' by the sender. The sender MUST indicate use of ResumeToken in the
|
|
|
|
// reply message SendRes.UsedResumeToken If it does not work, the sender
|
|
|
|
// SHOULD clear the resume token on their side and use From and To instead If
|
|
|
|
// ResumeToken is not empty, the GUIDs of From and To MUST correspond to those
|
|
|
|
// encoded in the ResumeToken. Otherwise, the Sender MUST return an error.
|
2020-06-27 23:53:33 +02:00
|
|
|
ResumeToken string `protobuf:"bytes,4,opt,name=ResumeToken,proto3" json:"ResumeToken,omitempty"`
|
|
|
|
Encrypted Tri `protobuf:"varint,5,opt,name=Encrypted,proto3,enum=Tri" json:"Encrypted,omitempty"`
|
|
|
|
DryRun bool `protobuf:"varint,6,opt,name=DryRun,proto3" json:"DryRun,omitempty"`
|
|
|
|
ReplicationConfig *ReplicationConfig `protobuf:"bytes,7,opt,name=ReplicationConfig,proto3" json:"ReplicationConfig,omitempty"`
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
2018-08-26 14:35:18 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
func (m *SendReq) Reset() { *m = SendReq{} }
|
|
|
|
func (m *SendReq) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*SendReq) ProtoMessage() {}
|
|
|
|
func (*SendReq) Descriptor() ([]byte, []int) {
|
2020-06-27 23:53:33 +02:00
|
|
|
return fileDescriptor_pdu_616c27178643eca4, []int{6}
|
2018-08-26 14:35:18 +02:00
|
|
|
}
|
|
|
|
func (m *SendReq) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_SendReq.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *SendReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_SendReq.Marshal(b, m, deterministic)
|
|
|
|
}
|
2018-12-01 14:09:32 +01:00
|
|
|
func (dst *SendReq) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_SendReq.Merge(dst, src)
|
2018-08-26 14:35:18 +02:00
|
|
|
}
|
|
|
|
func (m *SendReq) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_SendReq.Size(m)
|
|
|
|
}
|
|
|
|
func (m *SendReq) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_SendReq.DiscardUnknown(m)
|
2018-06-20 20:20:37 +02:00
|
|
|
}
|
|
|
|
|
2018-08-26 14:35:18 +02:00
|
|
|
var xxx_messageInfo_SendReq proto.InternalMessageInfo
|
2018-06-20 20:20:37 +02:00
|
|
|
|
|
|
|
func (m *SendReq) GetFilesystem() string {
|
|
|
|
if m != nil {
|
|
|
|
return m.Filesystem
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
new features: {resumable,encrypted,hold-protected} send-recv, last-received-hold
- **Resumable Send & Recv Support**
No knobs required, automatically used where supported.
- **Hold-Protected Send & Recv**
Automatic ZFS holds to ensure that we can always resume a replication step.
- **Encrypted Send & Recv Support** for OpenZFS native encryption.
Configurable at the job level, i.e., for all filesystems a job is responsible for.
- **Receive-side hold on last received dataset**
The counterpart to the replication cursor bookmark on the send-side.
Ensures that incremental replication will always be possible between a sender and receiver.
Design Doc
----------
`replication/design.md` doc describes how we use ZFS holds and bookmarks to ensure that a single replication step is always resumable.
The replication algorithm described in the design doc introduces the notion of job IDs (please read the details on this design doc).
We reuse the job names for job IDs and use `JobID` type to ensure that a job name can be embedded into hold tags, bookmark names, etc.
This might BREAK CONFIG on upgrade.
Protocol Version Bump
---------------------
This commit makes backwards-incompatible changes to the replication/pdu protobufs.
Thus, bump the version number used in the protocol handshake.
Replication Cursor Format Change
--------------------------------
The new replication cursor bookmark format is: `#zrepl_CURSOR_G_${this.GUID}_J_${jobid}`
Including the GUID enables transaction-safe moving-forward of the cursor.
Including the job id enables that multiple sending jobs can send the same filesystem without interfering.
The `zrepl migrate replication-cursor:v1-v2` subcommand can be used to safely destroy old-format cursors once zrepl has created new-format cursors.
Changes in This Commit
----------------------
- package zfs
- infrastructure for holds
- infrastructure for resume token decoding
- implement a variant of OpenZFS's `entity_namecheck` and use it for validation in new code
- ZFSSendArgs to specify a ZFS send operation
- validation code protects against malicious resume tokens by checking that the token encodes the same send parameters that the send-side would use if no resume token were available (i.e. same filesystem, `fromguid`, `toguid`)
- RecvOptions support for `recv -s` flag
- convert a bunch of ZFS operations to be idempotent
- achieved through more differentiated error message scraping / additional pre-/post-checks
- package replication/pdu
- add field for encryption to send request messages
- add fields for resume handling to send & recv request messages
- receive requests now contain `FilesystemVersion To` in addition to the filesystem into which the stream should be `recv`d into
- can use `zfs recv $root_fs/$client_id/path/to/dataset@${To.Name}`, which enables additional validation after recv (i.e. whether `To.Guid` matched what we received in the stream)
- used to set `last-received-hold`
- package replication/logic
- introduce `PlannerPolicy` struct, currently only used to configure whether encrypted sends should be requested from the sender
- integrate encryption and resume token support into `Step` struct
- package endpoint
- move the concepts that endpoint builds on top of ZFS to a single file `endpoint/endpoint_zfs.go`
- step-holds + step-bookmarks
- last-received-hold
- new replication cursor + old replication cursor compat code
- adjust `endpoint/endpoint.go` handlers for
- encryption
- resumability
- new replication cursor
- last-received-hold
- client subcommand `zrepl holds list`: list all holds and hold-like bookmarks that zrepl thinks belong to it
- client subcommand `zrepl migrate replication-cursor:v1-v2`
2019-09-11 17:19:17 +02:00
|
|
|
func (m *SendReq) GetFrom() *FilesystemVersion {
|
2018-06-20 20:20:37 +02:00
|
|
|
if m != nil {
|
|
|
|
return m.From
|
|
|
|
}
|
new features: {resumable,encrypted,hold-protected} send-recv, last-received-hold
- **Resumable Send & Recv Support**
No knobs required, automatically used where supported.
- **Hold-Protected Send & Recv**
Automatic ZFS holds to ensure that we can always resume a replication step.
- **Encrypted Send & Recv Support** for OpenZFS native encryption.
Configurable at the job level, i.e., for all filesystems a job is responsible for.
- **Receive-side hold on last received dataset**
The counterpart to the replication cursor bookmark on the send-side.
Ensures that incremental replication will always be possible between a sender and receiver.
Design Doc
----------
`replication/design.md` doc describes how we use ZFS holds and bookmarks to ensure that a single replication step is always resumable.
The replication algorithm described in the design doc introduces the notion of job IDs (please read the details on this design doc).
We reuse the job names for job IDs and use `JobID` type to ensure that a job name can be embedded into hold tags, bookmark names, etc.
This might BREAK CONFIG on upgrade.
Protocol Version Bump
---------------------
This commit makes backwards-incompatible changes to the replication/pdu protobufs.
Thus, bump the version number used in the protocol handshake.
Replication Cursor Format Change
--------------------------------
The new replication cursor bookmark format is: `#zrepl_CURSOR_G_${this.GUID}_J_${jobid}`
Including the GUID enables transaction-safe moving-forward of the cursor.
Including the job id enables that multiple sending jobs can send the same filesystem without interfering.
The `zrepl migrate replication-cursor:v1-v2` subcommand can be used to safely destroy old-format cursors once zrepl has created new-format cursors.
Changes in This Commit
----------------------
- package zfs
- infrastructure for holds
- infrastructure for resume token decoding
- implement a variant of OpenZFS's `entity_namecheck` and use it for validation in new code
- ZFSSendArgs to specify a ZFS send operation
- validation code protects against malicious resume tokens by checking that the token encodes the same send parameters that the send-side would use if no resume token were available (i.e. same filesystem, `fromguid`, `toguid`)
- RecvOptions support for `recv -s` flag
- convert a bunch of ZFS operations to be idempotent
- achieved through more differentiated error message scraping / additional pre-/post-checks
- package replication/pdu
- add field for encryption to send request messages
- add fields for resume handling to send & recv request messages
- receive requests now contain `FilesystemVersion To` in addition to the filesystem into which the stream should be `recv`d into
- can use `zfs recv $root_fs/$client_id/path/to/dataset@${To.Name}`, which enables additional validation after recv (i.e. whether `To.Guid` matched what we received in the stream)
- used to set `last-received-hold`
- package replication/logic
- introduce `PlannerPolicy` struct, currently only used to configure whether encrypted sends should be requested from the sender
- integrate encryption and resume token support into `Step` struct
- package endpoint
- move the concepts that endpoint builds on top of ZFS to a single file `endpoint/endpoint_zfs.go`
- step-holds + step-bookmarks
- last-received-hold
- new replication cursor + old replication cursor compat code
- adjust `endpoint/endpoint.go` handlers for
- encryption
- resumability
- new replication cursor
- last-received-hold
- client subcommand `zrepl holds list`: list all holds and hold-like bookmarks that zrepl thinks belong to it
- client subcommand `zrepl migrate replication-cursor:v1-v2`
2019-09-11 17:19:17 +02:00
|
|
|
return nil
|
2018-06-20 20:20:37 +02:00
|
|
|
}
|
|
|
|
|
new features: {resumable,encrypted,hold-protected} send-recv, last-received-hold
- **Resumable Send & Recv Support**
No knobs required, automatically used where supported.
- **Hold-Protected Send & Recv**
Automatic ZFS holds to ensure that we can always resume a replication step.
- **Encrypted Send & Recv Support** for OpenZFS native encryption.
Configurable at the job level, i.e., for all filesystems a job is responsible for.
- **Receive-side hold on last received dataset**
The counterpart to the replication cursor bookmark on the send-side.
Ensures that incremental replication will always be possible between a sender and receiver.
Design Doc
----------
`replication/design.md` doc describes how we use ZFS holds and bookmarks to ensure that a single replication step is always resumable.
The replication algorithm described in the design doc introduces the notion of job IDs (please read the details on this design doc).
We reuse the job names for job IDs and use `JobID` type to ensure that a job name can be embedded into hold tags, bookmark names, etc.
This might BREAK CONFIG on upgrade.
Protocol Version Bump
---------------------
This commit makes backwards-incompatible changes to the replication/pdu protobufs.
Thus, bump the version number used in the protocol handshake.
Replication Cursor Format Change
--------------------------------
The new replication cursor bookmark format is: `#zrepl_CURSOR_G_${this.GUID}_J_${jobid}`
Including the GUID enables transaction-safe moving-forward of the cursor.
Including the job id enables that multiple sending jobs can send the same filesystem without interfering.
The `zrepl migrate replication-cursor:v1-v2` subcommand can be used to safely destroy old-format cursors once zrepl has created new-format cursors.
Changes in This Commit
----------------------
- package zfs
- infrastructure for holds
- infrastructure for resume token decoding
- implement a variant of OpenZFS's `entity_namecheck` and use it for validation in new code
- ZFSSendArgs to specify a ZFS send operation
- validation code protects against malicious resume tokens by checking that the token encodes the same send parameters that the send-side would use if no resume token were available (i.e. same filesystem, `fromguid`, `toguid`)
- RecvOptions support for `recv -s` flag
- convert a bunch of ZFS operations to be idempotent
- achieved through more differentiated error message scraping / additional pre-/post-checks
- package replication/pdu
- add field for encryption to send request messages
- add fields for resume handling to send & recv request messages
- receive requests now contain `FilesystemVersion To` in addition to the filesystem into which the stream should be `recv`d into
- can use `zfs recv $root_fs/$client_id/path/to/dataset@${To.Name}`, which enables additional validation after recv (i.e. whether `To.Guid` matched what we received in the stream)
- used to set `last-received-hold`
- package replication/logic
- introduce `PlannerPolicy` struct, currently only used to configure whether encrypted sends should be requested from the sender
- integrate encryption and resume token support into `Step` struct
- package endpoint
- move the concepts that endpoint builds on top of ZFS to a single file `endpoint/endpoint_zfs.go`
- step-holds + step-bookmarks
- last-received-hold
- new replication cursor + old replication cursor compat code
- adjust `endpoint/endpoint.go` handlers for
- encryption
- resumability
- new replication cursor
- last-received-hold
- client subcommand `zrepl holds list`: list all holds and hold-like bookmarks that zrepl thinks belong to it
- client subcommand `zrepl migrate replication-cursor:v1-v2`
2019-09-11 17:19:17 +02:00
|
|
|
func (m *SendReq) GetTo() *FilesystemVersion {
|
2018-06-20 20:20:37 +02:00
|
|
|
if m != nil {
|
|
|
|
return m.To
|
|
|
|
}
|
new features: {resumable,encrypted,hold-protected} send-recv, last-received-hold
- **Resumable Send & Recv Support**
No knobs required, automatically used where supported.
- **Hold-Protected Send & Recv**
Automatic ZFS holds to ensure that we can always resume a replication step.
- **Encrypted Send & Recv Support** for OpenZFS native encryption.
Configurable at the job level, i.e., for all filesystems a job is responsible for.
- **Receive-side hold on last received dataset**
The counterpart to the replication cursor bookmark on the send-side.
Ensures that incremental replication will always be possible between a sender and receiver.
Design Doc
----------
`replication/design.md` doc describes how we use ZFS holds and bookmarks to ensure that a single replication step is always resumable.
The replication algorithm described in the design doc introduces the notion of job IDs (please read the details on this design doc).
We reuse the job names for job IDs and use `JobID` type to ensure that a job name can be embedded into hold tags, bookmark names, etc.
This might BREAK CONFIG on upgrade.
Protocol Version Bump
---------------------
This commit makes backwards-incompatible changes to the replication/pdu protobufs.
Thus, bump the version number used in the protocol handshake.
Replication Cursor Format Change
--------------------------------
The new replication cursor bookmark format is: `#zrepl_CURSOR_G_${this.GUID}_J_${jobid}`
Including the GUID enables transaction-safe moving-forward of the cursor.
Including the job id enables that multiple sending jobs can send the same filesystem without interfering.
The `zrepl migrate replication-cursor:v1-v2` subcommand can be used to safely destroy old-format cursors once zrepl has created new-format cursors.
Changes in This Commit
----------------------
- package zfs
- infrastructure for holds
- infrastructure for resume token decoding
- implement a variant of OpenZFS's `entity_namecheck` and use it for validation in new code
- ZFSSendArgs to specify a ZFS send operation
- validation code protects against malicious resume tokens by checking that the token encodes the same send parameters that the send-side would use if no resume token were available (i.e. same filesystem, `fromguid`, `toguid`)
- RecvOptions support for `recv -s` flag
- convert a bunch of ZFS operations to be idempotent
- achieved through more differentiated error message scraping / additional pre-/post-checks
- package replication/pdu
- add field for encryption to send request messages
- add fields for resume handling to send & recv request messages
- receive requests now contain `FilesystemVersion To` in addition to the filesystem into which the stream should be `recv`d into
- can use `zfs recv $root_fs/$client_id/path/to/dataset@${To.Name}`, which enables additional validation after recv (i.e. whether `To.Guid` matched what we received in the stream)
- used to set `last-received-hold`
- package replication/logic
- introduce `PlannerPolicy` struct, currently only used to configure whether encrypted sends should be requested from the sender
- integrate encryption and resume token support into `Step` struct
- package endpoint
- move the concepts that endpoint builds on top of ZFS to a single file `endpoint/endpoint_zfs.go`
- step-holds + step-bookmarks
- last-received-hold
- new replication cursor + old replication cursor compat code
- adjust `endpoint/endpoint.go` handlers for
- encryption
- resumability
- new replication cursor
- last-received-hold
- client subcommand `zrepl holds list`: list all holds and hold-like bookmarks that zrepl thinks belong to it
- client subcommand `zrepl migrate replication-cursor:v1-v2`
2019-09-11 17:19:17 +02:00
|
|
|
return nil
|
2018-06-20 20:20:37 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
func (m *SendReq) GetResumeToken() string {
|
|
|
|
if m != nil {
|
|
|
|
return m.ResumeToken
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
new features: {resumable,encrypted,hold-protected} send-recv, last-received-hold
- **Resumable Send & Recv Support**
No knobs required, automatically used where supported.
- **Hold-Protected Send & Recv**
Automatic ZFS holds to ensure that we can always resume a replication step.
- **Encrypted Send & Recv Support** for OpenZFS native encryption.
Configurable at the job level, i.e., for all filesystems a job is responsible for.
- **Receive-side hold on last received dataset**
The counterpart to the replication cursor bookmark on the send-side.
Ensures that incremental replication will always be possible between a sender and receiver.
Design Doc
----------
`replication/design.md` doc describes how we use ZFS holds and bookmarks to ensure that a single replication step is always resumable.
The replication algorithm described in the design doc introduces the notion of job IDs (please read the details on this design doc).
We reuse the job names for job IDs and use `JobID` type to ensure that a job name can be embedded into hold tags, bookmark names, etc.
This might BREAK CONFIG on upgrade.
Protocol Version Bump
---------------------
This commit makes backwards-incompatible changes to the replication/pdu protobufs.
Thus, bump the version number used in the protocol handshake.
Replication Cursor Format Change
--------------------------------
The new replication cursor bookmark format is: `#zrepl_CURSOR_G_${this.GUID}_J_${jobid}`
Including the GUID enables transaction-safe moving-forward of the cursor.
Including the job id enables that multiple sending jobs can send the same filesystem without interfering.
The `zrepl migrate replication-cursor:v1-v2` subcommand can be used to safely destroy old-format cursors once zrepl has created new-format cursors.
Changes in This Commit
----------------------
- package zfs
- infrastructure for holds
- infrastructure for resume token decoding
- implement a variant of OpenZFS's `entity_namecheck` and use it for validation in new code
- ZFSSendArgs to specify a ZFS send operation
- validation code protects against malicious resume tokens by checking that the token encodes the same send parameters that the send-side would use if no resume token were available (i.e. same filesystem, `fromguid`, `toguid`)
- RecvOptions support for `recv -s` flag
- convert a bunch of ZFS operations to be idempotent
- achieved through more differentiated error message scraping / additional pre-/post-checks
- package replication/pdu
- add field for encryption to send request messages
- add fields for resume handling to send & recv request messages
- receive requests now contain `FilesystemVersion To` in addition to the filesystem into which the stream should be `recv`d into
- can use `zfs recv $root_fs/$client_id/path/to/dataset@${To.Name}`, which enables additional validation after recv (i.e. whether `To.Guid` matched what we received in the stream)
- used to set `last-received-hold`
- package replication/logic
- introduce `PlannerPolicy` struct, currently only used to configure whether encrypted sends should be requested from the sender
- integrate encryption and resume token support into `Step` struct
- package endpoint
- move the concepts that endpoint builds on top of ZFS to a single file `endpoint/endpoint_zfs.go`
- step-holds + step-bookmarks
- last-received-hold
- new replication cursor + old replication cursor compat code
- adjust `endpoint/endpoint.go` handlers for
- encryption
- resumability
- new replication cursor
- last-received-hold
- client subcommand `zrepl holds list`: list all holds and hold-like bookmarks that zrepl thinks belong to it
- client subcommand `zrepl migrate replication-cursor:v1-v2`
2019-09-11 17:19:17 +02:00
|
|
|
func (m *SendReq) GetEncrypted() Tri {
|
2018-06-20 20:20:37 +02:00
|
|
|
if m != nil {
|
new features: {resumable,encrypted,hold-protected} send-recv, last-received-hold
- **Resumable Send & Recv Support**
No knobs required, automatically used where supported.
- **Hold-Protected Send & Recv**
Automatic ZFS holds to ensure that we can always resume a replication step.
- **Encrypted Send & Recv Support** for OpenZFS native encryption.
Configurable at the job level, i.e., for all filesystems a job is responsible for.
- **Receive-side hold on last received dataset**
The counterpart to the replication cursor bookmark on the send-side.
Ensures that incremental replication will always be possible between a sender and receiver.
Design Doc
----------
`replication/design.md` doc describes how we use ZFS holds and bookmarks to ensure that a single replication step is always resumable.
The replication algorithm described in the design doc introduces the notion of job IDs (please read the details on this design doc).
We reuse the job names for job IDs and use `JobID` type to ensure that a job name can be embedded into hold tags, bookmark names, etc.
This might BREAK CONFIG on upgrade.
Protocol Version Bump
---------------------
This commit makes backwards-incompatible changes to the replication/pdu protobufs.
Thus, bump the version number used in the protocol handshake.
Replication Cursor Format Change
--------------------------------
The new replication cursor bookmark format is: `#zrepl_CURSOR_G_${this.GUID}_J_${jobid}`
Including the GUID enables transaction-safe moving-forward of the cursor.
Including the job id enables that multiple sending jobs can send the same filesystem without interfering.
The `zrepl migrate replication-cursor:v1-v2` subcommand can be used to safely destroy old-format cursors once zrepl has created new-format cursors.
Changes in This Commit
----------------------
- package zfs
- infrastructure for holds
- infrastructure for resume token decoding
- implement a variant of OpenZFS's `entity_namecheck` and use it for validation in new code
- ZFSSendArgs to specify a ZFS send operation
- validation code protects against malicious resume tokens by checking that the token encodes the same send parameters that the send-side would use if no resume token were available (i.e. same filesystem, `fromguid`, `toguid`)
- RecvOptions support for `recv -s` flag
- convert a bunch of ZFS operations to be idempotent
- achieved through more differentiated error message scraping / additional pre-/post-checks
- package replication/pdu
- add field for encryption to send request messages
- add fields for resume handling to send & recv request messages
- receive requests now contain `FilesystemVersion To` in addition to the filesystem into which the stream should be `recv`d into
- can use `zfs recv $root_fs/$client_id/path/to/dataset@${To.Name}`, which enables additional validation after recv (i.e. whether `To.Guid` matched what we received in the stream)
- used to set `last-received-hold`
- package replication/logic
- introduce `PlannerPolicy` struct, currently only used to configure whether encrypted sends should be requested from the sender
- integrate encryption and resume token support into `Step` struct
- package endpoint
- move the concepts that endpoint builds on top of ZFS to a single file `endpoint/endpoint_zfs.go`
- step-holds + step-bookmarks
- last-received-hold
- new replication cursor + old replication cursor compat code
- adjust `endpoint/endpoint.go` handlers for
- encryption
- resumability
- new replication cursor
- last-received-hold
- client subcommand `zrepl holds list`: list all holds and hold-like bookmarks that zrepl thinks belong to it
- client subcommand `zrepl migrate replication-cursor:v1-v2`
2019-09-11 17:19:17 +02:00
|
|
|
return m.Encrypted
|
2018-06-20 20:20:37 +02:00
|
|
|
}
|
new features: {resumable,encrypted,hold-protected} send-recv, last-received-hold
- **Resumable Send & Recv Support**
No knobs required, automatically used where supported.
- **Hold-Protected Send & Recv**
Automatic ZFS holds to ensure that we can always resume a replication step.
- **Encrypted Send & Recv Support** for OpenZFS native encryption.
Configurable at the job level, i.e., for all filesystems a job is responsible for.
- **Receive-side hold on last received dataset**
The counterpart to the replication cursor bookmark on the send-side.
Ensures that incremental replication will always be possible between a sender and receiver.
Design Doc
----------
`replication/design.md` doc describes how we use ZFS holds and bookmarks to ensure that a single replication step is always resumable.
The replication algorithm described in the design doc introduces the notion of job IDs (please read the details on this design doc).
We reuse the job names for job IDs and use `JobID` type to ensure that a job name can be embedded into hold tags, bookmark names, etc.
This might BREAK CONFIG on upgrade.
Protocol Version Bump
---------------------
This commit makes backwards-incompatible changes to the replication/pdu protobufs.
Thus, bump the version number used in the protocol handshake.
Replication Cursor Format Change
--------------------------------
The new replication cursor bookmark format is: `#zrepl_CURSOR_G_${this.GUID}_J_${jobid}`
Including the GUID enables transaction-safe moving-forward of the cursor.
Including the job id enables that multiple sending jobs can send the same filesystem without interfering.
The `zrepl migrate replication-cursor:v1-v2` subcommand can be used to safely destroy old-format cursors once zrepl has created new-format cursors.
Changes in This Commit
----------------------
- package zfs
- infrastructure for holds
- infrastructure for resume token decoding
- implement a variant of OpenZFS's `entity_namecheck` and use it for validation in new code
- ZFSSendArgs to specify a ZFS send operation
- validation code protects against malicious resume tokens by checking that the token encodes the same send parameters that the send-side would use if no resume token were available (i.e. same filesystem, `fromguid`, `toguid`)
- RecvOptions support for `recv -s` flag
- convert a bunch of ZFS operations to be idempotent
- achieved through more differentiated error message scraping / additional pre-/post-checks
- package replication/pdu
- add field for encryption to send request messages
- add fields for resume handling to send & recv request messages
- receive requests now contain `FilesystemVersion To` in addition to the filesystem into which the stream should be `recv`d into
- can use `zfs recv $root_fs/$client_id/path/to/dataset@${To.Name}`, which enables additional validation after recv (i.e. whether `To.Guid` matched what we received in the stream)
- used to set `last-received-hold`
- package replication/logic
- introduce `PlannerPolicy` struct, currently only used to configure whether encrypted sends should be requested from the sender
- integrate encryption and resume token support into `Step` struct
- package endpoint
- move the concepts that endpoint builds on top of ZFS to a single file `endpoint/endpoint_zfs.go`
- step-holds + step-bookmarks
- last-received-hold
- new replication cursor + old replication cursor compat code
- adjust `endpoint/endpoint.go` handlers for
- encryption
- resumability
- new replication cursor
- last-received-hold
- client subcommand `zrepl holds list`: list all holds and hold-like bookmarks that zrepl thinks belong to it
- client subcommand `zrepl migrate replication-cursor:v1-v2`
2019-09-11 17:19:17 +02:00
|
|
|
return Tri_DontCare
|
2018-06-20 20:20:37 +02:00
|
|
|
}
|
|
|
|
|
2018-08-30 12:52:08 +02:00
|
|
|
func (m *SendReq) GetDryRun() bool {
|
|
|
|
if m != nil {
|
|
|
|
return m.DryRun
|
|
|
|
}
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
|
2020-06-27 23:53:33 +02:00
|
|
|
func (m *SendReq) GetReplicationConfig() *ReplicationConfig {
|
|
|
|
if m != nil {
|
|
|
|
return m.ReplicationConfig
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
type ReplicationConfig struct {
|
|
|
|
Protection *ReplicationConfigProtection `protobuf:"bytes,1,opt,name=protection,proto3" json:"protection,omitempty"`
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *ReplicationConfig) Reset() { *m = ReplicationConfig{} }
|
|
|
|
func (m *ReplicationConfig) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*ReplicationConfig) ProtoMessage() {}
|
|
|
|
func (*ReplicationConfig) Descriptor() ([]byte, []int) {
|
|
|
|
return fileDescriptor_pdu_616c27178643eca4, []int{7}
|
|
|
|
}
|
|
|
|
func (m *ReplicationConfig) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_ReplicationConfig.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *ReplicationConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_ReplicationConfig.Marshal(b, m, deterministic)
|
|
|
|
}
|
|
|
|
func (dst *ReplicationConfig) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_ReplicationConfig.Merge(dst, src)
|
|
|
|
}
|
|
|
|
func (m *ReplicationConfig) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_ReplicationConfig.Size(m)
|
|
|
|
}
|
|
|
|
func (m *ReplicationConfig) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_ReplicationConfig.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_ReplicationConfig proto.InternalMessageInfo
|
|
|
|
|
|
|
|
func (m *ReplicationConfig) GetProtection() *ReplicationConfigProtection {
|
|
|
|
if m != nil {
|
|
|
|
return m.Protection
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
type ReplicationConfigProtection struct {
|
|
|
|
Initial ReplicationGuaranteeKind `protobuf:"varint,1,opt,name=Initial,proto3,enum=ReplicationGuaranteeKind" json:"Initial,omitempty"`
|
|
|
|
Incremental ReplicationGuaranteeKind `protobuf:"varint,2,opt,name=Incremental,proto3,enum=ReplicationGuaranteeKind" json:"Incremental,omitempty"`
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *ReplicationConfigProtection) Reset() { *m = ReplicationConfigProtection{} }
|
|
|
|
func (m *ReplicationConfigProtection) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*ReplicationConfigProtection) ProtoMessage() {}
|
|
|
|
func (*ReplicationConfigProtection) Descriptor() ([]byte, []int) {
|
|
|
|
return fileDescriptor_pdu_616c27178643eca4, []int{8}
|
|
|
|
}
|
|
|
|
func (m *ReplicationConfigProtection) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_ReplicationConfigProtection.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *ReplicationConfigProtection) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_ReplicationConfigProtection.Marshal(b, m, deterministic)
|
|
|
|
}
|
|
|
|
func (dst *ReplicationConfigProtection) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_ReplicationConfigProtection.Merge(dst, src)
|
|
|
|
}
|
|
|
|
func (m *ReplicationConfigProtection) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_ReplicationConfigProtection.Size(m)
|
|
|
|
}
|
|
|
|
func (m *ReplicationConfigProtection) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_ReplicationConfigProtection.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_ReplicationConfigProtection proto.InternalMessageInfo
|
|
|
|
|
|
|
|
func (m *ReplicationConfigProtection) GetInitial() ReplicationGuaranteeKind {
|
|
|
|
if m != nil {
|
|
|
|
return m.Initial
|
|
|
|
}
|
|
|
|
return ReplicationGuaranteeKind_GuaranteeInvalid
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *ReplicationConfigProtection) GetIncremental() ReplicationGuaranteeKind {
|
|
|
|
if m != nil {
|
|
|
|
return m.Incremental
|
|
|
|
}
|
|
|
|
return ReplicationGuaranteeKind_GuaranteeInvalid
|
|
|
|
}
|
|
|
|
|
2018-06-20 20:20:37 +02:00
|
|
|
type Property struct {
|
2018-08-26 14:35:18 +02:00
|
|
|
Name string `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"`
|
|
|
|
Value string `protobuf:"bytes,2,opt,name=Value,proto3" json:"Value,omitempty"`
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
2018-06-20 20:20:37 +02:00
|
|
|
}
|
|
|
|
|
2018-08-26 14:35:18 +02:00
|
|
|
func (m *Property) Reset() { *m = Property{} }
|
|
|
|
func (m *Property) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*Property) ProtoMessage() {}
|
|
|
|
func (*Property) Descriptor() ([]byte, []int) {
|
2020-06-27 23:53:33 +02:00
|
|
|
return fileDescriptor_pdu_616c27178643eca4, []int{9}
|
2018-08-26 14:35:18 +02:00
|
|
|
}
|
|
|
|
func (m *Property) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_Property.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *Property) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_Property.Marshal(b, m, deterministic)
|
|
|
|
}
|
2018-12-01 14:09:32 +01:00
|
|
|
func (dst *Property) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_Property.Merge(dst, src)
|
2018-08-26 14:35:18 +02:00
|
|
|
}
|
|
|
|
func (m *Property) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_Property.Size(m)
|
|
|
|
}
|
|
|
|
func (m *Property) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_Property.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_Property proto.InternalMessageInfo
|
2018-06-20 20:20:37 +02:00
|
|
|
|
|
|
|
func (m *Property) GetName() string {
|
|
|
|
if m != nil {
|
|
|
|
return m.Name
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Property) GetValue() string {
|
|
|
|
if m != nil {
|
|
|
|
return m.Value
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
|
|
|
type SendRes struct {
|
|
|
|
// Whether the resume token provided in the request has been used or not.
|
new features: {resumable,encrypted,hold-protected} send-recv, last-received-hold
- **Resumable Send & Recv Support**
No knobs required, automatically used where supported.
- **Hold-Protected Send & Recv**
Automatic ZFS holds to ensure that we can always resume a replication step.
- **Encrypted Send & Recv Support** for OpenZFS native encryption.
Configurable at the job level, i.e., for all filesystems a job is responsible for.
- **Receive-side hold on last received dataset**
The counterpart to the replication cursor bookmark on the send-side.
Ensures that incremental replication will always be possible between a sender and receiver.
Design Doc
----------
`replication/design.md` doc describes how we use ZFS holds and bookmarks to ensure that a single replication step is always resumable.
The replication algorithm described in the design doc introduces the notion of job IDs (please read the details on this design doc).
We reuse the job names for job IDs and use `JobID` type to ensure that a job name can be embedded into hold tags, bookmark names, etc.
This might BREAK CONFIG on upgrade.
Protocol Version Bump
---------------------
This commit makes backwards-incompatible changes to the replication/pdu protobufs.
Thus, bump the version number used in the protocol handshake.
Replication Cursor Format Change
--------------------------------
The new replication cursor bookmark format is: `#zrepl_CURSOR_G_${this.GUID}_J_${jobid}`
Including the GUID enables transaction-safe moving-forward of the cursor.
Including the job id enables that multiple sending jobs can send the same filesystem without interfering.
The `zrepl migrate replication-cursor:v1-v2` subcommand can be used to safely destroy old-format cursors once zrepl has created new-format cursors.
Changes in This Commit
----------------------
- package zfs
- infrastructure for holds
- infrastructure for resume token decoding
- implement a variant of OpenZFS's `entity_namecheck` and use it for validation in new code
- ZFSSendArgs to specify a ZFS send operation
- validation code protects against malicious resume tokens by checking that the token encodes the same send parameters that the send-side would use if no resume token were available (i.e. same filesystem, `fromguid`, `toguid`)
- RecvOptions support for `recv -s` flag
- convert a bunch of ZFS operations to be idempotent
- achieved through more differentiated error message scraping / additional pre-/post-checks
- package replication/pdu
- add field for encryption to send request messages
- add fields for resume handling to send & recv request messages
- receive requests now contain `FilesystemVersion To` in addition to the filesystem into which the stream should be `recv`d into
- can use `zfs recv $root_fs/$client_id/path/to/dataset@${To.Name}`, which enables additional validation after recv (i.e. whether `To.Guid` matched what we received in the stream)
- used to set `last-received-hold`
- package replication/logic
- introduce `PlannerPolicy` struct, currently only used to configure whether encrypted sends should be requested from the sender
- integrate encryption and resume token support into `Step` struct
- package endpoint
- move the concepts that endpoint builds on top of ZFS to a single file `endpoint/endpoint_zfs.go`
- step-holds + step-bookmarks
- last-received-hold
- new replication cursor + old replication cursor compat code
- adjust `endpoint/endpoint.go` handlers for
- encryption
- resumability
- new replication cursor
- last-received-hold
- client subcommand `zrepl holds list`: list all holds and hold-like bookmarks that zrepl thinks belong to it
- client subcommand `zrepl migrate replication-cursor:v1-v2`
2019-09-11 17:19:17 +02:00
|
|
|
// If the SendReq.ResumeToken == "", this field has no meaning.
|
2018-12-11 22:01:50 +01:00
|
|
|
UsedResumeToken bool `protobuf:"varint,2,opt,name=UsedResumeToken,proto3" json:"UsedResumeToken,omitempty"`
|
2018-09-06 02:41:25 +02:00
|
|
|
// Expected stream size determined by dry run, not exact.
|
|
|
|
// 0 indicates that for the given SendReq, no size estimate could be made.
|
2018-12-11 22:01:50 +01:00
|
|
|
ExpectedSize int64 `protobuf:"varint,3,opt,name=ExpectedSize,proto3" json:"ExpectedSize,omitempty"`
|
|
|
|
Properties []*Property `protobuf:"bytes,4,rep,name=Properties,proto3" json:"Properties,omitempty"`
|
2018-08-26 14:35:18 +02:00
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *SendRes) Reset() { *m = SendRes{} }
|
|
|
|
func (m *SendRes) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*SendRes) ProtoMessage() {}
|
|
|
|
func (*SendRes) Descriptor() ([]byte, []int) {
|
2020-06-27 23:53:33 +02:00
|
|
|
return fileDescriptor_pdu_616c27178643eca4, []int{10}
|
2018-08-26 14:35:18 +02:00
|
|
|
}
|
|
|
|
func (m *SendRes) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_SendRes.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *SendRes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_SendRes.Marshal(b, m, deterministic)
|
|
|
|
}
|
2018-12-01 14:09:32 +01:00
|
|
|
func (dst *SendRes) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_SendRes.Merge(dst, src)
|
2018-08-26 14:35:18 +02:00
|
|
|
}
|
|
|
|
func (m *SendRes) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_SendRes.Size(m)
|
|
|
|
}
|
|
|
|
func (m *SendRes) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_SendRes.DiscardUnknown(m)
|
2018-06-20 20:20:37 +02:00
|
|
|
}
|
|
|
|
|
2018-08-26 14:35:18 +02:00
|
|
|
var xxx_messageInfo_SendRes proto.InternalMessageInfo
|
2018-06-20 20:20:37 +02:00
|
|
|
|
|
|
|
func (m *SendRes) GetUsedResumeToken() bool {
|
|
|
|
if m != nil {
|
|
|
|
return m.UsedResumeToken
|
|
|
|
}
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
|
2018-08-29 23:29:45 +02:00
|
|
|
func (m *SendRes) GetExpectedSize() int64 {
|
|
|
|
if m != nil {
|
|
|
|
return m.ExpectedSize
|
|
|
|
}
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
2018-06-20 20:20:37 +02:00
|
|
|
func (m *SendRes) GetProperties() []*Property {
|
|
|
|
if m != nil {
|
|
|
|
return m.Properties
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
new features: {resumable,encrypted,hold-protected} send-recv, last-received-hold
- **Resumable Send & Recv Support**
No knobs required, automatically used where supported.
- **Hold-Protected Send & Recv**
Automatic ZFS holds to ensure that we can always resume a replication step.
- **Encrypted Send & Recv Support** for OpenZFS native encryption.
Configurable at the job level, i.e., for all filesystems a job is responsible for.
- **Receive-side hold on last received dataset**
The counterpart to the replication cursor bookmark on the send-side.
Ensures that incremental replication will always be possible between a sender and receiver.
Design Doc
----------
`replication/design.md` doc describes how we use ZFS holds and bookmarks to ensure that a single replication step is always resumable.
The replication algorithm described in the design doc introduces the notion of job IDs (please read the details on this design doc).
We reuse the job names for job IDs and use `JobID` type to ensure that a job name can be embedded into hold tags, bookmark names, etc.
This might BREAK CONFIG on upgrade.
Protocol Version Bump
---------------------
This commit makes backwards-incompatible changes to the replication/pdu protobufs.
Thus, bump the version number used in the protocol handshake.
Replication Cursor Format Change
--------------------------------
The new replication cursor bookmark format is: `#zrepl_CURSOR_G_${this.GUID}_J_${jobid}`
Including the GUID enables transaction-safe moving-forward of the cursor.
Including the job id enables that multiple sending jobs can send the same filesystem without interfering.
The `zrepl migrate replication-cursor:v1-v2` subcommand can be used to safely destroy old-format cursors once zrepl has created new-format cursors.
Changes in This Commit
----------------------
- package zfs
- infrastructure for holds
- infrastructure for resume token decoding
- implement a variant of OpenZFS's `entity_namecheck` and use it for validation in new code
- ZFSSendArgs to specify a ZFS send operation
- validation code protects against malicious resume tokens by checking that the token encodes the same send parameters that the send-side would use if no resume token were available (i.e. same filesystem, `fromguid`, `toguid`)
- RecvOptions support for `recv -s` flag
- convert a bunch of ZFS operations to be idempotent
- achieved through more differentiated error message scraping / additional pre-/post-checks
- package replication/pdu
- add field for encryption to send request messages
- add fields for resume handling to send & recv request messages
- receive requests now contain `FilesystemVersion To` in addition to the filesystem into which the stream should be `recv`d into
- can use `zfs recv $root_fs/$client_id/path/to/dataset@${To.Name}`, which enables additional validation after recv (i.e. whether `To.Guid` matched what we received in the stream)
- used to set `last-received-hold`
- package replication/logic
- introduce `PlannerPolicy` struct, currently only used to configure whether encrypted sends should be requested from the sender
- integrate encryption and resume token support into `Step` struct
- package endpoint
- move the concepts that endpoint builds on top of ZFS to a single file `endpoint/endpoint_zfs.go`
- step-holds + step-bookmarks
- last-received-hold
- new replication cursor + old replication cursor compat code
- adjust `endpoint/endpoint.go` handlers for
- encryption
- resumability
- new replication cursor
- last-received-hold
- client subcommand `zrepl holds list`: list all holds and hold-like bookmarks that zrepl thinks belong to it
- client subcommand `zrepl migrate replication-cursor:v1-v2`
2019-09-11 17:19:17 +02:00
|
|
|
type SendCompletedReq struct {
|
|
|
|
OriginalReq *SendReq `protobuf:"bytes,2,opt,name=OriginalReq,proto3" json:"OriginalReq,omitempty"`
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *SendCompletedReq) Reset() { *m = SendCompletedReq{} }
|
|
|
|
func (m *SendCompletedReq) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*SendCompletedReq) ProtoMessage() {}
|
|
|
|
func (*SendCompletedReq) Descriptor() ([]byte, []int) {
|
2020-06-27 23:53:33 +02:00
|
|
|
return fileDescriptor_pdu_616c27178643eca4, []int{11}
|
new features: {resumable,encrypted,hold-protected} send-recv, last-received-hold
- **Resumable Send & Recv Support**
No knobs required, automatically used where supported.
- **Hold-Protected Send & Recv**
Automatic ZFS holds to ensure that we can always resume a replication step.
- **Encrypted Send & Recv Support** for OpenZFS native encryption.
Configurable at the job level, i.e., for all filesystems a job is responsible for.
- **Receive-side hold on last received dataset**
The counterpart to the replication cursor bookmark on the send-side.
Ensures that incremental replication will always be possible between a sender and receiver.
Design Doc
----------
`replication/design.md` doc describes how we use ZFS holds and bookmarks to ensure that a single replication step is always resumable.
The replication algorithm described in the design doc introduces the notion of job IDs (please read the details on this design doc).
We reuse the job names for job IDs and use `JobID` type to ensure that a job name can be embedded into hold tags, bookmark names, etc.
This might BREAK CONFIG on upgrade.
Protocol Version Bump
---------------------
This commit makes backwards-incompatible changes to the replication/pdu protobufs.
Thus, bump the version number used in the protocol handshake.
Replication Cursor Format Change
--------------------------------
The new replication cursor bookmark format is: `#zrepl_CURSOR_G_${this.GUID}_J_${jobid}`
Including the GUID enables transaction-safe moving-forward of the cursor.
Including the job id enables that multiple sending jobs can send the same filesystem without interfering.
The `zrepl migrate replication-cursor:v1-v2` subcommand can be used to safely destroy old-format cursors once zrepl has created new-format cursors.
Changes in This Commit
----------------------
- package zfs
- infrastructure for holds
- infrastructure for resume token decoding
- implement a variant of OpenZFS's `entity_namecheck` and use it for validation in new code
- ZFSSendArgs to specify a ZFS send operation
- validation code protects against malicious resume tokens by checking that the token encodes the same send parameters that the send-side would use if no resume token were available (i.e. same filesystem, `fromguid`, `toguid`)
- RecvOptions support for `recv -s` flag
- convert a bunch of ZFS operations to be idempotent
- achieved through more differentiated error message scraping / additional pre-/post-checks
- package replication/pdu
- add field for encryption to send request messages
- add fields for resume handling to send & recv request messages
- receive requests now contain `FilesystemVersion To` in addition to the filesystem into which the stream should be `recv`d into
- can use `zfs recv $root_fs/$client_id/path/to/dataset@${To.Name}`, which enables additional validation after recv (i.e. whether `To.Guid` matched what we received in the stream)
- used to set `last-received-hold`
- package replication/logic
- introduce `PlannerPolicy` struct, currently only used to configure whether encrypted sends should be requested from the sender
- integrate encryption and resume token support into `Step` struct
- package endpoint
- move the concepts that endpoint builds on top of ZFS to a single file `endpoint/endpoint_zfs.go`
- step-holds + step-bookmarks
- last-received-hold
- new replication cursor + old replication cursor compat code
- adjust `endpoint/endpoint.go` handlers for
- encryption
- resumability
- new replication cursor
- last-received-hold
- client subcommand `zrepl holds list`: list all holds and hold-like bookmarks that zrepl thinks belong to it
- client subcommand `zrepl migrate replication-cursor:v1-v2`
2019-09-11 17:19:17 +02:00
|
|
|
}
|
|
|
|
func (m *SendCompletedReq) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_SendCompletedReq.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *SendCompletedReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_SendCompletedReq.Marshal(b, m, deterministic)
|
|
|
|
}
|
|
|
|
func (dst *SendCompletedReq) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_SendCompletedReq.Merge(dst, src)
|
|
|
|
}
|
|
|
|
func (m *SendCompletedReq) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_SendCompletedReq.Size(m)
|
|
|
|
}
|
|
|
|
func (m *SendCompletedReq) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_SendCompletedReq.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_SendCompletedReq proto.InternalMessageInfo
|
|
|
|
|
|
|
|
func (m *SendCompletedReq) GetOriginalReq() *SendReq {
|
|
|
|
if m != nil {
|
|
|
|
return m.OriginalReq
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
type SendCompletedRes struct {
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *SendCompletedRes) Reset() { *m = SendCompletedRes{} }
|
|
|
|
func (m *SendCompletedRes) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*SendCompletedRes) ProtoMessage() {}
|
|
|
|
func (*SendCompletedRes) Descriptor() ([]byte, []int) {
|
2020-06-27 23:53:33 +02:00
|
|
|
return fileDescriptor_pdu_616c27178643eca4, []int{12}
|
new features: {resumable,encrypted,hold-protected} send-recv, last-received-hold
- **Resumable Send & Recv Support**
No knobs required, automatically used where supported.
- **Hold-Protected Send & Recv**
Automatic ZFS holds to ensure that we can always resume a replication step.
- **Encrypted Send & Recv Support** for OpenZFS native encryption.
Configurable at the job level, i.e., for all filesystems a job is responsible for.
- **Receive-side hold on last received dataset**
The counterpart to the replication cursor bookmark on the send-side.
Ensures that incremental replication will always be possible between a sender and receiver.
Design Doc
----------
`replication/design.md` doc describes how we use ZFS holds and bookmarks to ensure that a single replication step is always resumable.
The replication algorithm described in the design doc introduces the notion of job IDs (please read the details on this design doc).
We reuse the job names for job IDs and use `JobID` type to ensure that a job name can be embedded into hold tags, bookmark names, etc.
This might BREAK CONFIG on upgrade.
Protocol Version Bump
---------------------
This commit makes backwards-incompatible changes to the replication/pdu protobufs.
Thus, bump the version number used in the protocol handshake.
Replication Cursor Format Change
--------------------------------
The new replication cursor bookmark format is: `#zrepl_CURSOR_G_${this.GUID}_J_${jobid}`
Including the GUID enables transaction-safe moving-forward of the cursor.
Including the job id enables that multiple sending jobs can send the same filesystem without interfering.
The `zrepl migrate replication-cursor:v1-v2` subcommand can be used to safely destroy old-format cursors once zrepl has created new-format cursors.
Changes in This Commit
----------------------
- package zfs
- infrastructure for holds
- infrastructure for resume token decoding
- implement a variant of OpenZFS's `entity_namecheck` and use it for validation in new code
- ZFSSendArgs to specify a ZFS send operation
- validation code protects against malicious resume tokens by checking that the token encodes the same send parameters that the send-side would use if no resume token were available (i.e. same filesystem, `fromguid`, `toguid`)
- RecvOptions support for `recv -s` flag
- convert a bunch of ZFS operations to be idempotent
- achieved through more differentiated error message scraping / additional pre-/post-checks
- package replication/pdu
- add field for encryption to send request messages
- add fields for resume handling to send & recv request messages
- receive requests now contain `FilesystemVersion To` in addition to the filesystem into which the stream should be `recv`d into
- can use `zfs recv $root_fs/$client_id/path/to/dataset@${To.Name}`, which enables additional validation after recv (i.e. whether `To.Guid` matched what we received in the stream)
- used to set `last-received-hold`
- package replication/logic
- introduce `PlannerPolicy` struct, currently only used to configure whether encrypted sends should be requested from the sender
- integrate encryption and resume token support into `Step` struct
- package endpoint
- move the concepts that endpoint builds on top of ZFS to a single file `endpoint/endpoint_zfs.go`
- step-holds + step-bookmarks
- last-received-hold
- new replication cursor + old replication cursor compat code
- adjust `endpoint/endpoint.go` handlers for
- encryption
- resumability
- new replication cursor
- last-received-hold
- client subcommand `zrepl holds list`: list all holds and hold-like bookmarks that zrepl thinks belong to it
- client subcommand `zrepl migrate replication-cursor:v1-v2`
2019-09-11 17:19:17 +02:00
|
|
|
}
|
|
|
|
func (m *SendCompletedRes) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_SendCompletedRes.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *SendCompletedRes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_SendCompletedRes.Marshal(b, m, deterministic)
|
|
|
|
}
|
|
|
|
func (dst *SendCompletedRes) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_SendCompletedRes.Merge(dst, src)
|
|
|
|
}
|
|
|
|
func (m *SendCompletedRes) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_SendCompletedRes.Size(m)
|
|
|
|
}
|
|
|
|
func (m *SendCompletedRes) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_SendCompletedRes.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_SendCompletedRes proto.InternalMessageInfo
|
|
|
|
|
2018-06-20 20:20:37 +02:00
|
|
|
type ReceiveReq struct {
|
new features: {resumable,encrypted,hold-protected} send-recv, last-received-hold
- **Resumable Send & Recv Support**
No knobs required, automatically used where supported.
- **Hold-Protected Send & Recv**
Automatic ZFS holds to ensure that we can always resume a replication step.
- **Encrypted Send & Recv Support** for OpenZFS native encryption.
Configurable at the job level, i.e., for all filesystems a job is responsible for.
- **Receive-side hold on last received dataset**
The counterpart to the replication cursor bookmark on the send-side.
Ensures that incremental replication will always be possible between a sender and receiver.
Design Doc
----------
`replication/design.md` doc describes how we use ZFS holds and bookmarks to ensure that a single replication step is always resumable.
The replication algorithm described in the design doc introduces the notion of job IDs (please read the details on this design doc).
We reuse the job names for job IDs and use `JobID` type to ensure that a job name can be embedded into hold tags, bookmark names, etc.
This might BREAK CONFIG on upgrade.
Protocol Version Bump
---------------------
This commit makes backwards-incompatible changes to the replication/pdu protobufs.
Thus, bump the version number used in the protocol handshake.
Replication Cursor Format Change
--------------------------------
The new replication cursor bookmark format is: `#zrepl_CURSOR_G_${this.GUID}_J_${jobid}`
Including the GUID enables transaction-safe moving-forward of the cursor.
Including the job id enables that multiple sending jobs can send the same filesystem without interfering.
The `zrepl migrate replication-cursor:v1-v2` subcommand can be used to safely destroy old-format cursors once zrepl has created new-format cursors.
Changes in This Commit
----------------------
- package zfs
- infrastructure for holds
- infrastructure for resume token decoding
- implement a variant of OpenZFS's `entity_namecheck` and use it for validation in new code
- ZFSSendArgs to specify a ZFS send operation
- validation code protects against malicious resume tokens by checking that the token encodes the same send parameters that the send-side would use if no resume token were available (i.e. same filesystem, `fromguid`, `toguid`)
- RecvOptions support for `recv -s` flag
- convert a bunch of ZFS operations to be idempotent
- achieved through more differentiated error message scraping / additional pre-/post-checks
- package replication/pdu
- add field for encryption to send request messages
- add fields for resume handling to send & recv request messages
- receive requests now contain `FilesystemVersion To` in addition to the filesystem into which the stream should be `recv`d into
- can use `zfs recv $root_fs/$client_id/path/to/dataset@${To.Name}`, which enables additional validation after recv (i.e. whether `To.Guid` matched what we received in the stream)
- used to set `last-received-hold`
- package replication/logic
- introduce `PlannerPolicy` struct, currently only used to configure whether encrypted sends should be requested from the sender
- integrate encryption and resume token support into `Step` struct
- package endpoint
- move the concepts that endpoint builds on top of ZFS to a single file `endpoint/endpoint_zfs.go`
- step-holds + step-bookmarks
- last-received-hold
- new replication cursor + old replication cursor compat code
- adjust `endpoint/endpoint.go` handlers for
- encryption
- resumability
- new replication cursor
- last-received-hold
- client subcommand `zrepl holds list`: list all holds and hold-like bookmarks that zrepl thinks belong to it
- client subcommand `zrepl migrate replication-cursor:v1-v2`
2019-09-11 17:19:17 +02:00
|
|
|
Filesystem string `protobuf:"bytes,1,opt,name=Filesystem,proto3" json:"Filesystem,omitempty"`
|
|
|
|
To *FilesystemVersion `protobuf:"bytes,2,opt,name=To,proto3" json:"To,omitempty"`
|
endpoint: refactor, fix stale holds on initial replication failure, zfs-abstractions subcmd, more efficient ZFS queries
The motivation for this recatoring are based on two independent issues:
- @JMoVS found that the changes merged as part of #259 slowed his OS X
based installation down significantly.
Analysis of the zfs command logging introduced in #296 showed that
`zfs holds` took most of the execution time, and they pointed out
that not all of those `zfs holds` invocations were actually necessary.
I.e.: zrepl was inefficient about retrieving information from ZFS.
- @InsanePrawn found that failures on initial replication would lead
to step holds accumulating on the sending side, i.e. they would never
be cleaned up in the HintMostRecentCommonAncestor RPC handler.
That was because we only sent that RPC if there was a most recent
common ancestor detected during replication planning.
@InsanePrawn prototyped an implementation of a `zrepl zfs-abstractions release`
command to mitigate the situation.
As part of that development work and back-and-forth with @problame,
it became evident that the abstractions that #259 built on top of
zfs in package endpoint (step holds, replication cursor,
last-received-hold), were not well-represented for re-use in the
`zrepl zfs-abstractions release` subocommand prototype.
This commit refactors package endpoint to address both of these issues:
- endpoint abstractions now share an interface `Abstraction` that, among
other things, provides a uniform `Destroy()` method.
However, that method should not be destroyed directly but instead
the package-level `BatchDestroy` function should be used in order
to allow for a migration to zfs channel programs in the future.
- endpoint now has a query facitilty (`ListAbstractions`) which is
used to find on-disk
- step holds and bookmarks
- replication cursors (v1, v2)
- last-received-holds
By describing the query in a struct, we can centralized the retrieval
of information via the ZFS CLI and only have to be clever once.
We are "clever" in the following ways:
- When asking for hold-based abstractions, we only run `zfs holds` on
snapshot that have `userrefs` > 0
- To support this functionality, add field `UserRefs` to zfs.FilesystemVersion
and retrieve it anywhere we retrieve zfs.FilesystemVersion from ZFS.
- When asking only for bookmark-based abstractions, we only run
`zfs list -t bookmark`, not with snapshots.
- Currently unused (except for CLI) per-filesystem concurrent lookup
- Option to only include abstractions with CreateTXG in a specified range
- refactor `endpoint`'s various ZFS info retrieval methods to use
`ListAbstractions`
- rename the `zrepl holds list` command to `zrepl zfs-abstractions list`
- make `zrepl zfs-abstractions list` consume endpoint.ListAbstractions
- Add a `ListStale` method which, given a query template,
lists stale holds and bookmarks.
- it uses replication cursor has different modes
- the new `zrepl zfs-abstractions release-{all,stale}` commands can be used
to remove abstractions of package endpoint
- Adjust HintMostRecentCommonAncestor RPC for stale-holds cleanup:
- send it also if no most recent common ancestor exists between sender and receiver
- have the sender clean up its abstractions when it receives the RPC
with no most recent common ancestor, using `ListStale`
- Due to changed semantics, bump the protocol version.
- Adjust HintMostRecentCommonAncestor RPC for performance problems
encountered by @JMoVS
- by default, per (job,fs)-combination, only consider cleaning
step holds in the createtxg range
`[last replication cursor,conservatively-estimated-receive-side-version)`
- this behavior ensures resumability at cost proportional to the
time that replication was donw
- however, as explained in a comment, we might leak holds if
the zrepl daemon stops running
- that trade-off is acceptable because in the presumably rare
this might happen the user has two tools at their hand:
- Tool 1: run `zrepl zfs-abstractions release-stale`
- Tool 2: use env var `ZREPL_ENDPOINT_SENDER_HINT_MOST_RECENT_STEP_HOLD_CLEANUP_MODE`
to adjust the lower bound of the createtxg range (search for it in the code).
The env var can also be used to disable hold-cleanup on the
send-side entirely.
supersedes closes #293
supersedes closes #282
fixes #280
fixes #278
Additionaly, we fixed a couple of bugs:
- zfs: fix half-nil error reporting of dataset-does-not-exist for ZFSListChan and ZFSBookmark
- endpoint: Sender's `HintMostRecentCommonAncestor` handler would not
check whether access to the specified filesystem was allowed.
2020-03-26 23:43:17 +01:00
|
|
|
// If true, the receiver should clear the resume token before performing the
|
new features: {resumable,encrypted,hold-protected} send-recv, last-received-hold
- **Resumable Send & Recv Support**
No knobs required, automatically used where supported.
- **Hold-Protected Send & Recv**
Automatic ZFS holds to ensure that we can always resume a replication step.
- **Encrypted Send & Recv Support** for OpenZFS native encryption.
Configurable at the job level, i.e., for all filesystems a job is responsible for.
- **Receive-side hold on last received dataset**
The counterpart to the replication cursor bookmark on the send-side.
Ensures that incremental replication will always be possible between a sender and receiver.
Design Doc
----------
`replication/design.md` doc describes how we use ZFS holds and bookmarks to ensure that a single replication step is always resumable.
The replication algorithm described in the design doc introduces the notion of job IDs (please read the details on this design doc).
We reuse the job names for job IDs and use `JobID` type to ensure that a job name can be embedded into hold tags, bookmark names, etc.
This might BREAK CONFIG on upgrade.
Protocol Version Bump
---------------------
This commit makes backwards-incompatible changes to the replication/pdu protobufs.
Thus, bump the version number used in the protocol handshake.
Replication Cursor Format Change
--------------------------------
The new replication cursor bookmark format is: `#zrepl_CURSOR_G_${this.GUID}_J_${jobid}`
Including the GUID enables transaction-safe moving-forward of the cursor.
Including the job id enables that multiple sending jobs can send the same filesystem without interfering.
The `zrepl migrate replication-cursor:v1-v2` subcommand can be used to safely destroy old-format cursors once zrepl has created new-format cursors.
Changes in This Commit
----------------------
- package zfs
- infrastructure for holds
- infrastructure for resume token decoding
- implement a variant of OpenZFS's `entity_namecheck` and use it for validation in new code
- ZFSSendArgs to specify a ZFS send operation
- validation code protects against malicious resume tokens by checking that the token encodes the same send parameters that the send-side would use if no resume token were available (i.e. same filesystem, `fromguid`, `toguid`)
- RecvOptions support for `recv -s` flag
- convert a bunch of ZFS operations to be idempotent
- achieved through more differentiated error message scraping / additional pre-/post-checks
- package replication/pdu
- add field for encryption to send request messages
- add fields for resume handling to send & recv request messages
- receive requests now contain `FilesystemVersion To` in addition to the filesystem into which the stream should be `recv`d into
- can use `zfs recv $root_fs/$client_id/path/to/dataset@${To.Name}`, which enables additional validation after recv (i.e. whether `To.Guid` matched what we received in the stream)
- used to set `last-received-hold`
- package replication/logic
- introduce `PlannerPolicy` struct, currently only used to configure whether encrypted sends should be requested from the sender
- integrate encryption and resume token support into `Step` struct
- package endpoint
- move the concepts that endpoint builds on top of ZFS to a single file `endpoint/endpoint_zfs.go`
- step-holds + step-bookmarks
- last-received-hold
- new replication cursor + old replication cursor compat code
- adjust `endpoint/endpoint.go` handlers for
- encryption
- resumability
- new replication cursor
- last-received-hold
- client subcommand `zrepl holds list`: list all holds and hold-like bookmarks that zrepl thinks belong to it
- client subcommand `zrepl migrate replication-cursor:v1-v2`
2019-09-11 17:19:17 +02:00
|
|
|
// zfs recv of the stream in the request
|
2020-06-27 23:53:33 +02:00
|
|
|
ClearResumeToken bool `protobuf:"varint,3,opt,name=ClearResumeToken,proto3" json:"ClearResumeToken,omitempty"`
|
|
|
|
ReplicationConfig *ReplicationConfig `protobuf:"bytes,4,opt,name=ReplicationConfig,proto3" json:"ReplicationConfig,omitempty"`
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
2018-06-20 20:20:37 +02:00
|
|
|
}
|
|
|
|
|
2018-08-26 14:35:18 +02:00
|
|
|
func (m *ReceiveReq) Reset() { *m = ReceiveReq{} }
|
|
|
|
func (m *ReceiveReq) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*ReceiveReq) ProtoMessage() {}
|
|
|
|
func (*ReceiveReq) Descriptor() ([]byte, []int) {
|
2020-06-27 23:53:33 +02:00
|
|
|
return fileDescriptor_pdu_616c27178643eca4, []int{13}
|
2018-08-26 14:35:18 +02:00
|
|
|
}
|
|
|
|
func (m *ReceiveReq) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_ReceiveReq.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *ReceiveReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_ReceiveReq.Marshal(b, m, deterministic)
|
|
|
|
}
|
2018-12-01 14:09:32 +01:00
|
|
|
func (dst *ReceiveReq) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_ReceiveReq.Merge(dst, src)
|
2018-08-26 14:35:18 +02:00
|
|
|
}
|
|
|
|
func (m *ReceiveReq) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_ReceiveReq.Size(m)
|
|
|
|
}
|
|
|
|
func (m *ReceiveReq) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_ReceiveReq.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_ReceiveReq proto.InternalMessageInfo
|
2018-06-20 20:20:37 +02:00
|
|
|
|
|
|
|
func (m *ReceiveReq) GetFilesystem() string {
|
|
|
|
if m != nil {
|
|
|
|
return m.Filesystem
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
new features: {resumable,encrypted,hold-protected} send-recv, last-received-hold
- **Resumable Send & Recv Support**
No knobs required, automatically used where supported.
- **Hold-Protected Send & Recv**
Automatic ZFS holds to ensure that we can always resume a replication step.
- **Encrypted Send & Recv Support** for OpenZFS native encryption.
Configurable at the job level, i.e., for all filesystems a job is responsible for.
- **Receive-side hold on last received dataset**
The counterpart to the replication cursor bookmark on the send-side.
Ensures that incremental replication will always be possible between a sender and receiver.
Design Doc
----------
`replication/design.md` doc describes how we use ZFS holds and bookmarks to ensure that a single replication step is always resumable.
The replication algorithm described in the design doc introduces the notion of job IDs (please read the details on this design doc).
We reuse the job names for job IDs and use `JobID` type to ensure that a job name can be embedded into hold tags, bookmark names, etc.
This might BREAK CONFIG on upgrade.
Protocol Version Bump
---------------------
This commit makes backwards-incompatible changes to the replication/pdu protobufs.
Thus, bump the version number used in the protocol handshake.
Replication Cursor Format Change
--------------------------------
The new replication cursor bookmark format is: `#zrepl_CURSOR_G_${this.GUID}_J_${jobid}`
Including the GUID enables transaction-safe moving-forward of the cursor.
Including the job id enables that multiple sending jobs can send the same filesystem without interfering.
The `zrepl migrate replication-cursor:v1-v2` subcommand can be used to safely destroy old-format cursors once zrepl has created new-format cursors.
Changes in This Commit
----------------------
- package zfs
- infrastructure for holds
- infrastructure for resume token decoding
- implement a variant of OpenZFS's `entity_namecheck` and use it for validation in new code
- ZFSSendArgs to specify a ZFS send operation
- validation code protects against malicious resume tokens by checking that the token encodes the same send parameters that the send-side would use if no resume token were available (i.e. same filesystem, `fromguid`, `toguid`)
- RecvOptions support for `recv -s` flag
- convert a bunch of ZFS operations to be idempotent
- achieved through more differentiated error message scraping / additional pre-/post-checks
- package replication/pdu
- add field for encryption to send request messages
- add fields for resume handling to send & recv request messages
- receive requests now contain `FilesystemVersion To` in addition to the filesystem into which the stream should be `recv`d into
- can use `zfs recv $root_fs/$client_id/path/to/dataset@${To.Name}`, which enables additional validation after recv (i.e. whether `To.Guid` matched what we received in the stream)
- used to set `last-received-hold`
- package replication/logic
- introduce `PlannerPolicy` struct, currently only used to configure whether encrypted sends should be requested from the sender
- integrate encryption and resume token support into `Step` struct
- package endpoint
- move the concepts that endpoint builds on top of ZFS to a single file `endpoint/endpoint_zfs.go`
- step-holds + step-bookmarks
- last-received-hold
- new replication cursor + old replication cursor compat code
- adjust `endpoint/endpoint.go` handlers for
- encryption
- resumability
- new replication cursor
- last-received-hold
- client subcommand `zrepl holds list`: list all holds and hold-like bookmarks that zrepl thinks belong to it
- client subcommand `zrepl migrate replication-cursor:v1-v2`
2019-09-11 17:19:17 +02:00
|
|
|
func (m *ReceiveReq) GetTo() *FilesystemVersion {
|
|
|
|
if m != nil {
|
|
|
|
return m.To
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2018-06-20 20:20:37 +02:00
|
|
|
func (m *ReceiveReq) GetClearResumeToken() bool {
|
|
|
|
if m != nil {
|
|
|
|
return m.ClearResumeToken
|
|
|
|
}
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
|
2020-06-27 23:53:33 +02:00
|
|
|
func (m *ReceiveReq) GetReplicationConfig() *ReplicationConfig {
|
|
|
|
if m != nil {
|
|
|
|
return m.ReplicationConfig
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2018-06-20 20:20:37 +02:00
|
|
|
type ReceiveRes struct {
|
2018-08-26 14:35:18 +02:00
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *ReceiveRes) Reset() { *m = ReceiveRes{} }
|
|
|
|
func (m *ReceiveRes) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*ReceiveRes) ProtoMessage() {}
|
|
|
|
func (*ReceiveRes) Descriptor() ([]byte, []int) {
|
2020-06-27 23:53:33 +02:00
|
|
|
return fileDescriptor_pdu_616c27178643eca4, []int{14}
|
2018-08-26 14:35:18 +02:00
|
|
|
}
|
|
|
|
func (m *ReceiveRes) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_ReceiveRes.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *ReceiveRes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_ReceiveRes.Marshal(b, m, deterministic)
|
|
|
|
}
|
2018-12-01 14:09:32 +01:00
|
|
|
func (dst *ReceiveRes) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_ReceiveRes.Merge(dst, src)
|
2018-08-26 14:35:18 +02:00
|
|
|
}
|
|
|
|
func (m *ReceiveRes) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_ReceiveRes.Size(m)
|
|
|
|
}
|
|
|
|
func (m *ReceiveRes) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_ReceiveRes.DiscardUnknown(m)
|
2018-06-20 20:20:37 +02:00
|
|
|
}
|
|
|
|
|
2018-08-26 14:35:18 +02:00
|
|
|
var xxx_messageInfo_ReceiveRes proto.InternalMessageInfo
|
2018-06-20 20:20:37 +02:00
|
|
|
|
2018-08-30 11:51:47 +02:00
|
|
|
type DestroySnapshotsReq struct {
|
|
|
|
Filesystem string `protobuf:"bytes,1,opt,name=Filesystem,proto3" json:"Filesystem,omitempty"`
|
|
|
|
// Path to filesystem, snapshot or bookmark to be destroyed
|
|
|
|
Snapshots []*FilesystemVersion `protobuf:"bytes,2,rep,name=Snapshots,proto3" json:"Snapshots,omitempty"`
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *DestroySnapshotsReq) Reset() { *m = DestroySnapshotsReq{} }
|
|
|
|
func (m *DestroySnapshotsReq) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*DestroySnapshotsReq) ProtoMessage() {}
|
|
|
|
func (*DestroySnapshotsReq) Descriptor() ([]byte, []int) {
|
2020-06-27 23:53:33 +02:00
|
|
|
return fileDescriptor_pdu_616c27178643eca4, []int{15}
|
2018-08-30 11:51:47 +02:00
|
|
|
}
|
|
|
|
func (m *DestroySnapshotsReq) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_DestroySnapshotsReq.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *DestroySnapshotsReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_DestroySnapshotsReq.Marshal(b, m, deterministic)
|
|
|
|
}
|
2018-12-01 14:09:32 +01:00
|
|
|
func (dst *DestroySnapshotsReq) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_DestroySnapshotsReq.Merge(dst, src)
|
2018-08-30 11:51:47 +02:00
|
|
|
}
|
|
|
|
func (m *DestroySnapshotsReq) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_DestroySnapshotsReq.Size(m)
|
|
|
|
}
|
|
|
|
func (m *DestroySnapshotsReq) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_DestroySnapshotsReq.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_DestroySnapshotsReq proto.InternalMessageInfo
|
|
|
|
|
|
|
|
func (m *DestroySnapshotsReq) GetFilesystem() string {
|
|
|
|
if m != nil {
|
|
|
|
return m.Filesystem
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *DestroySnapshotsReq) GetSnapshots() []*FilesystemVersion {
|
|
|
|
if m != nil {
|
|
|
|
return m.Snapshots
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
type DestroySnapshotRes struct {
|
|
|
|
Snapshot *FilesystemVersion `protobuf:"bytes,1,opt,name=Snapshot,proto3" json:"Snapshot,omitempty"`
|
|
|
|
Error string `protobuf:"bytes,2,opt,name=Error,proto3" json:"Error,omitempty"`
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *DestroySnapshotRes) Reset() { *m = DestroySnapshotRes{} }
|
|
|
|
func (m *DestroySnapshotRes) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*DestroySnapshotRes) ProtoMessage() {}
|
|
|
|
func (*DestroySnapshotRes) Descriptor() ([]byte, []int) {
|
2020-06-27 23:53:33 +02:00
|
|
|
return fileDescriptor_pdu_616c27178643eca4, []int{16}
|
2018-08-30 11:51:47 +02:00
|
|
|
}
|
|
|
|
func (m *DestroySnapshotRes) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_DestroySnapshotRes.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *DestroySnapshotRes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_DestroySnapshotRes.Marshal(b, m, deterministic)
|
|
|
|
}
|
2018-12-01 14:09:32 +01:00
|
|
|
func (dst *DestroySnapshotRes) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_DestroySnapshotRes.Merge(dst, src)
|
2018-08-30 11:51:47 +02:00
|
|
|
}
|
|
|
|
func (m *DestroySnapshotRes) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_DestroySnapshotRes.Size(m)
|
|
|
|
}
|
|
|
|
func (m *DestroySnapshotRes) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_DestroySnapshotRes.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_DestroySnapshotRes proto.InternalMessageInfo
|
|
|
|
|
|
|
|
func (m *DestroySnapshotRes) GetSnapshot() *FilesystemVersion {
|
|
|
|
if m != nil {
|
|
|
|
return m.Snapshot
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *DestroySnapshotRes) GetError() string {
|
|
|
|
if m != nil {
|
|
|
|
return m.Error
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
|
|
|
type DestroySnapshotsRes struct {
|
|
|
|
Results []*DestroySnapshotRes `protobuf:"bytes,1,rep,name=Results,proto3" json:"Results,omitempty"`
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *DestroySnapshotsRes) Reset() { *m = DestroySnapshotsRes{} }
|
|
|
|
func (m *DestroySnapshotsRes) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*DestroySnapshotsRes) ProtoMessage() {}
|
|
|
|
func (*DestroySnapshotsRes) Descriptor() ([]byte, []int) {
|
2020-06-27 23:53:33 +02:00
|
|
|
return fileDescriptor_pdu_616c27178643eca4, []int{17}
|
2018-08-30 11:51:47 +02:00
|
|
|
}
|
|
|
|
func (m *DestroySnapshotsRes) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_DestroySnapshotsRes.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *DestroySnapshotsRes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_DestroySnapshotsRes.Marshal(b, m, deterministic)
|
|
|
|
}
|
2018-12-01 14:09:32 +01:00
|
|
|
func (dst *DestroySnapshotsRes) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_DestroySnapshotsRes.Merge(dst, src)
|
2018-08-30 11:51:47 +02:00
|
|
|
}
|
|
|
|
func (m *DestroySnapshotsRes) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_DestroySnapshotsRes.Size(m)
|
|
|
|
}
|
|
|
|
func (m *DestroySnapshotsRes) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_DestroySnapshotsRes.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_DestroySnapshotsRes proto.InternalMessageInfo
|
|
|
|
|
|
|
|
func (m *DestroySnapshotsRes) GetResults() []*DestroySnapshotRes {
|
|
|
|
if m != nil {
|
|
|
|
return m.Results
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2018-09-06 03:24:15 +02:00
|
|
|
type ReplicationCursorReq struct {
|
new features: {resumable,encrypted,hold-protected} send-recv, last-received-hold
- **Resumable Send & Recv Support**
No knobs required, automatically used where supported.
- **Hold-Protected Send & Recv**
Automatic ZFS holds to ensure that we can always resume a replication step.
- **Encrypted Send & Recv Support** for OpenZFS native encryption.
Configurable at the job level, i.e., for all filesystems a job is responsible for.
- **Receive-side hold on last received dataset**
The counterpart to the replication cursor bookmark on the send-side.
Ensures that incremental replication will always be possible between a sender and receiver.
Design Doc
----------
`replication/design.md` doc describes how we use ZFS holds and bookmarks to ensure that a single replication step is always resumable.
The replication algorithm described in the design doc introduces the notion of job IDs (please read the details on this design doc).
We reuse the job names for job IDs and use `JobID` type to ensure that a job name can be embedded into hold tags, bookmark names, etc.
This might BREAK CONFIG on upgrade.
Protocol Version Bump
---------------------
This commit makes backwards-incompatible changes to the replication/pdu protobufs.
Thus, bump the version number used in the protocol handshake.
Replication Cursor Format Change
--------------------------------
The new replication cursor bookmark format is: `#zrepl_CURSOR_G_${this.GUID}_J_${jobid}`
Including the GUID enables transaction-safe moving-forward of the cursor.
Including the job id enables that multiple sending jobs can send the same filesystem without interfering.
The `zrepl migrate replication-cursor:v1-v2` subcommand can be used to safely destroy old-format cursors once zrepl has created new-format cursors.
Changes in This Commit
----------------------
- package zfs
- infrastructure for holds
- infrastructure for resume token decoding
- implement a variant of OpenZFS's `entity_namecheck` and use it for validation in new code
- ZFSSendArgs to specify a ZFS send operation
- validation code protects against malicious resume tokens by checking that the token encodes the same send parameters that the send-side would use if no resume token were available (i.e. same filesystem, `fromguid`, `toguid`)
- RecvOptions support for `recv -s` flag
- convert a bunch of ZFS operations to be idempotent
- achieved through more differentiated error message scraping / additional pre-/post-checks
- package replication/pdu
- add field for encryption to send request messages
- add fields for resume handling to send & recv request messages
- receive requests now contain `FilesystemVersion To` in addition to the filesystem into which the stream should be `recv`d into
- can use `zfs recv $root_fs/$client_id/path/to/dataset@${To.Name}`, which enables additional validation after recv (i.e. whether `To.Guid` matched what we received in the stream)
- used to set `last-received-hold`
- package replication/logic
- introduce `PlannerPolicy` struct, currently only used to configure whether encrypted sends should be requested from the sender
- integrate encryption and resume token support into `Step` struct
- package endpoint
- move the concepts that endpoint builds on top of ZFS to a single file `endpoint/endpoint_zfs.go`
- step-holds + step-bookmarks
- last-received-hold
- new replication cursor + old replication cursor compat code
- adjust `endpoint/endpoint.go` handlers for
- encryption
- resumability
- new replication cursor
- last-received-hold
- client subcommand `zrepl holds list`: list all holds and hold-like bookmarks that zrepl thinks belong to it
- client subcommand `zrepl migrate replication-cursor:v1-v2`
2019-09-11 17:19:17 +02:00
|
|
|
Filesystem string `protobuf:"bytes,1,opt,name=Filesystem,proto3" json:"Filesystem,omitempty"`
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
2018-08-30 11:51:47 +02:00
|
|
|
}
|
|
|
|
|
2018-09-06 03:24:15 +02:00
|
|
|
func (m *ReplicationCursorReq) Reset() { *m = ReplicationCursorReq{} }
|
|
|
|
func (m *ReplicationCursorReq) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*ReplicationCursorReq) ProtoMessage() {}
|
|
|
|
func (*ReplicationCursorReq) Descriptor() ([]byte, []int) {
|
2020-06-27 23:53:33 +02:00
|
|
|
return fileDescriptor_pdu_616c27178643eca4, []int{18}
|
2018-08-30 11:51:47 +02:00
|
|
|
}
|
2018-09-06 03:24:15 +02:00
|
|
|
func (m *ReplicationCursorReq) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_ReplicationCursorReq.Unmarshal(m, b)
|
2018-08-30 11:51:47 +02:00
|
|
|
}
|
2018-09-06 03:24:15 +02:00
|
|
|
func (m *ReplicationCursorReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_ReplicationCursorReq.Marshal(b, m, deterministic)
|
2018-08-30 11:51:47 +02:00
|
|
|
}
|
2018-12-01 14:09:32 +01:00
|
|
|
func (dst *ReplicationCursorReq) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_ReplicationCursorReq.Merge(dst, src)
|
2018-08-30 11:51:47 +02:00
|
|
|
}
|
2018-09-06 03:24:15 +02:00
|
|
|
func (m *ReplicationCursorReq) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_ReplicationCursorReq.Size(m)
|
2018-08-30 11:51:47 +02:00
|
|
|
}
|
2018-09-06 03:24:15 +02:00
|
|
|
func (m *ReplicationCursorReq) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_ReplicationCursorReq.DiscardUnknown(m)
|
2018-08-30 11:51:47 +02:00
|
|
|
}
|
|
|
|
|
2018-09-06 03:24:15 +02:00
|
|
|
var xxx_messageInfo_ReplicationCursorReq proto.InternalMessageInfo
|
2018-08-30 11:51:47 +02:00
|
|
|
|
2018-09-06 03:24:15 +02:00
|
|
|
func (m *ReplicationCursorReq) GetFilesystem() string {
|
2018-08-30 11:51:47 +02:00
|
|
|
if m != nil {
|
|
|
|
return m.Filesystem
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
2018-09-06 03:24:15 +02:00
|
|
|
type ReplicationCursorRes struct {
|
|
|
|
// Types that are valid to be assigned to Result:
|
|
|
|
// *ReplicationCursorRes_Guid
|
2018-11-16 12:03:38 +01:00
|
|
|
// *ReplicationCursorRes_Notexist
|
2018-09-06 03:24:15 +02:00
|
|
|
Result isReplicationCursorRes_Result `protobuf_oneof:"Result"`
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
2018-08-30 11:51:47 +02:00
|
|
|
}
|
|
|
|
|
2018-09-06 03:24:15 +02:00
|
|
|
func (m *ReplicationCursorRes) Reset() { *m = ReplicationCursorRes{} }
|
|
|
|
func (m *ReplicationCursorRes) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*ReplicationCursorRes) ProtoMessage() {}
|
|
|
|
func (*ReplicationCursorRes) Descriptor() ([]byte, []int) {
|
2020-06-27 23:53:33 +02:00
|
|
|
return fileDescriptor_pdu_616c27178643eca4, []int{19}
|
2018-08-30 11:51:47 +02:00
|
|
|
}
|
2018-09-06 03:24:15 +02:00
|
|
|
func (m *ReplicationCursorRes) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_ReplicationCursorRes.Unmarshal(m, b)
|
2018-08-30 11:51:47 +02:00
|
|
|
}
|
2018-09-06 03:24:15 +02:00
|
|
|
func (m *ReplicationCursorRes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_ReplicationCursorRes.Marshal(b, m, deterministic)
|
2018-08-30 11:51:47 +02:00
|
|
|
}
|
2018-12-01 14:09:32 +01:00
|
|
|
func (dst *ReplicationCursorRes) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_ReplicationCursorRes.Merge(dst, src)
|
2018-08-30 11:51:47 +02:00
|
|
|
}
|
2018-09-06 03:24:15 +02:00
|
|
|
func (m *ReplicationCursorRes) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_ReplicationCursorRes.Size(m)
|
2018-08-30 11:51:47 +02:00
|
|
|
}
|
2018-09-06 03:24:15 +02:00
|
|
|
func (m *ReplicationCursorRes) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_ReplicationCursorRes.DiscardUnknown(m)
|
2018-08-30 11:51:47 +02:00
|
|
|
}
|
|
|
|
|
2018-09-06 03:24:15 +02:00
|
|
|
var xxx_messageInfo_ReplicationCursorRes proto.InternalMessageInfo
|
2018-08-30 11:51:47 +02:00
|
|
|
|
2018-09-06 03:24:15 +02:00
|
|
|
type isReplicationCursorRes_Result interface {
|
|
|
|
isReplicationCursorRes_Result()
|
|
|
|
}
|
|
|
|
|
|
|
|
type ReplicationCursorRes_Guid struct {
|
|
|
|
Guid uint64 `protobuf:"varint,1,opt,name=Guid,proto3,oneof"`
|
|
|
|
}
|
|
|
|
|
2018-11-16 12:03:38 +01:00
|
|
|
type ReplicationCursorRes_Notexist struct {
|
|
|
|
Notexist bool `protobuf:"varint,2,opt,name=Notexist,proto3,oneof"`
|
2018-09-06 03:24:15 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
func (*ReplicationCursorRes_Guid) isReplicationCursorRes_Result() {}
|
|
|
|
|
2018-11-16 12:03:38 +01:00
|
|
|
func (*ReplicationCursorRes_Notexist) isReplicationCursorRes_Result() {}
|
2018-09-06 03:24:15 +02:00
|
|
|
|
|
|
|
func (m *ReplicationCursorRes) GetResult() isReplicationCursorRes_Result {
|
2018-08-30 11:51:47 +02:00
|
|
|
if m != nil {
|
2018-09-06 03:24:15 +02:00
|
|
|
return m.Result
|
2018-08-30 11:51:47 +02:00
|
|
|
}
|
2018-09-06 03:24:15 +02:00
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *ReplicationCursorRes) GetGuid() uint64 {
|
|
|
|
if x, ok := m.GetResult().(*ReplicationCursorRes_Guid); ok {
|
|
|
|
return x.Guid
|
|
|
|
}
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
2018-11-16 12:03:38 +01:00
|
|
|
func (m *ReplicationCursorRes) GetNotexist() bool {
|
|
|
|
if x, ok := m.GetResult().(*ReplicationCursorRes_Notexist); ok {
|
|
|
|
return x.Notexist
|
2018-09-06 03:24:15 +02:00
|
|
|
}
|
2018-11-16 12:03:38 +01:00
|
|
|
return false
|
2018-09-06 03:24:15 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
// XXX_OneofFuncs is for the internal use of the proto package.
|
|
|
|
func (*ReplicationCursorRes) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
|
|
|
|
return _ReplicationCursorRes_OneofMarshaler, _ReplicationCursorRes_OneofUnmarshaler, _ReplicationCursorRes_OneofSizer, []interface{}{
|
|
|
|
(*ReplicationCursorRes_Guid)(nil),
|
2018-11-16 12:03:38 +01:00
|
|
|
(*ReplicationCursorRes_Notexist)(nil),
|
2018-09-06 03:24:15 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func _ReplicationCursorRes_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
|
|
|
|
m := msg.(*ReplicationCursorRes)
|
|
|
|
// Result
|
|
|
|
switch x := m.Result.(type) {
|
|
|
|
case *ReplicationCursorRes_Guid:
|
|
|
|
b.EncodeVarint(1<<3 | proto.WireVarint)
|
|
|
|
b.EncodeVarint(uint64(x.Guid))
|
2018-11-16 12:03:38 +01:00
|
|
|
case *ReplicationCursorRes_Notexist:
|
|
|
|
t := uint64(0)
|
|
|
|
if x.Notexist {
|
|
|
|
t = 1
|
|
|
|
}
|
|
|
|
b.EncodeVarint(2<<3 | proto.WireVarint)
|
|
|
|
b.EncodeVarint(t)
|
2018-09-06 03:24:15 +02:00
|
|
|
case nil:
|
|
|
|
default:
|
|
|
|
return fmt.Errorf("ReplicationCursorRes.Result has unexpected type %T", x)
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func _ReplicationCursorRes_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
|
|
|
|
m := msg.(*ReplicationCursorRes)
|
|
|
|
switch tag {
|
|
|
|
case 1: // Result.Guid
|
|
|
|
if wire != proto.WireVarint {
|
|
|
|
return true, proto.ErrInternalBadWireType
|
|
|
|
}
|
|
|
|
x, err := b.DecodeVarint()
|
|
|
|
m.Result = &ReplicationCursorRes_Guid{x}
|
|
|
|
return true, err
|
2018-11-16 12:03:38 +01:00
|
|
|
case 2: // Result.Notexist
|
|
|
|
if wire != proto.WireVarint {
|
2018-09-06 03:24:15 +02:00
|
|
|
return true, proto.ErrInternalBadWireType
|
|
|
|
}
|
2018-11-16 12:03:38 +01:00
|
|
|
x, err := b.DecodeVarint()
|
|
|
|
m.Result = &ReplicationCursorRes_Notexist{x != 0}
|
2018-09-06 03:24:15 +02:00
|
|
|
return true, err
|
|
|
|
default:
|
|
|
|
return false, nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func _ReplicationCursorRes_OneofSizer(msg proto.Message) (n int) {
|
|
|
|
m := msg.(*ReplicationCursorRes)
|
|
|
|
// Result
|
|
|
|
switch x := m.Result.(type) {
|
|
|
|
case *ReplicationCursorRes_Guid:
|
|
|
|
n += 1 // tag and wire
|
|
|
|
n += proto.SizeVarint(uint64(x.Guid))
|
2018-11-16 12:03:38 +01:00
|
|
|
case *ReplicationCursorRes_Notexist:
|
2018-09-06 03:24:15 +02:00
|
|
|
n += 1 // tag and wire
|
2018-11-16 12:03:38 +01:00
|
|
|
n += 1
|
2018-09-06 03:24:15 +02:00
|
|
|
case nil:
|
|
|
|
default:
|
|
|
|
panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
|
|
|
|
}
|
|
|
|
return n
|
2018-08-30 11:51:47 +02:00
|
|
|
}
|
|
|
|
|
2019-03-11 13:46:36 +01:00
|
|
|
type PingReq struct {
|
|
|
|
Message string `protobuf:"bytes,1,opt,name=Message,proto3" json:"Message,omitempty"`
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *PingReq) Reset() { *m = PingReq{} }
|
|
|
|
func (m *PingReq) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*PingReq) ProtoMessage() {}
|
|
|
|
func (*PingReq) Descriptor() ([]byte, []int) {
|
2020-06-27 23:53:33 +02:00
|
|
|
return fileDescriptor_pdu_616c27178643eca4, []int{20}
|
2019-03-11 13:46:36 +01:00
|
|
|
}
|
|
|
|
func (m *PingReq) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_PingReq.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *PingReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_PingReq.Marshal(b, m, deterministic)
|
|
|
|
}
|
|
|
|
func (dst *PingReq) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_PingReq.Merge(dst, src)
|
|
|
|
}
|
|
|
|
func (m *PingReq) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_PingReq.Size(m)
|
|
|
|
}
|
|
|
|
func (m *PingReq) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_PingReq.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_PingReq proto.InternalMessageInfo
|
|
|
|
|
|
|
|
func (m *PingReq) GetMessage() string {
|
|
|
|
if m != nil {
|
|
|
|
return m.Message
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
|
|
|
type PingRes struct {
|
|
|
|
// Echo must be PingReq.Message
|
|
|
|
Echo string `protobuf:"bytes,1,opt,name=Echo,proto3" json:"Echo,omitempty"`
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *PingRes) Reset() { *m = PingRes{} }
|
|
|
|
func (m *PingRes) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*PingRes) ProtoMessage() {}
|
|
|
|
func (*PingRes) Descriptor() ([]byte, []int) {
|
2020-06-27 23:53:33 +02:00
|
|
|
return fileDescriptor_pdu_616c27178643eca4, []int{21}
|
2019-03-11 13:46:36 +01:00
|
|
|
}
|
|
|
|
func (m *PingRes) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_PingRes.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *PingRes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_PingRes.Marshal(b, m, deterministic)
|
|
|
|
}
|
|
|
|
func (dst *PingRes) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_PingRes.Merge(dst, src)
|
|
|
|
}
|
|
|
|
func (m *PingRes) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_PingRes.Size(m)
|
|
|
|
}
|
|
|
|
func (m *PingRes) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_PingRes.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_PingRes proto.InternalMessageInfo
|
|
|
|
|
|
|
|
func (m *PingRes) GetEcho() string {
|
|
|
|
if m != nil {
|
|
|
|
return m.Echo
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
2018-06-20 20:20:37 +02:00
|
|
|
func init() {
|
2018-12-11 22:01:50 +01:00
|
|
|
proto.RegisterType((*ListFilesystemReq)(nil), "ListFilesystemReq")
|
|
|
|
proto.RegisterType((*ListFilesystemRes)(nil), "ListFilesystemRes")
|
|
|
|
proto.RegisterType((*Filesystem)(nil), "Filesystem")
|
|
|
|
proto.RegisterType((*ListFilesystemVersionsReq)(nil), "ListFilesystemVersionsReq")
|
|
|
|
proto.RegisterType((*ListFilesystemVersionsRes)(nil), "ListFilesystemVersionsRes")
|
|
|
|
proto.RegisterType((*FilesystemVersion)(nil), "FilesystemVersion")
|
|
|
|
proto.RegisterType((*SendReq)(nil), "SendReq")
|
2020-06-27 23:53:33 +02:00
|
|
|
proto.RegisterType((*ReplicationConfig)(nil), "ReplicationConfig")
|
|
|
|
proto.RegisterType((*ReplicationConfigProtection)(nil), "ReplicationConfigProtection")
|
2018-12-11 22:01:50 +01:00
|
|
|
proto.RegisterType((*Property)(nil), "Property")
|
|
|
|
proto.RegisterType((*SendRes)(nil), "SendRes")
|
new features: {resumable,encrypted,hold-protected} send-recv, last-received-hold
- **Resumable Send & Recv Support**
No knobs required, automatically used where supported.
- **Hold-Protected Send & Recv**
Automatic ZFS holds to ensure that we can always resume a replication step.
- **Encrypted Send & Recv Support** for OpenZFS native encryption.
Configurable at the job level, i.e., for all filesystems a job is responsible for.
- **Receive-side hold on last received dataset**
The counterpart to the replication cursor bookmark on the send-side.
Ensures that incremental replication will always be possible between a sender and receiver.
Design Doc
----------
`replication/design.md` doc describes how we use ZFS holds and bookmarks to ensure that a single replication step is always resumable.
The replication algorithm described in the design doc introduces the notion of job IDs (please read the details on this design doc).
We reuse the job names for job IDs and use `JobID` type to ensure that a job name can be embedded into hold tags, bookmark names, etc.
This might BREAK CONFIG on upgrade.
Protocol Version Bump
---------------------
This commit makes backwards-incompatible changes to the replication/pdu protobufs.
Thus, bump the version number used in the protocol handshake.
Replication Cursor Format Change
--------------------------------
The new replication cursor bookmark format is: `#zrepl_CURSOR_G_${this.GUID}_J_${jobid}`
Including the GUID enables transaction-safe moving-forward of the cursor.
Including the job id enables that multiple sending jobs can send the same filesystem without interfering.
The `zrepl migrate replication-cursor:v1-v2` subcommand can be used to safely destroy old-format cursors once zrepl has created new-format cursors.
Changes in This Commit
----------------------
- package zfs
- infrastructure for holds
- infrastructure for resume token decoding
- implement a variant of OpenZFS's `entity_namecheck` and use it for validation in new code
- ZFSSendArgs to specify a ZFS send operation
- validation code protects against malicious resume tokens by checking that the token encodes the same send parameters that the send-side would use if no resume token were available (i.e. same filesystem, `fromguid`, `toguid`)
- RecvOptions support for `recv -s` flag
- convert a bunch of ZFS operations to be idempotent
- achieved through more differentiated error message scraping / additional pre-/post-checks
- package replication/pdu
- add field for encryption to send request messages
- add fields for resume handling to send & recv request messages
- receive requests now contain `FilesystemVersion To` in addition to the filesystem into which the stream should be `recv`d into
- can use `zfs recv $root_fs/$client_id/path/to/dataset@${To.Name}`, which enables additional validation after recv (i.e. whether `To.Guid` matched what we received in the stream)
- used to set `last-received-hold`
- package replication/logic
- introduce `PlannerPolicy` struct, currently only used to configure whether encrypted sends should be requested from the sender
- integrate encryption and resume token support into `Step` struct
- package endpoint
- move the concepts that endpoint builds on top of ZFS to a single file `endpoint/endpoint_zfs.go`
- step-holds + step-bookmarks
- last-received-hold
- new replication cursor + old replication cursor compat code
- adjust `endpoint/endpoint.go` handlers for
- encryption
- resumability
- new replication cursor
- last-received-hold
- client subcommand `zrepl holds list`: list all holds and hold-like bookmarks that zrepl thinks belong to it
- client subcommand `zrepl migrate replication-cursor:v1-v2`
2019-09-11 17:19:17 +02:00
|
|
|
proto.RegisterType((*SendCompletedReq)(nil), "SendCompletedReq")
|
|
|
|
proto.RegisterType((*SendCompletedRes)(nil), "SendCompletedRes")
|
2018-12-11 22:01:50 +01:00
|
|
|
proto.RegisterType((*ReceiveReq)(nil), "ReceiveReq")
|
|
|
|
proto.RegisterType((*ReceiveRes)(nil), "ReceiveRes")
|
|
|
|
proto.RegisterType((*DestroySnapshotsReq)(nil), "DestroySnapshotsReq")
|
|
|
|
proto.RegisterType((*DestroySnapshotRes)(nil), "DestroySnapshotRes")
|
|
|
|
proto.RegisterType((*DestroySnapshotsRes)(nil), "DestroySnapshotsRes")
|
|
|
|
proto.RegisterType((*ReplicationCursorReq)(nil), "ReplicationCursorReq")
|
|
|
|
proto.RegisterType((*ReplicationCursorRes)(nil), "ReplicationCursorRes")
|
2019-03-11 13:46:36 +01:00
|
|
|
proto.RegisterType((*PingReq)(nil), "PingReq")
|
|
|
|
proto.RegisterType((*PingRes)(nil), "PingRes")
|
new features: {resumable,encrypted,hold-protected} send-recv, last-received-hold
- **Resumable Send & Recv Support**
No knobs required, automatically used where supported.
- **Hold-Protected Send & Recv**
Automatic ZFS holds to ensure that we can always resume a replication step.
- **Encrypted Send & Recv Support** for OpenZFS native encryption.
Configurable at the job level, i.e., for all filesystems a job is responsible for.
- **Receive-side hold on last received dataset**
The counterpart to the replication cursor bookmark on the send-side.
Ensures that incremental replication will always be possible between a sender and receiver.
Design Doc
----------
`replication/design.md` doc describes how we use ZFS holds and bookmarks to ensure that a single replication step is always resumable.
The replication algorithm described in the design doc introduces the notion of job IDs (please read the details on this design doc).
We reuse the job names for job IDs and use `JobID` type to ensure that a job name can be embedded into hold tags, bookmark names, etc.
This might BREAK CONFIG on upgrade.
Protocol Version Bump
---------------------
This commit makes backwards-incompatible changes to the replication/pdu protobufs.
Thus, bump the version number used in the protocol handshake.
Replication Cursor Format Change
--------------------------------
The new replication cursor bookmark format is: `#zrepl_CURSOR_G_${this.GUID}_J_${jobid}`
Including the GUID enables transaction-safe moving-forward of the cursor.
Including the job id enables that multiple sending jobs can send the same filesystem without interfering.
The `zrepl migrate replication-cursor:v1-v2` subcommand can be used to safely destroy old-format cursors once zrepl has created new-format cursors.
Changes in This Commit
----------------------
- package zfs
- infrastructure for holds
- infrastructure for resume token decoding
- implement a variant of OpenZFS's `entity_namecheck` and use it for validation in new code
- ZFSSendArgs to specify a ZFS send operation
- validation code protects against malicious resume tokens by checking that the token encodes the same send parameters that the send-side would use if no resume token were available (i.e. same filesystem, `fromguid`, `toguid`)
- RecvOptions support for `recv -s` flag
- convert a bunch of ZFS operations to be idempotent
- achieved through more differentiated error message scraping / additional pre-/post-checks
- package replication/pdu
- add field for encryption to send request messages
- add fields for resume handling to send & recv request messages
- receive requests now contain `FilesystemVersion To` in addition to the filesystem into which the stream should be `recv`d into
- can use `zfs recv $root_fs/$client_id/path/to/dataset@${To.Name}`, which enables additional validation after recv (i.e. whether `To.Guid` matched what we received in the stream)
- used to set `last-received-hold`
- package replication/logic
- introduce `PlannerPolicy` struct, currently only used to configure whether encrypted sends should be requested from the sender
- integrate encryption and resume token support into `Step` struct
- package endpoint
- move the concepts that endpoint builds on top of ZFS to a single file `endpoint/endpoint_zfs.go`
- step-holds + step-bookmarks
- last-received-hold
- new replication cursor + old replication cursor compat code
- adjust `endpoint/endpoint.go` handlers for
- encryption
- resumability
- new replication cursor
- last-received-hold
- client subcommand `zrepl holds list`: list all holds and hold-like bookmarks that zrepl thinks belong to it
- client subcommand `zrepl migrate replication-cursor:v1-v2`
2019-09-11 17:19:17 +02:00
|
|
|
proto.RegisterEnum("Tri", Tri_name, Tri_value)
|
2020-06-27 23:53:33 +02:00
|
|
|
proto.RegisterEnum("ReplicationGuaranteeKind", ReplicationGuaranteeKind_name, ReplicationGuaranteeKind_value)
|
2018-12-11 22:01:50 +01:00
|
|
|
proto.RegisterEnum("FilesystemVersion_VersionType", FilesystemVersion_VersionType_name, FilesystemVersion_VersionType_value)
|
|
|
|
}
|
|
|
|
|
|
|
|
// 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
|
|
|
|
|
|
|
|
// ReplicationClient is the client API for Replication service.
|
|
|
|
//
|
|
|
|
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
|
|
|
type ReplicationClient interface {
|
2019-03-11 13:46:36 +01:00
|
|
|
Ping(ctx context.Context, in *PingReq, opts ...grpc.CallOption) (*PingRes, error)
|
2018-12-11 22:01:50 +01:00
|
|
|
ListFilesystems(ctx context.Context, in *ListFilesystemReq, opts ...grpc.CallOption) (*ListFilesystemRes, error)
|
|
|
|
ListFilesystemVersions(ctx context.Context, in *ListFilesystemVersionsReq, opts ...grpc.CallOption) (*ListFilesystemVersionsRes, error)
|
|
|
|
DestroySnapshots(ctx context.Context, in *DestroySnapshotsReq, opts ...grpc.CallOption) (*DestroySnapshotsRes, error)
|
|
|
|
ReplicationCursor(ctx context.Context, in *ReplicationCursorReq, opts ...grpc.CallOption) (*ReplicationCursorRes, error)
|
new features: {resumable,encrypted,hold-protected} send-recv, last-received-hold
- **Resumable Send & Recv Support**
No knobs required, automatically used where supported.
- **Hold-Protected Send & Recv**
Automatic ZFS holds to ensure that we can always resume a replication step.
- **Encrypted Send & Recv Support** for OpenZFS native encryption.
Configurable at the job level, i.e., for all filesystems a job is responsible for.
- **Receive-side hold on last received dataset**
The counterpart to the replication cursor bookmark on the send-side.
Ensures that incremental replication will always be possible between a sender and receiver.
Design Doc
----------
`replication/design.md` doc describes how we use ZFS holds and bookmarks to ensure that a single replication step is always resumable.
The replication algorithm described in the design doc introduces the notion of job IDs (please read the details on this design doc).
We reuse the job names for job IDs and use `JobID` type to ensure that a job name can be embedded into hold tags, bookmark names, etc.
This might BREAK CONFIG on upgrade.
Protocol Version Bump
---------------------
This commit makes backwards-incompatible changes to the replication/pdu protobufs.
Thus, bump the version number used in the protocol handshake.
Replication Cursor Format Change
--------------------------------
The new replication cursor bookmark format is: `#zrepl_CURSOR_G_${this.GUID}_J_${jobid}`
Including the GUID enables transaction-safe moving-forward of the cursor.
Including the job id enables that multiple sending jobs can send the same filesystem without interfering.
The `zrepl migrate replication-cursor:v1-v2` subcommand can be used to safely destroy old-format cursors once zrepl has created new-format cursors.
Changes in This Commit
----------------------
- package zfs
- infrastructure for holds
- infrastructure for resume token decoding
- implement a variant of OpenZFS's `entity_namecheck` and use it for validation in new code
- ZFSSendArgs to specify a ZFS send operation
- validation code protects against malicious resume tokens by checking that the token encodes the same send parameters that the send-side would use if no resume token were available (i.e. same filesystem, `fromguid`, `toguid`)
- RecvOptions support for `recv -s` flag
- convert a bunch of ZFS operations to be idempotent
- achieved through more differentiated error message scraping / additional pre-/post-checks
- package replication/pdu
- add field for encryption to send request messages
- add fields for resume handling to send & recv request messages
- receive requests now contain `FilesystemVersion To` in addition to the filesystem into which the stream should be `recv`d into
- can use `zfs recv $root_fs/$client_id/path/to/dataset@${To.Name}`, which enables additional validation after recv (i.e. whether `To.Guid` matched what we received in the stream)
- used to set `last-received-hold`
- package replication/logic
- introduce `PlannerPolicy` struct, currently only used to configure whether encrypted sends should be requested from the sender
- integrate encryption and resume token support into `Step` struct
- package endpoint
- move the concepts that endpoint builds on top of ZFS to a single file `endpoint/endpoint_zfs.go`
- step-holds + step-bookmarks
- last-received-hold
- new replication cursor + old replication cursor compat code
- adjust `endpoint/endpoint.go` handlers for
- encryption
- resumability
- new replication cursor
- last-received-hold
- client subcommand `zrepl holds list`: list all holds and hold-like bookmarks that zrepl thinks belong to it
- client subcommand `zrepl migrate replication-cursor:v1-v2`
2019-09-11 17:19:17 +02:00
|
|
|
SendCompleted(ctx context.Context, in *SendCompletedReq, opts ...grpc.CallOption) (*SendCompletedRes, error)
|
2018-12-11 22:01:50 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
type replicationClient struct {
|
|
|
|
cc *grpc.ClientConn
|
|
|
|
}
|
|
|
|
|
|
|
|
func NewReplicationClient(cc *grpc.ClientConn) ReplicationClient {
|
|
|
|
return &replicationClient{cc}
|
|
|
|
}
|
|
|
|
|
2019-03-11 13:46:36 +01:00
|
|
|
func (c *replicationClient) Ping(ctx context.Context, in *PingReq, opts ...grpc.CallOption) (*PingRes, error) {
|
|
|
|
out := new(PingRes)
|
|
|
|
err := c.cc.Invoke(ctx, "/Replication/Ping", in, out, opts...)
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return out, nil
|
|
|
|
}
|
|
|
|
|
2018-12-11 22:01:50 +01:00
|
|
|
func (c *replicationClient) ListFilesystems(ctx context.Context, in *ListFilesystemReq, opts ...grpc.CallOption) (*ListFilesystemRes, error) {
|
|
|
|
out := new(ListFilesystemRes)
|
|
|
|
err := c.cc.Invoke(ctx, "/Replication/ListFilesystems", in, out, opts...)
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return out, nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (c *replicationClient) ListFilesystemVersions(ctx context.Context, in *ListFilesystemVersionsReq, opts ...grpc.CallOption) (*ListFilesystemVersionsRes, error) {
|
|
|
|
out := new(ListFilesystemVersionsRes)
|
|
|
|
err := c.cc.Invoke(ctx, "/Replication/ListFilesystemVersions", in, out, opts...)
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return out, nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (c *replicationClient) DestroySnapshots(ctx context.Context, in *DestroySnapshotsReq, opts ...grpc.CallOption) (*DestroySnapshotsRes, error) {
|
|
|
|
out := new(DestroySnapshotsRes)
|
|
|
|
err := c.cc.Invoke(ctx, "/Replication/DestroySnapshots", in, out, opts...)
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return out, nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (c *replicationClient) ReplicationCursor(ctx context.Context, in *ReplicationCursorReq, opts ...grpc.CallOption) (*ReplicationCursorRes, error) {
|
|
|
|
out := new(ReplicationCursorRes)
|
|
|
|
err := c.cc.Invoke(ctx, "/Replication/ReplicationCursor", in, out, opts...)
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return out, nil
|
|
|
|
}
|
|
|
|
|
new features: {resumable,encrypted,hold-protected} send-recv, last-received-hold
- **Resumable Send & Recv Support**
No knobs required, automatically used where supported.
- **Hold-Protected Send & Recv**
Automatic ZFS holds to ensure that we can always resume a replication step.
- **Encrypted Send & Recv Support** for OpenZFS native encryption.
Configurable at the job level, i.e., for all filesystems a job is responsible for.
- **Receive-side hold on last received dataset**
The counterpart to the replication cursor bookmark on the send-side.
Ensures that incremental replication will always be possible between a sender and receiver.
Design Doc
----------
`replication/design.md` doc describes how we use ZFS holds and bookmarks to ensure that a single replication step is always resumable.
The replication algorithm described in the design doc introduces the notion of job IDs (please read the details on this design doc).
We reuse the job names for job IDs and use `JobID` type to ensure that a job name can be embedded into hold tags, bookmark names, etc.
This might BREAK CONFIG on upgrade.
Protocol Version Bump
---------------------
This commit makes backwards-incompatible changes to the replication/pdu protobufs.
Thus, bump the version number used in the protocol handshake.
Replication Cursor Format Change
--------------------------------
The new replication cursor bookmark format is: `#zrepl_CURSOR_G_${this.GUID}_J_${jobid}`
Including the GUID enables transaction-safe moving-forward of the cursor.
Including the job id enables that multiple sending jobs can send the same filesystem without interfering.
The `zrepl migrate replication-cursor:v1-v2` subcommand can be used to safely destroy old-format cursors once zrepl has created new-format cursors.
Changes in This Commit
----------------------
- package zfs
- infrastructure for holds
- infrastructure for resume token decoding
- implement a variant of OpenZFS's `entity_namecheck` and use it for validation in new code
- ZFSSendArgs to specify a ZFS send operation
- validation code protects against malicious resume tokens by checking that the token encodes the same send parameters that the send-side would use if no resume token were available (i.e. same filesystem, `fromguid`, `toguid`)
- RecvOptions support for `recv -s` flag
- convert a bunch of ZFS operations to be idempotent
- achieved through more differentiated error message scraping / additional pre-/post-checks
- package replication/pdu
- add field for encryption to send request messages
- add fields for resume handling to send & recv request messages
- receive requests now contain `FilesystemVersion To` in addition to the filesystem into which the stream should be `recv`d into
- can use `zfs recv $root_fs/$client_id/path/to/dataset@${To.Name}`, which enables additional validation after recv (i.e. whether `To.Guid` matched what we received in the stream)
- used to set `last-received-hold`
- package replication/logic
- introduce `PlannerPolicy` struct, currently only used to configure whether encrypted sends should be requested from the sender
- integrate encryption and resume token support into `Step` struct
- package endpoint
- move the concepts that endpoint builds on top of ZFS to a single file `endpoint/endpoint_zfs.go`
- step-holds + step-bookmarks
- last-received-hold
- new replication cursor + old replication cursor compat code
- adjust `endpoint/endpoint.go` handlers for
- encryption
- resumability
- new replication cursor
- last-received-hold
- client subcommand `zrepl holds list`: list all holds and hold-like bookmarks that zrepl thinks belong to it
- client subcommand `zrepl migrate replication-cursor:v1-v2`
2019-09-11 17:19:17 +02:00
|
|
|
func (c *replicationClient) SendCompleted(ctx context.Context, in *SendCompletedReq, opts ...grpc.CallOption) (*SendCompletedRes, error) {
|
|
|
|
out := new(SendCompletedRes)
|
|
|
|
err := c.cc.Invoke(ctx, "/Replication/SendCompleted", in, out, opts...)
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return out, nil
|
|
|
|
}
|
|
|
|
|
2018-12-11 22:01:50 +01:00
|
|
|
// ReplicationServer is the server API for Replication service.
|
|
|
|
type ReplicationServer interface {
|
2019-03-11 13:46:36 +01:00
|
|
|
Ping(context.Context, *PingReq) (*PingRes, error)
|
2018-12-11 22:01:50 +01:00
|
|
|
ListFilesystems(context.Context, *ListFilesystemReq) (*ListFilesystemRes, error)
|
|
|
|
ListFilesystemVersions(context.Context, *ListFilesystemVersionsReq) (*ListFilesystemVersionsRes, error)
|
|
|
|
DestroySnapshots(context.Context, *DestroySnapshotsReq) (*DestroySnapshotsRes, error)
|
|
|
|
ReplicationCursor(context.Context, *ReplicationCursorReq) (*ReplicationCursorRes, error)
|
new features: {resumable,encrypted,hold-protected} send-recv, last-received-hold
- **Resumable Send & Recv Support**
No knobs required, automatically used where supported.
- **Hold-Protected Send & Recv**
Automatic ZFS holds to ensure that we can always resume a replication step.
- **Encrypted Send & Recv Support** for OpenZFS native encryption.
Configurable at the job level, i.e., for all filesystems a job is responsible for.
- **Receive-side hold on last received dataset**
The counterpart to the replication cursor bookmark on the send-side.
Ensures that incremental replication will always be possible between a sender and receiver.
Design Doc
----------
`replication/design.md` doc describes how we use ZFS holds and bookmarks to ensure that a single replication step is always resumable.
The replication algorithm described in the design doc introduces the notion of job IDs (please read the details on this design doc).
We reuse the job names for job IDs and use `JobID` type to ensure that a job name can be embedded into hold tags, bookmark names, etc.
This might BREAK CONFIG on upgrade.
Protocol Version Bump
---------------------
This commit makes backwards-incompatible changes to the replication/pdu protobufs.
Thus, bump the version number used in the protocol handshake.
Replication Cursor Format Change
--------------------------------
The new replication cursor bookmark format is: `#zrepl_CURSOR_G_${this.GUID}_J_${jobid}`
Including the GUID enables transaction-safe moving-forward of the cursor.
Including the job id enables that multiple sending jobs can send the same filesystem without interfering.
The `zrepl migrate replication-cursor:v1-v2` subcommand can be used to safely destroy old-format cursors once zrepl has created new-format cursors.
Changes in This Commit
----------------------
- package zfs
- infrastructure for holds
- infrastructure for resume token decoding
- implement a variant of OpenZFS's `entity_namecheck` and use it for validation in new code
- ZFSSendArgs to specify a ZFS send operation
- validation code protects against malicious resume tokens by checking that the token encodes the same send parameters that the send-side would use if no resume token were available (i.e. same filesystem, `fromguid`, `toguid`)
- RecvOptions support for `recv -s` flag
- convert a bunch of ZFS operations to be idempotent
- achieved through more differentiated error message scraping / additional pre-/post-checks
- package replication/pdu
- add field for encryption to send request messages
- add fields for resume handling to send & recv request messages
- receive requests now contain `FilesystemVersion To` in addition to the filesystem into which the stream should be `recv`d into
- can use `zfs recv $root_fs/$client_id/path/to/dataset@${To.Name}`, which enables additional validation after recv (i.e. whether `To.Guid` matched what we received in the stream)
- used to set `last-received-hold`
- package replication/logic
- introduce `PlannerPolicy` struct, currently only used to configure whether encrypted sends should be requested from the sender
- integrate encryption and resume token support into `Step` struct
- package endpoint
- move the concepts that endpoint builds on top of ZFS to a single file `endpoint/endpoint_zfs.go`
- step-holds + step-bookmarks
- last-received-hold
- new replication cursor + old replication cursor compat code
- adjust `endpoint/endpoint.go` handlers for
- encryption
- resumability
- new replication cursor
- last-received-hold
- client subcommand `zrepl holds list`: list all holds and hold-like bookmarks that zrepl thinks belong to it
- client subcommand `zrepl migrate replication-cursor:v1-v2`
2019-09-11 17:19:17 +02:00
|
|
|
SendCompleted(context.Context, *SendCompletedReq) (*SendCompletedRes, error)
|
2018-12-11 22:01:50 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
func RegisterReplicationServer(s *grpc.Server, srv ReplicationServer) {
|
|
|
|
s.RegisterService(&_Replication_serviceDesc, srv)
|
|
|
|
}
|
|
|
|
|
2019-03-11 13:46:36 +01:00
|
|
|
func _Replication_Ping_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
|
in := new(PingReq)
|
|
|
|
if err := dec(in); err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
if interceptor == nil {
|
|
|
|
return srv.(ReplicationServer).Ping(ctx, in)
|
|
|
|
}
|
|
|
|
info := &grpc.UnaryServerInfo{
|
|
|
|
Server: srv,
|
|
|
|
FullMethod: "/Replication/Ping",
|
|
|
|
}
|
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
|
return srv.(ReplicationServer).Ping(ctx, req.(*PingReq))
|
|
|
|
}
|
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
|
}
|
|
|
|
|
2018-12-11 22:01:50 +01:00
|
|
|
func _Replication_ListFilesystems_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
|
in := new(ListFilesystemReq)
|
|
|
|
if err := dec(in); err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
if interceptor == nil {
|
|
|
|
return srv.(ReplicationServer).ListFilesystems(ctx, in)
|
|
|
|
}
|
|
|
|
info := &grpc.UnaryServerInfo{
|
|
|
|
Server: srv,
|
|
|
|
FullMethod: "/Replication/ListFilesystems",
|
|
|
|
}
|
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
|
return srv.(ReplicationServer).ListFilesystems(ctx, req.(*ListFilesystemReq))
|
|
|
|
}
|
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
|
}
|
|
|
|
|
|
|
|
func _Replication_ListFilesystemVersions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
|
in := new(ListFilesystemVersionsReq)
|
|
|
|
if err := dec(in); err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
if interceptor == nil {
|
|
|
|
return srv.(ReplicationServer).ListFilesystemVersions(ctx, in)
|
|
|
|
}
|
|
|
|
info := &grpc.UnaryServerInfo{
|
|
|
|
Server: srv,
|
|
|
|
FullMethod: "/Replication/ListFilesystemVersions",
|
|
|
|
}
|
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
|
return srv.(ReplicationServer).ListFilesystemVersions(ctx, req.(*ListFilesystemVersionsReq))
|
|
|
|
}
|
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
|
}
|
|
|
|
|
|
|
|
func _Replication_DestroySnapshots_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
|
in := new(DestroySnapshotsReq)
|
|
|
|
if err := dec(in); err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
if interceptor == nil {
|
|
|
|
return srv.(ReplicationServer).DestroySnapshots(ctx, in)
|
|
|
|
}
|
|
|
|
info := &grpc.UnaryServerInfo{
|
|
|
|
Server: srv,
|
|
|
|
FullMethod: "/Replication/DestroySnapshots",
|
|
|
|
}
|
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
|
return srv.(ReplicationServer).DestroySnapshots(ctx, req.(*DestroySnapshotsReq))
|
|
|
|
}
|
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
|
}
|
|
|
|
|
|
|
|
func _Replication_ReplicationCursor_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
|
in := new(ReplicationCursorReq)
|
|
|
|
if err := dec(in); err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
if interceptor == nil {
|
|
|
|
return srv.(ReplicationServer).ReplicationCursor(ctx, in)
|
|
|
|
}
|
|
|
|
info := &grpc.UnaryServerInfo{
|
|
|
|
Server: srv,
|
|
|
|
FullMethod: "/Replication/ReplicationCursor",
|
|
|
|
}
|
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
|
return srv.(ReplicationServer).ReplicationCursor(ctx, req.(*ReplicationCursorReq))
|
|
|
|
}
|
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
|
}
|
|
|
|
|
new features: {resumable,encrypted,hold-protected} send-recv, last-received-hold
- **Resumable Send & Recv Support**
No knobs required, automatically used where supported.
- **Hold-Protected Send & Recv**
Automatic ZFS holds to ensure that we can always resume a replication step.
- **Encrypted Send & Recv Support** for OpenZFS native encryption.
Configurable at the job level, i.e., for all filesystems a job is responsible for.
- **Receive-side hold on last received dataset**
The counterpart to the replication cursor bookmark on the send-side.
Ensures that incremental replication will always be possible between a sender and receiver.
Design Doc
----------
`replication/design.md` doc describes how we use ZFS holds and bookmarks to ensure that a single replication step is always resumable.
The replication algorithm described in the design doc introduces the notion of job IDs (please read the details on this design doc).
We reuse the job names for job IDs and use `JobID` type to ensure that a job name can be embedded into hold tags, bookmark names, etc.
This might BREAK CONFIG on upgrade.
Protocol Version Bump
---------------------
This commit makes backwards-incompatible changes to the replication/pdu protobufs.
Thus, bump the version number used in the protocol handshake.
Replication Cursor Format Change
--------------------------------
The new replication cursor bookmark format is: `#zrepl_CURSOR_G_${this.GUID}_J_${jobid}`
Including the GUID enables transaction-safe moving-forward of the cursor.
Including the job id enables that multiple sending jobs can send the same filesystem without interfering.
The `zrepl migrate replication-cursor:v1-v2` subcommand can be used to safely destroy old-format cursors once zrepl has created new-format cursors.
Changes in This Commit
----------------------
- package zfs
- infrastructure for holds
- infrastructure for resume token decoding
- implement a variant of OpenZFS's `entity_namecheck` and use it for validation in new code
- ZFSSendArgs to specify a ZFS send operation
- validation code protects against malicious resume tokens by checking that the token encodes the same send parameters that the send-side would use if no resume token were available (i.e. same filesystem, `fromguid`, `toguid`)
- RecvOptions support for `recv -s` flag
- convert a bunch of ZFS operations to be idempotent
- achieved through more differentiated error message scraping / additional pre-/post-checks
- package replication/pdu
- add field for encryption to send request messages
- add fields for resume handling to send & recv request messages
- receive requests now contain `FilesystemVersion To` in addition to the filesystem into which the stream should be `recv`d into
- can use `zfs recv $root_fs/$client_id/path/to/dataset@${To.Name}`, which enables additional validation after recv (i.e. whether `To.Guid` matched what we received in the stream)
- used to set `last-received-hold`
- package replication/logic
- introduce `PlannerPolicy` struct, currently only used to configure whether encrypted sends should be requested from the sender
- integrate encryption and resume token support into `Step` struct
- package endpoint
- move the concepts that endpoint builds on top of ZFS to a single file `endpoint/endpoint_zfs.go`
- step-holds + step-bookmarks
- last-received-hold
- new replication cursor + old replication cursor compat code
- adjust `endpoint/endpoint.go` handlers for
- encryption
- resumability
- new replication cursor
- last-received-hold
- client subcommand `zrepl holds list`: list all holds and hold-like bookmarks that zrepl thinks belong to it
- client subcommand `zrepl migrate replication-cursor:v1-v2`
2019-09-11 17:19:17 +02:00
|
|
|
func _Replication_SendCompleted_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
|
in := new(SendCompletedReq)
|
|
|
|
if err := dec(in); err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
if interceptor == nil {
|
|
|
|
return srv.(ReplicationServer).SendCompleted(ctx, in)
|
|
|
|
}
|
|
|
|
info := &grpc.UnaryServerInfo{
|
|
|
|
Server: srv,
|
|
|
|
FullMethod: "/Replication/SendCompleted",
|
|
|
|
}
|
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
|
return srv.(ReplicationServer).SendCompleted(ctx, req.(*SendCompletedReq))
|
|
|
|
}
|
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
|
}
|
|
|
|
|
2018-12-11 22:01:50 +01:00
|
|
|
var _Replication_serviceDesc = grpc.ServiceDesc{
|
|
|
|
ServiceName: "Replication",
|
|
|
|
HandlerType: (*ReplicationServer)(nil),
|
|
|
|
Methods: []grpc.MethodDesc{
|
2019-03-11 13:46:36 +01:00
|
|
|
{
|
|
|
|
MethodName: "Ping",
|
|
|
|
Handler: _Replication_Ping_Handler,
|
|
|
|
},
|
2018-12-11 22:01:50 +01:00
|
|
|
{
|
|
|
|
MethodName: "ListFilesystems",
|
|
|
|
Handler: _Replication_ListFilesystems_Handler,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
MethodName: "ListFilesystemVersions",
|
|
|
|
Handler: _Replication_ListFilesystemVersions_Handler,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
MethodName: "DestroySnapshots",
|
|
|
|
Handler: _Replication_DestroySnapshots_Handler,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
MethodName: "ReplicationCursor",
|
|
|
|
Handler: _Replication_ReplicationCursor_Handler,
|
|
|
|
},
|
new features: {resumable,encrypted,hold-protected} send-recv, last-received-hold
- **Resumable Send & Recv Support**
No knobs required, automatically used where supported.
- **Hold-Protected Send & Recv**
Automatic ZFS holds to ensure that we can always resume a replication step.
- **Encrypted Send & Recv Support** for OpenZFS native encryption.
Configurable at the job level, i.e., for all filesystems a job is responsible for.
- **Receive-side hold on last received dataset**
The counterpart to the replication cursor bookmark on the send-side.
Ensures that incremental replication will always be possible between a sender and receiver.
Design Doc
----------
`replication/design.md` doc describes how we use ZFS holds and bookmarks to ensure that a single replication step is always resumable.
The replication algorithm described in the design doc introduces the notion of job IDs (please read the details on this design doc).
We reuse the job names for job IDs and use `JobID` type to ensure that a job name can be embedded into hold tags, bookmark names, etc.
This might BREAK CONFIG on upgrade.
Protocol Version Bump
---------------------
This commit makes backwards-incompatible changes to the replication/pdu protobufs.
Thus, bump the version number used in the protocol handshake.
Replication Cursor Format Change
--------------------------------
The new replication cursor bookmark format is: `#zrepl_CURSOR_G_${this.GUID}_J_${jobid}`
Including the GUID enables transaction-safe moving-forward of the cursor.
Including the job id enables that multiple sending jobs can send the same filesystem without interfering.
The `zrepl migrate replication-cursor:v1-v2` subcommand can be used to safely destroy old-format cursors once zrepl has created new-format cursors.
Changes in This Commit
----------------------
- package zfs
- infrastructure for holds
- infrastructure for resume token decoding
- implement a variant of OpenZFS's `entity_namecheck` and use it for validation in new code
- ZFSSendArgs to specify a ZFS send operation
- validation code protects against malicious resume tokens by checking that the token encodes the same send parameters that the send-side would use if no resume token were available (i.e. same filesystem, `fromguid`, `toguid`)
- RecvOptions support for `recv -s` flag
- convert a bunch of ZFS operations to be idempotent
- achieved through more differentiated error message scraping / additional pre-/post-checks
- package replication/pdu
- add field for encryption to send request messages
- add fields for resume handling to send & recv request messages
- receive requests now contain `FilesystemVersion To` in addition to the filesystem into which the stream should be `recv`d into
- can use `zfs recv $root_fs/$client_id/path/to/dataset@${To.Name}`, which enables additional validation after recv (i.e. whether `To.Guid` matched what we received in the stream)
- used to set `last-received-hold`
- package replication/logic
- introduce `PlannerPolicy` struct, currently only used to configure whether encrypted sends should be requested from the sender
- integrate encryption and resume token support into `Step` struct
- package endpoint
- move the concepts that endpoint builds on top of ZFS to a single file `endpoint/endpoint_zfs.go`
- step-holds + step-bookmarks
- last-received-hold
- new replication cursor + old replication cursor compat code
- adjust `endpoint/endpoint.go` handlers for
- encryption
- resumability
- new replication cursor
- last-received-hold
- client subcommand `zrepl holds list`: list all holds and hold-like bookmarks that zrepl thinks belong to it
- client subcommand `zrepl migrate replication-cursor:v1-v2`
2019-09-11 17:19:17 +02:00
|
|
|
{
|
|
|
|
MethodName: "SendCompleted",
|
|
|
|
Handler: _Replication_SendCompleted_Handler,
|
|
|
|
},
|
2018-12-11 22:01:50 +01:00
|
|
|
},
|
|
|
|
Streams: []grpc.StreamDesc{},
|
|
|
|
Metadata: "pdu.proto",
|
|
|
|
}
|
|
|
|
|
2020-06-27 23:53:33 +02:00
|
|
|
func init() { proto.RegisterFile("pdu.proto", fileDescriptor_pdu_616c27178643eca4) }
|
|
|
|
|
|
|
|
var fileDescriptor_pdu_616c27178643eca4 = []byte{
|
|
|
|
// 995 bytes of a gzipped FileDescriptorProto
|
|
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x56, 0xcf, 0x6e, 0xdb, 0xc6,
|
|
|
|
0x13, 0x36, 0x25, 0xda, 0xa2, 0x46, 0xce, 0x2f, 0xf4, 0xd8, 0x09, 0x68, 0xfd, 0xd2, 0xd4, 0xd8,
|
|
|
|
0x14, 0x85, 0x63, 0xa0, 0x44, 0xe1, 0xb4, 0x05, 0x8a, 0x14, 0x41, 0xeb, 0xbf, 0x31, 0xd2, 0xba,
|
|
|
|
0xea, 0x5a, 0x0d, 0x8a, 0xdc, 0x18, 0x69, 0x2a, 0x2f, 0x4c, 0x71, 0xe9, 0x5d, 0x2a, 0x88, 0x7a,
|
|
|
|
0xec, 0xa1, 0x87, 0x5e, 0x7a, 0xea, 0xeb, 0xf4, 0x29, 0xfa, 0x20, 0x7d, 0x84, 0x82, 0x6b, 0x92,
|
|
|
|
0xa2, 0x44, 0xca, 0x70, 0x4f, 0xda, 0xf9, 0xe6, 0xdb, 0xd9, 0xd9, 0xd1, 0x37, 0xb3, 0x84, 0x76,
|
|
|
|
0x3c, 0x9c, 0xf8, 0xb1, 0x92, 0x89, 0x64, 0x9b, 0xb0, 0xf1, 0xad, 0xd0, 0xc9, 0x89, 0x08, 0x49,
|
|
|
|
0x4f, 0x75, 0x42, 0x63, 0x4e, 0xd7, 0xec, 0xa0, 0x0a, 0x6a, 0xfc, 0x04, 0x3a, 0x33, 0x40, 0x7b,
|
|
|
|
0xd6, 0x4e, 0x73, 0xb7, 0xb3, 0xdf, 0xf1, 0x4b, 0xa4, 0xb2, 0x9f, 0xfd, 0x6e, 0x01, 0xcc, 0x6c,
|
|
|
|
0x44, 0xb0, 0x7b, 0x41, 0x72, 0xe9, 0x59, 0x3b, 0xd6, 0x6e, 0x9b, 0x9b, 0x35, 0xee, 0x40, 0x87,
|
|
|
|
0x93, 0x9e, 0x8c, 0xa9, 0x2f, 0xaf, 0x28, 0xf2, 0x1a, 0xc6, 0x55, 0x86, 0xf0, 0x23, 0xb8, 0x77,
|
|
|
|
0xa6, 0x7b, 0x61, 0x30, 0xa0, 0x4b, 0x19, 0x0e, 0x49, 0x79, 0xcd, 0x1d, 0x6b, 0xd7, 0xe1, 0xf3,
|
|
|
|
0x60, 0x1a, 0xe7, 0x4c, 0x1f, 0x47, 0x03, 0x35, 0x8d, 0x13, 0x1a, 0x7a, 0xb6, 0xe1, 0x94, 0x21,
|
|
|
|
0xf6, 0x1c, 0xb6, 0xe7, 0x2f, 0xf4, 0x9a, 0x94, 0x16, 0x32, 0xd2, 0x9c, 0xae, 0xf1, 0x71, 0x39,
|
|
|
|
0xd1, 0x2c, 0xc1, 0x12, 0xc2, 0x5e, 0x2d, 0xdf, 0xac, 0xd1, 0x07, 0x27, 0x37, 0xb3, 0x92, 0xa0,
|
|
|
|
0x5f, 0x61, 0xf2, 0x82, 0xc3, 0xfe, 0xb6, 0x60, 0xa3, 0xe2, 0xc7, 0x7d, 0xb0, 0xfb, 0xd3, 0x98,
|
|
|
|
0xcc, 0xe1, 0xff, 0xdb, 0x7f, 0x5c, 0x8d, 0xe0, 0x67, 0xbf, 0x29, 0x8b, 0x1b, 0x6e, 0x5a, 0xd1,
|
|
|
|
0xf3, 0x60, 0x4c, 0x59, 0xd9, 0xcc, 0x3a, 0xc5, 0x4e, 0x27, 0x62, 0x68, 0xca, 0x64, 0x73, 0xb3,
|
|
|
|
0xc6, 0x47, 0xd0, 0x3e, 0x54, 0x14, 0x24, 0xd4, 0xff, 0xe9, 0xd4, 0xd4, 0xc6, 0xe6, 0x33, 0x00,
|
|
|
|
0xbb, 0xe0, 0x18, 0x43, 0xc8, 0xc8, 0x5b, 0x35, 0x91, 0x0a, 0x9b, 0x3d, 0x85, 0x4e, 0xe9, 0x58,
|
|
|
|
0x5c, 0x07, 0xe7, 0x22, 0x0a, 0x62, 0x7d, 0x29, 0x13, 0x77, 0x25, 0xb5, 0x0e, 0xa4, 0xbc, 0x1a,
|
|
|
|
0x07, 0xea, 0xca, 0xb5, 0xd8, 0x9f, 0x0d, 0x68, 0x5d, 0x50, 0x34, 0xbc, 0x43, 0x3d, 0xf1, 0x63,
|
|
|
|
0xb0, 0x4f, 0x94, 0x1c, 0x9b, 0xc4, 0xeb, 0xcb, 0x65, 0xfc, 0xc8, 0xa0, 0xd1, 0x97, 0xe6, 0x2a,
|
|
|
|
0xf5, 0xac, 0x46, 0x5f, 0x2e, 0x4a, 0xc8, 0xae, 0x4a, 0x88, 0x41, 0x7b, 0x26, 0x8d, 0x55, 0x53,
|
|
|
|
0x5f, 0xdb, 0xef, 0x2b, 0xc1, 0x67, 0x30, 0x3e, 0x84, 0xb5, 0x23, 0x35, 0xe5, 0x93, 0xc8, 0x5b,
|
|
|
|
0x33, 0xda, 0xc9, 0x2c, 0xfc, 0x1a, 0x36, 0x38, 0xc5, 0xa1, 0x18, 0x98, 0x7a, 0x1c, 0xca, 0xe8,
|
|
|
|
0x67, 0x31, 0xf2, 0x5a, 0x59, 0x42, 0x15, 0x0f, 0xaf, 0x92, 0xd9, 0x0f, 0x35, 0x11, 0xf0, 0x2b,
|
|
|
|
0x80, 0xb4, 0xf9, 0x68, 0x60, 0xaa, 0x6e, 0x99, 0x78, 0x8f, 0xaa, 0xf1, 0x7a, 0x05, 0x87, 0x97,
|
|
|
|
0xf8, 0xec, 0x0f, 0x0b, 0xfe, 0x7f, 0x0b, 0x17, 0x9f, 0x41, 0xeb, 0x2c, 0x12, 0x89, 0x08, 0xc2,
|
|
|
|
0x4c, 0x4e, 0xdb, 0xe5, 0xd0, 0xa7, 0x93, 0x40, 0x05, 0x51, 0x42, 0xf4, 0x4a, 0x44, 0x43, 0x9e,
|
|
|
|
0x33, 0xf1, 0x39, 0x74, 0xce, 0xa2, 0x81, 0xa2, 0x31, 0x45, 0x49, 0x10, 0x9a, 0xbf, 0xe6, 0xd6,
|
|
|
|
0x8d, 0x65, 0x36, 0xfb, 0x0c, 0x9c, 0x9e, 0x92, 0x31, 0xa9, 0x64, 0x5a, 0xa8, 0xd2, 0x2a, 0xa9,
|
|
|
|
0x72, 0x0b, 0x56, 0x5f, 0x07, 0xe1, 0x24, 0x97, 0xea, 0x8d, 0xc1, 0x7e, 0xb5, 0x72, 0xc9, 0x68,
|
|
|
|
0xdc, 0x85, 0xfb, 0x3f, 0x6a, 0x1a, 0x2e, 0x4e, 0x03, 0x87, 0x2f, 0xc2, 0xc8, 0x60, 0xfd, 0xf8,
|
|
|
|
0x7d, 0x4c, 0x83, 0x84, 0x86, 0x17, 0xe2, 0x17, 0x32, 0xf2, 0x68, 0xf2, 0x39, 0x0c, 0x9f, 0x02,
|
|
|
|
0x64, 0xf9, 0x08, 0xd2, 0x9e, 0x6d, 0xba, 0xb2, 0xed, 0xe7, 0x29, 0xf2, 0x92, 0x93, 0xbd, 0x00,
|
|
|
|
0x37, 0xcd, 0xe1, 0x50, 0x8e, 0xe3, 0x90, 0x12, 0x32, 0xfa, 0xdd, 0x83, 0xce, 0xf7, 0x4a, 0x8c,
|
|
|
|
0x44, 0x14, 0x84, 0x9c, 0xae, 0x33, 0x99, 0x3a, 0x7e, 0x26, 0x6f, 0x5e, 0x76, 0x32, 0xac, 0xec,
|
|
|
|
0xd7, 0xec, 0x2f, 0x0b, 0x80, 0xd3, 0x80, 0xc4, 0x3b, 0xba, 0x4b, 0x3b, 0xdc, 0xc8, 0xbc, 0x71,
|
|
|
|
0xab, 0xcc, 0xf7, 0xc0, 0x3d, 0x0c, 0x29, 0x50, 0xe5, 0x02, 0xdd, 0x8c, 0xc2, 0x0a, 0x5e, 0x2f,
|
|
|
|
0x5a, 0xfb, 0xbf, 0x88, 0x76, 0xbd, 0x94, 0xbf, 0x66, 0x23, 0xd8, 0x3c, 0x22, 0x9d, 0x28, 0x39,
|
|
|
|
0xcd, 0xbb, 0xff, 0x2e, 0x53, 0x13, 0x3f, 0x85, 0x76, 0xc1, 0xf7, 0x1a, 0x4b, 0x27, 0xe3, 0x8c,
|
|
|
|
0xc4, 0xde, 0x00, 0x2e, 0x1c, 0x94, 0x0d, 0xd8, 0xdc, 0xcc, 0x5a, 0xa5, 0x76, 0xc0, 0xe6, 0x9c,
|
|
|
|
0x54, 0x6c, 0xc7, 0x4a, 0x49, 0x95, 0x8b, 0xcd, 0x18, 0xec, 0xa8, 0xee, 0x12, 0xe9, 0x9b, 0xd6,
|
|
|
|
0x4a, 0x4b, 0x17, 0x26, 0xf9, 0xf0, 0xde, 0xf4, 0xab, 0x29, 0xf0, 0x9c, 0xc3, 0xbe, 0x80, 0xad,
|
|
|
|
0x72, 0xb5, 0x26, 0x4a, 0x4b, 0x75, 0x97, 0x17, 0xa4, 0x5f, 0xbb, 0x4f, 0xe3, 0x56, 0x36, 0xae,
|
|
|
|
0xd3, 0x1d, 0xf6, 0xcb, 0x95, 0x62, 0x60, 0x3b, 0xe7, 0x32, 0xa1, 0xf7, 0x42, 0x27, 0x37, 0x5d,
|
|
|
|
0xf0, 0x72, 0x85, 0x17, 0xc8, 0x81, 0x03, 0x6b, 0x37, 0xe9, 0xb0, 0x27, 0xd0, 0xea, 0x89, 0x68,
|
|
|
|
0x94, 0x26, 0xe0, 0x41, 0xeb, 0x3b, 0xd2, 0x3a, 0x18, 0xe5, 0x8d, 0x97, 0x9b, 0xec, 0x83, 0x9c,
|
|
|
|
0xa4, 0xd3, 0xd6, 0x3c, 0x1e, 0x5c, 0xca, 0xbc, 0x35, 0xd3, 0xf5, 0xde, 0x2e, 0x34, 0xfb, 0x4a,
|
|
|
|
0xa4, 0xc3, 0xfc, 0x48, 0x46, 0xc9, 0x61, 0xa0, 0xc8, 0x5d, 0xc1, 0x36, 0xac, 0x9e, 0x04, 0xa1,
|
|
|
|
0x26, 0xd7, 0x42, 0x07, 0xec, 0xbe, 0x9a, 0x90, 0xdb, 0xd8, 0xfb, 0xcd, 0x02, 0x6f, 0xd9, 0x38,
|
|
|
|
0xc0, 0x2d, 0x70, 0x0b, 0xe0, 0x2c, 0x7a, 0x17, 0x84, 0x62, 0xe8, 0xae, 0xe0, 0x36, 0x3c, 0x28,
|
|
|
|
0x50, 0xa3, 0xd0, 0xe0, 0xad, 0x08, 0x45, 0x32, 0x75, 0x2d, 0x7c, 0x02, 0x1f, 0x96, 0x36, 0x14,
|
|
|
|
0xa3, 0xa4, 0x74, 0x80, 0xdb, 0x98, 0x8b, 0x7a, 0x2e, 0x93, 0x4b, 0x11, 0x8d, 0xdc, 0xe6, 0xfe,
|
|
|
|
0x3f, 0x8d, 0x74, 0xe6, 0x17, 0x3c, 0xec, 0x82, 0x9d, 0xde, 0x10, 0x1d, 0x3f, 0xab, 0x46, 0x37,
|
|
|
|
0x5f, 0x69, 0xfc, 0x12, 0xee, 0xcf, 0x3f, 0xdd, 0x1a, 0xd1, 0xaf, 0x7c, 0xef, 0x74, 0xab, 0x98,
|
|
|
|
0xc6, 0x1e, 0x3c, 0xac, 0x7f, 0xf5, 0xb1, 0xeb, 0x2f, 0xfd, 0x96, 0xe8, 0x2e, 0xf7, 0x69, 0x7c,
|
|
|
|
0x01, 0xee, 0xa2, 0x06, 0x71, 0xcb, 0xaf, 0xe9, 0xad, 0x6e, 0x1d, 0xaa, 0xf1, 0x9b, 0xf9, 0xc6,
|
|
|
|
0x36, 0x2a, 0xc2, 0x07, 0x7e, 0x9d, 0x22, 0xbb, 0xb5, 0xb0, 0xc6, 0xcf, 0xe1, 0xde, 0xdc, 0xb8,
|
|
|
|
0xc2, 0x0d, 0x7f, 0x71, 0xfc, 0x75, 0x2b, 0x90, 0x3e, 0x58, 0x7d, 0xd3, 0x8c, 0x87, 0x93, 0xb7,
|
|
|
|
0x6b, 0xe6, 0x93, 0xf1, 0xd9, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x7e, 0xa4, 0xfb, 0xca, 0x3f,
|
|
|
|
0x0a, 0x00, 0x00,
|
2018-06-20 20:20:37 +02:00
|
|
|
}
|