diff --git a/nixos/modules/tahoe.nix b/nixos/modules/tahoe.nix index cb0abf0813e3646a6054e4746726f7d507de484c..cd7306d64adf955515f44884df04dffcc4d40a5a 100644 --- a/nixos/modules/tahoe.nix +++ b/nixos/modules/tahoe.nix @@ -184,6 +184,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" ]; @@ -197,7 +198,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 b51f85cfa984e60e14e692e43697b75835986774..cc4a61fcb7bdba8d447e93942284afe0ecde88b1 100644 --- a/nixos/modules/tests/private-storage.nix +++ b/nixos/modules/tests/private-storage.nix @@ -224,6 +224,9 @@ in { # 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. #