Skip to content

Instantly share code, notes, and snippets.

@aphyr
Created June 15, 2022 18:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aphyr/3359026fd83c1e7eb047004baa6c6add to your computer and use it in GitHub Desktop.
Save aphyr/3359026fd83c1e7eb047004baa6c6add to your computer and use it in GitHub Desktop.
Log length: 62
sudo -k -S -u root bash -c "cd /; mkdir -p /tmp/jepsen/fs-test" # =>
sudo -k -S -u root bash -c "cd /; mkdir -p /tmp/jepsen/fs-test.lazyfs/data" # =>
sudo -k -S -u root bash -c "cd /; chown root:root /tmp/jepsen/fs-test" # =>
sudo -k -S -u root bash -c "cd /; chown -R root:root /tmp/jepsen/fs-test.lazyfs" # =>
sudo -k -S -u root bash -c "cd /; cat > /tmp/jepsen/fs-test.lazyfs/config" <<< "[faults]
fifo_path=\"/tmp/jepsen/fs-test.lazyfs/fifo\"
[cache]
apply_eviction=false
[cache.simple]
custom_size=\"0.5GB\"
blocks_per_page=1" # =>
sudo -k -S -u root bash -c "cd /; echo \`date +'%Y-%m-%d %H:%M:%S'\` \"Jepsen starting /opt/jepsen/lazyfs/lazyfs/build/lazyfs /tmp/jepsen/fs-test --config-path /tmp/jepsen/fs-test.lazyfs/config -o allow_other -o modules=subdir -o subdir=/tmp/jepsen/fs-test.lazyfs/data -s -f\" >> /tmp/jepsen/fs-test.lazyfs/log" # =>
sudo -k -S -u root bash -c "cd /; start-stop-daemon --start --background --no-close --make-pidfile --exec /opt/jepsen/lazyfs/lazyfs/build/lazyfs --pidfile /tmp/jepsen/fs-test.lazyfs/pid --chdir /tmp/jepsen/fs-test.lazyfs --startas /opt/jepsen/lazyfs/lazyfs/build/lazyfs -- /tmp/jepsen/fs-test --config-path /tmp/jepsen/fs-test.lazyfs/config -o allow_other -o modules=subdir -o subdir=/tmp/jepsen/fs-test.lazyfs/data -s -f >> /tmp/jepsen/fs-test.lazyfs/log 2>&1" # =>
cd /tmp/jepsen/fs-test
mkdir a # =>
cat > a/a <<< Rkp3j5c6JcwfDONor16D9PZ17l # =>
mv a b # =>
cat b/a # =>
At this point, the root was theoretically
{:type :dir,
:files
{"b"
{:type :dir,
:files {"a" {:type :file, :data "Rkp3j5c6JcwfDONor16D9PZ17l"}}}}}
And we expected to execute
{:f :read,
:value [["b" "a"] "Rkp3j5c6JcwfDONor16D9PZ17l"],
:time 112508036,
:process 0,
:type :ok,
:index 7}
But with lazyfs we actually executed
{:f :read,
:value [["b" "a"] ""],
:time 112508036,
:process 0,
:type :ok,
:index 7}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment