Merge pull request #278537 from wfdewith/syncoid-permissions

nixos/syncoid: add missing ZFS mount permission

Changed files
+4 -1
nixos
modules
services
backup
tests
+1 -1
nixos/modules/services/backup/syncoid.nix
···
localSourceAllow = mkOption {
type = types.listOf types.str;
# Permissions snapshot and destroy are in case --no-sync-snap is not used
-
default = [ "bookmark" "hold" "send" "snapshot" "destroy" ];
description = lib.mdDoc ''
Permissions granted for the {option}`services.syncoid.user` user
for local source datasets. See
···
localSourceAllow = mkOption {
type = types.listOf types.str;
# Permissions snapshot and destroy are in case --no-sync-snap is not used
+
default = [ "bookmark" "hold" "send" "snapshot" "destroy" "mount" ];
description = lib.mdDoc ''
Permissions granted for the {option}`services.syncoid.user` user
for local source datasets. See
+3
nixos/tests/sanoid.nix
···
source.systemctl("start --wait syncoid-pool-sanoid.service")
target.succeed("cat /mnt/pool/sanoid/test.txt")
source.systemctl("start --wait syncoid-pool-syncoid.service")
target.succeed("cat /mnt/pool/syncoid/test.txt")
source.systemctl("start --wait syncoid-pool.service")
target.succeed("[[ -d /mnt/pool/full-pool/syncoid ]]")
···
source.systemctl("start --wait syncoid-pool-sanoid.service")
target.succeed("cat /mnt/pool/sanoid/test.txt")
source.systemctl("start --wait syncoid-pool-syncoid.service")
+
source.systemctl("start --wait syncoid-pool-syncoid.service")
target.succeed("cat /mnt/pool/syncoid/test.txt")
+
+
assert(len(source.succeed("zfs list -H -t snapshot pool/syncoid").splitlines()) == 1), "Syncoid should only retain one sync snapshot"
source.systemctl("start --wait syncoid-pool.service")
target.succeed("[[ -d /mnt/pool/full-pool/syncoid ]]")