diff --git a/nixos/modules/tahoe.nix b/nixos/modules/tahoe.nix index 8ea358863c8939d84857f6259b5f4370a401d908..e362077ec3c4a246037a416d10ca205efd10a595 100644 --- a/nixos/modules/tahoe.nix +++ b/nixos/modules/tahoe.nix @@ -176,6 +176,7 @@ in # This is a directory, but it has no trailing slash. Tahoe commands # get antsy when there's a trailing slash. nodedir = "/var/db/tahoe-lafs/${lib.escapeShellArg node}"; + eliotLog = "file:${nodedir}/logs/eliot.json,rotate_length=${toString (1024 * 1024 * 32)},max_rotated_files=32"; in nameValuePair "tahoe.${node}" { description = "Tahoe LAFS node ${node}"; wantedBy = [ "multi-user.target" ]; @@ -189,7 +190,7 @@ in # arguments to $(tahoe run). The node directory must come first, # and arguments which alter Twisted's behavior come afterwards. ExecStart = '' - ${settings.package}/bin/tahoe run ${nodedir} -n -l- --pidfile=${pidfile} + ${settings.package}/bin/tahoe --eliot-destination ${eliotLog} run ${nodedir} -n -l- --pidfile=${pidfile} ''; # The rlimit on number of open files controls how many # connections a particular storage server can accept (factoring diff --git a/nixos/modules/tests/private-storage.nix b/nixos/modules/tests/private-storage.nix index 47acfbf475a5d029b5f2800d4a11e2ff18eaa9d2..8c163785490ba1ad45e421afab790d074c3d878c 100644 --- a/nixos/modules/tests/private-storage.nix +++ b/nixos/modules/tests/private-storage.nix @@ -226,6 +226,9 @@ import <nixpkgs/nixos/tests/make-test.nix> { # status from the node if it is really working. $storage->succeed('tahoe -d /var/db/tahoe-lafs/storage status'); + # It should have Eliot logging turned on as well. + $storage->succeed('[ -e /var/db/tahoe-lafs/storage/logs/eliot.json ]'); + # # Storage appears to be working so try to get a client to speak with it. #