Project

General

Profile

Actions

Bug #76504

closed
SB SB

NFS CephFS export create hits cephfs_path_is_dir but nested lru_cache never reuses CephfsClient

Bug #76504: NFS CephFS export create hits cephfs_path_is_dir but nested lru_cache never reuses CephfsClient

Added by Shweta Bhosale 7 months ago. Updated 30 days ago.

Status:
Backporting
Priority:
Normal
Category:
cephadm/nfs
Target version:
-
Due date:
% Done:

0%

Source:
Backport:
tentacle
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Tags (freeform):
Fixed In:
v21.0.0-1433-ge7e72d20da
Released In:
v21.2.0~476
Upkeep Timestamp:
2026-11-04T01:11:32+00:00

Description

the cli command run:
_cmd_nfs_export_create_cephfs
→ create_export

→ create_cephfs_export
→ validate_cephfs_path
→ create_export_from_dict
→ validate_cephfs_path

validate_cephfs_pathis calling cephfs_path_is_dir:

def cephfs_path_is_dir(mgr, fs, path):
@functools.lru_cache(maxsize=1)
def _get_cephfs_client():
return CephfsClient(mgr)
cephfs_client = _get_cephfs_client()

since _get_cephfs_client is is defined inside cephfs_path_is_dir. This means every time cephfs_path_is_dir is called, Python creates a brand new function object for _get_cephfs_client, and applies a brand new, empty lru_cache to it. The cache never has any prior entries because it has never existed before. The result is that CephfsClient(mgr) is called unconditionally on every invocation — the cache does nothing.

That calls *2, so we have 20 extra threads - we can move that function outside and let the cache work correctly.
CephFSEarmarkResolver is probably adding 10 more threads.


Related issues 1 (1 open — 0 closed)

Copied to Orchestrator - Backport #81287: tentacle: NFS CephFS export create hits cephfs_path_is_dir but nested lru_cache never reuses CephfsClientIn ProgressShweta Bhosale

Actions

SB Updated by Shweta Bhosale 7 months ago Actions #1

  • Pull request ID set to 68842

UB Updated by Upkeep Bot 7 months ago Actions #2

  • Status changed from In Progress to Resolved
  • Merge Commit set to e7e72d20dac55031208c407eb2e4d3aeb12bb95b
  • Fixed In set to v21.0.0-1433-ge7e72d20da
  • Upkeep Timestamp set to 2026-05-14T12:42:21+00:00

SB Updated by Shweta Bhosale 2 months ago Actions #3

  • Status changed from Resolved to Pending Backport
  • Backport set to tentacle

UB Updated by Upkeep Bot 2 months ago Actions #4

  • Copied to Backport #81287: tentacle: NFS CephFS export create hits cephfs_path_is_dir but nested lru_cache never reuses CephfsClient added

UB Updated by Upkeep Bot 2 months ago Actions #5

  • Status changed from Pending Backport to Backporting
  • Upkeep Timestamp changed from 2026-05-14T12:42:21+00:00 to 2026-10-01T12:28:59+00:00

UB Updated by Upkeep Bot about 1 month ago Actions #6

  • Released In set to v21.2.0~475
  • Upkeep Timestamp changed from 2026-10-01T12:28:59+00:00 to 2026-10-24T01:30:11+00:00

UB Updated by Upkeep Bot 30 days ago Actions #7

  • Released In changed from v21.2.0~475 to v21.2.0~476
  • Upkeep Timestamp changed from 2026-10-24T01:30:11+00:00 to 2026-11-04T01:11:32+00:00
Actions

Also available in: PDF Atom