From f6fb347fe0d3aa6300bba8ca626045a9c0308724 Mon Sep 17 00:00:00 2001 From: Parfait Detchenou Date: Thu, 28 Aug 2025 09:10:44 +0100 Subject: [PATCH] testnode: allow storage device size config --- ceph_devstack/config.toml | 1 + ceph_devstack/resources/ceph/containers.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ceph_devstack/config.toml b/ceph_devstack/config.toml index 8fc17d6c..147a729e 100644 --- a/ceph_devstack/config.toml +++ b/ceph_devstack/config.toml @@ -17,6 +17,7 @@ image = "quay.io/ceph-infra/pulpito:main" [containers.testnode] count = 3 +loop_device_size = "5G" image = "quay.io/ceph-infra/teuthology-testnode:main" [containers.teuthology] diff --git a/ceph_devstack/resources/ceph/containers.py b/ceph_devstack/resources/ceph/containers.py index 758a73db..ac588845 100644 --- a/ceph_devstack/resources/ceph/containers.py +++ b/ceph_devstack/resources/ceph/containers.py @@ -246,7 +246,7 @@ async def remove(self): await self.remove_loop_device() async def create_loop_device(self): - size_gb = 5 + size = config["containers"]["testnode"]["loop_device_size"] os.makedirs(self.loop_img_dir, exist_ok=True) proc = await self.cmd(["lsmod", "|", "grep", "loop"]) if proc and await proc.wait() != 0: @@ -277,7 +277,7 @@ async def create_loop_device(self): f"of={loop_img_name}", "bs=1", "count=0", - f"seek={size_gb}G", + f"seek={size}", ], check=True, )