ci: fail an S3 benchmark run on EC2 without a local instance store

Without an instance store the Raft Engine WAL of the R cells silently stayed
on the root EBS volume, so the run measured a different baseline. Only a smoke
run may keep it on the root volume now.

Signed-off-by: jeremyhi <fengjiachun@gmail.com>
This commit is contained in:
jeremyhi
2026-10-12 18:30:18 +08:00
parent 6153381cd3
commit 53edb464f5
2 changed files with 12 additions and 0 deletions
+2
View File
@@ -33,6 +33,8 @@ pull_images() {
wal_disk() {
local root=$1 device
device=$(lsblk -dnpo NAME,MODEL | awk '/Instance Storage/ {print $1; exit}')
# Only a smoke run may keep the Raft Engine WAL on the root volume.
[[ -n "$device" || "${SMOKE:-}" == true ]] || { echo 'No local NVMe instance store; choose an instance type with one' >&2; return 1; }
sudo -n mkdir -p "$root"
if [[ -n "$device" ]]; then
sudo -n umount "$device" 2>/dev/null || true
+10
View File
@@ -264,6 +264,16 @@ class CellLifecycleTest(unittest.TestCase): # the run script against fake docke
self.assertEqual(log.count("docker stop -t 120 fakecid"), 2)
self.assertEqual(log.count("docker rm -fv fakecid"), 2)
def test_an_ec2_run_without_an_instance_store_fails(self):
with tempfile.TemporaryDirectory() as directory:
(Path(directory) / "lsblk").write_text("#!/usr/bin/env bash\necho '/dev/nvme0n1 Amazon Elastic Block Store'\n")
(Path(directory) / "lsblk").chmod(0o755)
env = os.environ | {"PATH": f"{directory}:{os.environ['PATH']}", "SMOKE": "false"}
done = subprocess.run(["bash", str(SCRIPTS / "oswal-s3-bench-run.sh"), "wal-disk", f"{directory}/wal"],
env=env, capture_output=True, text=True, timeout=60)
self.assertNotEqual(done.returncode, 0)
self.assertIn("No local NVMe instance store", done.stderr)
def test_a_failed_scrape_fails_a_successful_load(self):
with tempfile.TemporaryDirectory() as directory:
root = Path(directory)