Skip to content

qa: Handle TypeError in test_filelock - #68389

Merged
vshankar merged 1 commit into
ceph:mainfrom
karthik-us1:fix_test_filelock
May 12, 2026
Merged

vshankar merged 1 commit into
ceph:mainfrom
karthik-us1:fix_test_filelock

Conversation

@karthik-us1

@karthik-us1 karthik-us1 commented Apr 15, 2026 •

Copy link
Copy Markdown
Contributor

Handling NoneType return in _is_flockable() if version strings are not returned.

Fixes: https://tracker.ceph.com/issues/75959

Contribution Guidelines

  • To sign and title your commits, please refer to Submitting Patches to Ceph.

  • If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.

  • When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an x between the brackets: [x]. Spaces and capitalization matter when checking off items this way.

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands

You must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.

@github-actions github-actions Bot added cephfs Ceph File System tests labels Apr 15, 2026
@karthik-us1
karthik-us1 requested a review from vshankar April 15, 2026 15:35
@vshankar
vshankar requested a review from a team April 16, 2026 05:25
@vshankar

Copy link
Copy Markdown
Contributor

@karthik-us1 - please update the commit message to explain the issue and the fix in a bit of detail.

@karthik-us1

Copy link
Copy Markdown
Contributor Author

@karthik-us1 - please update the commit message to explain the issue and the fix in a bit of detail.

Done.

Comment thread qa/tasks/cephfs/test_client_recovery.py Outdated
@@ -349,9 +349,24 @@ def test_trim_caps(self):
count, num_caps
))

def _fuse_package_version(self):
for pkg in ("fuse", "fuse3"):
ver = get_package_version(self.mount_b.client_remote, pkg)

@kotreshhr kotreshhr Apr 21, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's always fetching package version from mount_b

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

@vshankar vshankar left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor nits. Otherwise LGTM.

Comment thread qa/tasks/cephfs/test_client_recovery.py Outdated
for pkg in ("fuse", "fuse3"):
ver = get_package_version(client_remote, pkg)
if ver:
log.info("using {pkg} package version {ver} for flock check".format(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: use f'..' strings.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Comment thread qa/tasks/cephfs/test_client_recovery.py Outdated
for pkg in ("fuse", "fuse3"):
ver = get_package_version(client_remote, pkg)
if ver:
log.info("using {pkg} package version {ver} for flock check".format(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: log.debug(...)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Latest versions of OS comes with fuse3 installed and we are checking for
only fuse in the get_package_version check in the test case. Checking just
for the package string fuse will return None if only fuse3 is installed.
Adding check for both fuse and fuse3 packages now and also handling NoneType
return in _is_flockable() if the package is actually missing.

Fixes: https://tracker.ceph.com/issues/75959
Signed-off-by: Karthik U S <[email protected]>
@vshankar

Copy link
Copy Markdown
Contributor

This PR is under test in https://tracker.ceph.com/issues/76232.

@vshankar vshankar left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vshankar
vshankar dismissed kotreshhr’s stale review May 12, 2026 15:25

Comments addressed.

@vshankar
vshankar merged commit af7ea49 into ceph:main May 12, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants