From fac3a0cce511deff3841818aa8716d7ec3885cfe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niklas=20Hamb=C3=BCchen?= Date: Tue, 16 Jun 2026 22:17:40 +0000 Subject: [PATCH] ceph.tests.ceph-multi-node-deprecated-filestore: Fix lack-of-fsync flakiness With 20.2.2, this flakiness will be more evident (I could only make it happen with that version). (cherry picked from commit 8f8d2796bae36c40ad65ff1f8e9bbe8171da045c) --- nixos/tests/ceph-multi-node.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/nixos/tests/ceph-multi-node.nix b/nixos/tests/ceph-multi-node.nix index 7aaf31c14d3e..35e6cb73c1c4 100644 --- a/nixos/tests/ceph-multi-node.nix +++ b/nixos/tests/ceph-multi-node.nix @@ -159,6 +159,7 @@ let # Start the ceph-mgr daemon, it has no deps and hardly any setup monA.succeed( "ceph auth get-or-create mgr.${cfg.monA.name} mon 'allow profile mgr' osd 'allow *' mds 'allow *' > /var/lib/ceph/mgr/ceph-${cfg.monA.name}/keyring", + "sync", # to ensure shell redirection above is durable "systemctl start ceph-mgr-${cfg.monA.name}", ) monA.wait_for_unit("ceph-mgr-a") @@ -194,20 +195,23 @@ let 'echo \'{"cephx_secret": "${cfg.osd2.key}"}\' | ceph osd new ${cfg.osd2.uuid} -i -', ) - # Initialize the OSDs with regular filestore + # We `sync` so that the config survives the forced crashes below. osd0.succeed( "ceph-osd -i ${cfg.osd0.name} --mkfs --osd-uuid ${cfg.osd0.uuid}", "chown -R ceph:ceph /var/lib/ceph/osd", + "sync", "systemctl start ceph-osd-${cfg.osd0.name}", ) osd1.succeed( "ceph-osd -i ${cfg.osd1.name} --mkfs --osd-uuid ${cfg.osd1.uuid}", "chown -R ceph:ceph /var/lib/ceph/osd", + "sync", "systemctl start ceph-osd-${cfg.osd1.name}", ) osd2.succeed( "ceph-osd -i ${cfg.osd2.name} --mkfs --osd-uuid ${cfg.osd2.uuid}", "chown -R ceph:ceph /var/lib/ceph/osd", + "sync", "systemctl start ceph-osd-${cfg.osd2.name}", ) monA.wait_until_succeeds("ceph osd stat | grep -e '3 osds: 3 up[^,]*, 3 in'")