Bug 2196748 - [cephfs][snap_schedule] "ceph fs snap-schedule status /doesnotexist 1h" throws an exception
Summary: [cephfs][snap_schedule] "ceph fs snap-schedule status /doesnotexist 1h" throw...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Ceph Storage
Classification: Red Hat Storage
Component: CephFS
Version: 5.3
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 6.1z1
Assignee: Milind Changire
QA Contact: julpark
Akash Raj
URL:
Whiteboard:
Depends On:
Blocks: 2221020
TreeView+ depends on / blocked
 
Reported: 2023-05-10 06:19 UTC by julpark
Modified: 2023-12-02 04:26 UTC (History)
7 users (show)

Fixed In Version: ceph-17.2.6-89.el9cp
Doc Type: Bug Fix
Doc Text:
._snap-schedule_ module no longer throws any traceback Previously, due to an incorrect subvolume path resolution, traceback was seen on command-line whenever a bad path was provided along with a subvolume argument. With this fix, users are recommended to ignore the user-specified path for subvolumes and _snap-schedule_ module does not throw any traceback on the command-line interface.
Clone Of:
Environment:
Last Closed: 2023-08-03 16:45:09 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHCEPH-6643 0 None None None 2023-05-11 04:48:09 UTC
Red Hat Product Errata RHBA-2023:4473 0 None None None 2023-08-03 16:45:54 UTC

Description julpark 2023-05-10 06:19:44 UTC
Description of problem:

"ceph fs snap-schedule status /doesnotexist 1h" throws an exception

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


How reproducible:


Steps to Reproduce:
1. add snap_schedule with specifying time
2. activate it with the dir
3. "ceph fs snap-schedule status /path 1h"

Actual results:

[root@ceph-julpark-k18qvo-node7 cephuser]# ceph fs snap-schedule status /doesnotexist 1h
Error EINVAL: Traceback (most recent call last):
  File "/usr/share/ceph/mgr/mgr_module.py", line 1448, in _handle_command
    return CLICommand.COMMANDS[cmd['prefix']].call(self, cmd, inbuf)
  File "/usr/share/ceph/mgr/mgr_module.py", line 414, in call
    return self.func(mgr, **kwargs)
  File "/usr/share/ceph/mgr/snap_schedule/module.py", line 84, in snap_schedule_get
    abs_path = self.resolve_subvolume_path(use_fs, subvol, path)
  File "/usr/share/ceph/mgr/snap_schedule/module.py", line 47, in resolve_subvolume_path
    raise Exception(f'Could not resolve {path} in {fs}, {subvol}')
Exception: Could not resolve /doesnotexist in cephfs, 1h

Expected results:

Exception should not be there

Additional info:

Comment 1 RHEL Program Management 2023-05-10 06:19:53 UTC
Please specify the severity of this bug. Severity is defined here:
https://bugzilla.redhat.com/page.cgi?id=fields.html#bug_severity.

Comment 2 Venky Shankar 2023-05-11 07:14:41 UTC
As far as I can tell, we added a changes where the schedule gets deactivated on ENOENT, but adding non-existing file system paths were still allowed. Milind?

Comment 3 Milind Changire 2023-05-11 08:15:33 UTC
(In reply to Venky Shankar from comment #2)
> As far as I can tell, we added a changes where the schedule gets deactivated
> on ENOENT, but adding non-existing file system paths were still allowed.
> Milind?

Addition of schedules with immediately non-existent paths is a valid operation. The rationale for this feature is that a path can be added which is likely to come into existence in the near future so that the snap scheduling can be started at the desired future START TIME.

This specific traceback is due to an attempt to resolve the subvolume path. I think if a subvolume name is not valid then no attempt should be made to resolve it and the available path should just be passed on as is for further processing.

Comment 20 errata-xmlrpc 2023-08-03 16:45:09 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Red Hat Ceph Storage 6.1 Bug Fix update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2023:4473

Comment 21 Red Hat Bugzilla 2023-12-02 04:26:37 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 120 days


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