Project

General

Profile

Actions

Bug #54237

closed

pybind/cephfs: Add mapping for Ernno 13:Permission Denied and adding path (in msg) while raising exception from opendir() in cephfs.pyx

Added by Sarthak Gupta about 2 years ago. Updated over 1 year ago.

Status:
Resolved
Priority:
Low
Assignee:
Category:
-
Target version:
% Done:

100%

Source:
Development
Tags:
Backport:
quincy,pacific
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(FS):
cephfs.pyx
Labels (FS):
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

opendir() in src/pybind/cephfs/cephfs.pyx returns a generic cephfs.OSError: Errno 13 for this tracker issue https://tracker.ceph.com/issues/51611, which can be to tricky to catch if we want to provide a more verbose error to the user.

Hence adding a mapping for Errno13 (CEPHFS_EACCES) in errno_to_exception and raising a custom Exception like PermissionDenied(OSError) can be useful in exception handling.


Related issues 2 (0 open2 closed)

Copied to CephFS - Backport #54577: pacific: pybind/cephfs: Add mapping for Ernno 13:Permission Denied and adding path (in msg) while raising exception from opendir() in cephfs.pyxResolvedSarthak GuptaActions
Copied to CephFS - Backport #54578: quincy: pybind/cephfs: Add mapping for Ernno 13:Permission Denied and adding path (in msg) while raising exception from opendir() in cephfs.pyxResolvedSarthak GuptaActions
Actions

Also available in: Atom PDF