Bug 2258581 - [CephFS - SnapSchedule] Snap schedule list on invalid path generates error with Traceback
Summary: [CephFS - SnapSchedule] Snap schedule list on invalid path generates error wi...
Keywords:
Status: CLOSED DUPLICATE of bug 2264836
Alias: None
Product: Red Hat Ceph Storage
Classification: Red Hat Storage
Component: CephFS
Version: 6.1
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
: 7.1z1
Assignee: Milind Changire
QA Contact: sumr
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2024-01-16 11:43 UTC by sumr
Modified: 2024-07-26 06:21 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2024-07-03 07:41:43 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Ceph Project Bug Tracker 58195 0 None None None 2024-02-16 12:34:06 UTC
Red Hat Issue Tracker RHCEPH-8172 0 None None None 2024-01-16 12:50:43 UTC

Description sumr 2024-01-16 11:43:35 UTC
Description of problem:
Snap Schedule list on invalid path needs to provide command response as an error for invalid path, but it generates a Traceback as below,

[root@ceph-sumar-regression-5ohzjt-node6 ~]# ceph fs snap-schedule list /volumes/svg2/sv1 --fs cephfs
Error EINVAL: Traceback (most recent call last):
  File "/usr/share/ceph/mgr/mgr_module.py", line 1794, in _handle_command
    return CLICommand.COMMANDS[cmd['prefix']].call(self, cmd, inbuf)
  File "/usr/share/ceph/mgr/mgr_module.py", line 462, in call
    return self.func(mgr, **kwargs)
  File "/usr/share/ceph/mgr/snap_schedule/module.py", line 154, in snap_schedule_list
    return -errno.ENOENT, '', f'SnapSchedule for {abs_path} not found'
NameError: name 'abs_path' is not defined

Here, the traceback info generates ambiguous message in "NameError: name 'abs_path' is not defined". The user level error message had to mention the path '/volumes/svg2/sv1' as invalid or something similar to 'Error ENOENT: No schedule found for /volumes/svg2/sv1'

Traceback info needs in command response needs to be avoided and simple error message relevant to non-existing path needs to be printed.

Version-Release number of selected component (if applicable):


How reproducible: consistent


Note You need to log in before you can comment on or make changes to this bug.