Skip to content

Commit 3389fce

Browse files
committed
Use FUSE mount settings on Linux
This makes the demo deployment launch successfully on Ubuntu 25.04.
1 parent 25e5e6f commit 3389fce

2 files changed

Lines changed: 16 additions & 3 deletions

File tree

deployments/demo/bonanza_worker.jsonnet

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
1+
local os = std.extVar('OS');
12
local 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
}],

deployments/demo/demo.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ mkdir -p "${STATE_PATH}/bonanza_builder_filepool"
2121
umount "${STATE_PATH}/bonanza_worker_mount" || true
2222
mkdir -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.
2528
set -m
2629
for replica in a b; do

0 commit comments

Comments
 (0)