2019-09-03 14:45:18 +02:00
|
|
|
module github.com/zrepl/zrepl
|
|
|
|
|
|
|
|
go 1.12
|
|
|
|
|
|
|
|
require (
|
|
|
|
github.com/fatih/color v1.7.0
|
|
|
|
github.com/gdamore/tcell v1.2.0
|
2020-03-27 20:37:17 +01:00
|
|
|
github.com/gdamore/tcell/v2 v2.2.0
|
2020-04-11 15:49:41 +02:00
|
|
|
github.com/gitchander/permutation v0.0.0-20181107151852-9e56b92e9909
|
2019-10-26 13:55:03 +02:00
|
|
|
github.com/go-logfmt/logfmt v0.4.0
|
2021-02-28 23:33:28 +01:00
|
|
|
github.com/go-playground/validator v9.31.0+incompatible
|
2020-03-27 20:37:17 +01:00
|
|
|
github.com/go-playground/validator/v10 v10.4.1
|
2019-07-26 21:12:21 +02:00
|
|
|
github.com/go-sql-driver/mysql v1.4.1-0.20190907122137-b2c03bcae3d4
|
2021-01-24 23:31:45 +01:00
|
|
|
github.com/golang/protobuf v1.4.3
|
|
|
|
github.com/google/uuid v1.1.2
|
2019-09-03 14:45:18 +02:00
|
|
|
github.com/jinzhu/copier v0.0.0-20170922082739-db4671f3a9b8
|
2021-07-09 16:30:44 +02:00
|
|
|
github.com/juju/ratelimit v1.0.1
|
2022-05-07 21:58:17 +02:00
|
|
|
github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88 // indirect
|
2019-09-03 14:45:18 +02:00
|
|
|
github.com/kr/pretty v0.1.0
|
2021-02-28 23:33:28 +01:00
|
|
|
github.com/leodido/go-urn v1.2.1 // indirect
|
2019-07-26 21:12:21 +02:00
|
|
|
github.com/lib/pq v1.2.0
|
2019-10-26 14:32:07 +02:00
|
|
|
github.com/mattn/go-colorable v0.1.4 // indirect
|
|
|
|
github.com/mattn/go-isatty v0.0.8
|
2019-09-03 14:45:18 +02:00
|
|
|
github.com/montanaflynn/stats v0.5.0
|
2019-10-26 14:32:07 +02:00
|
|
|
github.com/onsi/ginkgo v1.10.2 // indirect
|
|
|
|
github.com/onsi/gomega v1.7.0 // indirect
|
2019-10-26 13:55:03 +02:00
|
|
|
github.com/pkg/errors v0.8.1
|
2019-09-03 14:45:18 +02:00
|
|
|
github.com/pkg/profile v1.2.1
|
2020-06-01 13:49:56 +02:00
|
|
|
github.com/problame/go-netssh v0.0.0-20200601114649-26439f9f0dc5
|
2019-10-26 13:55:03 +02:00
|
|
|
github.com/prometheus/client_golang v1.2.1
|
2020-04-11 15:49:41 +02:00
|
|
|
github.com/prometheus/common v0.7.0
|
2022-04-12 01:26:41 +02:00
|
|
|
github.com/robfig/cron/v3 v3.0.1
|
2022-05-07 21:58:17 +02:00
|
|
|
github.com/sergi/go-diff v1.0.1-0.20180205163309-da645544ed44 // indirect; go1.12 thinks it needs this
|
2019-09-03 14:45:18 +02:00
|
|
|
github.com/spf13/cobra v0.0.2
|
2019-12-09 13:37:19 +01:00
|
|
|
github.com/spf13/pflag v1.0.5
|
2021-02-28 23:33:28 +01:00
|
|
|
github.com/stretchr/testify v1.6.1
|
2020-04-11 15:49:41 +02:00
|
|
|
github.com/willf/bitset v1.1.10
|
2019-09-03 14:45:18 +02:00
|
|
|
github.com/yudai/gojsondiff v0.0.0-20170107030110-7b1b7adf999d
|
2022-05-07 21:58:17 +02:00
|
|
|
github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82 // indirect; go1.12 thinks it needs this
|
|
|
|
github.com/yudai/pp v2.0.1+incompatible // indirect
|
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
|
|
|
github.com/zrepl/yaml-config v0.0.0-20191220194647-cbb6b0cf4bdd
|
2020-03-27 20:37:17 +01:00
|
|
|
gitlab.com/tslocum/cview v1.5.3
|
2021-01-24 23:31:45 +01:00
|
|
|
golang.org/x/net v0.0.0-20210119194325-5f4716e94777
|
2019-09-03 14:45:18 +02:00
|
|
|
golang.org/x/sync v0.0.0-20190423024810-112230192c58
|
2021-01-24 23:31:45 +01:00
|
|
|
golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c
|
|
|
|
golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135
|
|
|
|
google.golang.org/genproto v0.0.0-20210122163508-8081c04a3579 // indirect
|
|
|
|
google.golang.org/grpc v1.35.0
|
|
|
|
google.golang.org/protobuf v1.25.0
|
2022-05-07 21:58:17 +02:00
|
|
|
gopkg.in/go-playground/assert.v1 v1.2.1 // indirect
|
2019-09-03 14:45:18 +02:00
|
|
|
)
|