File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ local os = std.extVar('OS' );
12local statePath = std.extVar('STATE_PATH' );
23
34{
5+ // If enabled, use NFSv4 instead of FUSE.
6+ useNFSv4:: os == 'Darwin' ,
7+
48 global: { diagnosticsHttpServer: {
59 httpServers: [{
610 listenAddresses: [':9983' ],
@@ -83,12 +87,18 @@ local statePath = std.extVar('STATE_PATH');
8387 }],
8488 mount: {
8589 mountPath: statePath + '/bonanza_worker_mount' ,
90+ } + if $.useNFSv4 then {
8691 nfsv4: {
87- darwin: {
88- socketPath: statePath + '/bonanza_worker_mount.sock' ,
89- },
9092 enforcedLeaseTime: '120s' ,
9193 announcedLeaseTime: '60s' ,
94+ } + {
95+ Darwin: { darwin: { socketPath: statePath + '/bonanza_worker_mount.sock' } },
96+ Linux: { linux: { mountOptions: ['vers=4.1' ] } },
97+ }[os],
98+ } else {
99+ fuse: {
100+ directoryEntryValidity: '300s' ,
101+ inodeAttributeValidity: '300s' ,
92102 },
93103 },
94104 }],
Original file line number Diff line number Diff line change @@ -21,6 +21,9 @@ mkdir -p "${STATE_PATH}/bonanza_builder_filepool"
2121umount " ${STATE_PATH} /bonanza_worker_mount" || true
2222mkdir -p " ${STATE_PATH} /bonanza_worker_mount" || true
2323
24+ # Support conditionals in configuration files based on the operating system.
25+ export OS=$( uname)
26+
2427# Launch processes that should be killed last.
2528set -m
2629for replica in a b; do
You can’t perform that action at this time.
0 commit comments