zrepl/daemon/job
Christian Schwarz fb6a9be954 fix encrypt-on-receive with placeholders
fixes https://github.com/zrepl/zrepl/issues/504

Problem:
  plain send + recv with root_fs encrypted + placeholders causes plain recvs
  whereas user would expect encrypt-on-recv
Reason:
  We create placeholder filesytems with -o encryption=off.
  Thus, children received below those placeholders won't inherit
  encryption of root_fs.
Fix:
  We'll have three values for `recv.placeholders.encryption: unspecified (default) | off | inherit`.
  When we create a placeholder, we will fail the operation if  `recv.placeholders.encryption = unspecified`.
  The exception is if the placeholder filesystem is to encode the client identity ($root_fs/$client_identity) in a pull job.
  Those are created in `inherit` mode if the config field is `unspecified` so that users who don't need
  placeholders are not bothered by these details.

Future Work:
  Automatically warn existing users of encrypt-on-recv about the problem
  if they are affected.
  The problem that I hit during implementation of this is that the
  `encryption` prop's `source` doesn't quite behave like other props:
  `source` is `default` for `encryption=off` and `-` when `encryption=on`.
  Hence, we can't use `source` to distinguish the following 2x2 cases:
  (1) placeholder created with explicit -o encryption=off
  (2) placeholder created without specifying -o encryption
  with
  (A) an encrypted parent at creation time
  (B) an unencrypted parent at creation time
2021-12-18 15:12:47 +01:00
..
reset move wakeup subcommand into signal subcommand and add reset subcommand 2018-10-12 20:50:56 +02:00
wakeup client/signal: Revert "add signal 'snapshot', rename existing signal 'wakeup' to 'replication'" 2021-03-25 22:26:17 +01:00
active_test.go Reformat all files with make format. 2020-08-31 23:57:45 +02:00
active.go job/active: add "last completed" metric for error reporting 2021-11-10 17:35:12 +01:00
activesidestate_enumer.go build: drop go Dep, switch to modules, support Go 1.13 2019-09-14 13:36:44 +02:00
build_jobs_sendrecvoptions.go fix encrypt-on-receive with placeholders 2021-12-18 15:12:47 +01:00
build_jobs_test.go send/recv: job-level bandwidth limiting 2021-09-12 20:08:43 +02:00
build_jobs.go send/recv: job-level bandwidth limiting 2021-09-12 20:08:43 +02:00
job.go [#307] add package trace, integrate it with logging, and adopt it throughout zrepl 2020-05-19 11:30:02 +02:00
passive.go Reformat all files with make format. 2020-08-31 23:57:45 +02:00
snapjob.go pruner + docs: less confusing type names, some comments, better docs for keep: not_replicated 2021-10-10 21:11:38 +02:00