]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
vstart.sh: only skip fs volume create when there's no mgr to run it 69901/head
authorKefu Chai <k.chai@proxmox.com>
Thu, 2 Jul 2026 05:48:38 +0000 (13:48 +0800)
committerKefu Chai <k.chai@proxmox.com>
Thu, 2 Jul 2026 10:40:59 +0000 (18:40 +0800)
commitbb9c1fde9f93e8f31d512dd13482da552b2ed52d
treef8c64bd54c17604f31fabde551bccf16b45d3ccd
parent3b9dfd04eb04d6af459678da47e3594288cd5c93
vstart.sh: only skip fs volume create when there's no mgr to run it

The mgr volumes module handles fs volume ls/create, not the monitor, so
without a mgr (CEPH_NUM_MGR=0) the "wait for volume module to load" loop
spun forever. Open-coding fs new unconditionally, my first attempt,
changed pool creation for every vstart user and dropped the wait, so
cephfs tests calling `fs volume ...` right after vstart.sh returns could
race a module still mid-load.

create_fs_volume() branches on CEPH_NUM_MGR instead. With a mgr it still
calls fs volume ls/create. Without one it runs the plain mon commands fs
volume create wraps: osd pool create cephfs.<name>.{meta,data}, then fs
new <name> <meta> <data>. The wait stays at its one call site above the
per-filesystem loop, so it runs once regardless of CEPH_NUM_FS, not once
per filesystem.

Verified against a local vstart: mgr present, fs volume ls polls once
then creates CEPH_NUM_FS=2 filesystems with no repeated poll;
CEPH_NUM_MGR=0, no poll, fs new creates 'a' directly, HEALTH_OK.

Signed-off-by: Kefu Chai <k.chai@proxmox.com>
src/vstart.sh