]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commit
cephadm: fix zip_root_entries population in version command
authorKefu Chai <k.chai@proxmox.com>
Mon, 10 Nov 2025 04:11:08 +0000 (12:11 +0800)
committerKefu Chai <k.chai@proxmox.com>
Fri, 14 Nov 2025 13:20:59 +0000 (21:20 +0800)
commit6f19802fb457b66e60f81a1e4a545944a5f87cee
treec72b43a51f927d871383965aa43cfb39b2b27e2d
parent93599a83ae2d2533f9aa8419313836f5e878a0e5
cephadm: fix zip_root_entries population in version command

The 'cephadm version --verbose' command was returning an empty
zip_root_entries list because it relied on the private '_files'
attribute of zipimport.zipimporter, which is not reliably populated
across Python versions.

This commit fixes the issue by using the zipfile module to properly
read the archive contents via the loader.archive path. This ensures
that zip_root_entries is correctly populated with the root-level
directories in the zipapp.

This fix is necessary for the cephadm build tests to properly validate
that all expected packages and modules are included in the built zipapp.

Signed-off-by: Kefu Chai <k.chai@proxmox.com>
(cherry picked from commit 2c68c1496dbb7cd01bf783e31510940445040a34)
src/cephadm/cephadm.py