Project

General

Profile

Actions

Bug #52641

closed

snap scheduler: Traceback seen when snapshot schedule remove command is passed without required parameters

Added by Milind Changire over 2 years ago. Updated about 2 years ago.

Status:
Resolved
Priority:
Normal
Category:
-
Target version:
-
% Done:

0%

Source:
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(FS):
mgr/snap_schedule
Labels (FS):
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

  1. ceph fs snap-schedule remove
    Error EINVAL: Traceback (most recent call last):
    File "/usr/share/ceph/mgr/mgr_module.py", line 1347, in _handle_command
    return CLICommand.COMMANDS[cmd['prefix']].call(self, cmd, inbuf)
    File "/usr/share/ceph/mgr/mgr_module.py", line 390, in call
    return self.func(mgr, **kwargs)
    File "/usr/share/ceph/mgr/snap_schedule/module.py", line 150, in snap_schedule_rm
    self.client.rm_snap_schedule(use_fs, abs_path, repeat, start)
    File "/usr/share/ceph/mgr/snap_schedule/fs/schedule_client.py", line 51, in f
    func(self, fs, schedule_or_path, *args)
    File "/usr/share/ceph/mgr/snap_schedule/fs/schedule_client.py", line 271, in rm_snap_schedule
    Schedule.rm_schedule(db, path, schedule, start)
    File "/usr/share/ceph/mgr/snap_schedule/fs/schedule.py", line 278, in rm_schedule
    if len(row) == 0:
    TypeError: object of type 'NoneType' has no len()

Actual results:
----------------
Seeing Traceback error when required parameters are not provided.

Expected results:
------------------
Should warn the user with the missing parameters with the options required to pass.

Actions #1

Updated by Patrick Donnelly over 2 years ago

  • Status changed from New to Triaged
  • Assignee set to Milind Changire
Actions #2

Updated by Venky Shankar about 2 years ago

  • Assignee changed from Milind Changire to Nikhilkumar Shelke

Nikhil, please take a look.

Actions #3

Updated by Nikhilkumar Shelke about 2 years ago

Tried command provided in tracker. Not seen any Traceback if command is passed without required parameters

[nshelke@fedora build]$ ./bin/ceph fs snap-schedule remove
DEVELOPER MODE: setting PATH, PYTHONPATH and LD_LIBRARY_PATH
2022-02-15T10:20:05.782+0530 7f1d438dc640 -1 WARNING: all dangerous and experimental features are enabled.
2022-02-15T10:20:05.788+0530 7f1d438dc640 -1 WARNING: all dangerous and experimental features are enabled.
Invalid command: missing required parameter path(<string>)
fs snap-schedule remove <path> [<repeat>] [<start>] [<subvol>] [<fs>] : Remove a snapshot schedule for <path>
Error EINVAL: invalid command

Actions #4

Updated by Nikhilkumar Shelke about 2 years ago

Also tried to reproduce issue after adding snap-schedule. Still no traceback observed.

[nshelke@fedora build]$ ./bin/ceph fs snap-schedule add / 1h
DEVELOPER MODE: setting PATH, PYTHONPATH and LD_LIBRARY_PATH
2022-02-15T10:40:32.091+0530 7fd34f4f5640 -1 WARNING: all dangerous and experimental features are enabled.
2022-02-15T10:40:32.099+0530 7fd34f4f5640 -1 WARNING: all dangerous and experimental features are enabled.
Schedule set for path /

[nshelke@fedora build]$ ./bin/ceph fs snap-schedule list /
DEVELOPER MODE: setting PATH, PYTHONPATH and LD_LIBRARY_PATH
2022-02-15T10:40:38.243+0530 7f926aab9640 -1 WARNING: all dangerous and experimental features are enabled.
2022-02-15T10:40:38.250+0530 7f926aab9640 -1 WARNING: all dangerous and experimental features are enabled.
/ 1h

[nshelke@fedora build]$ ./bin/ceph fs snap-schedule status
DEVELOPER MODE: setting PATH, PYTHONPATH and LD_LIBRARY_PATH
2022-02-15T10:40:46.004+0530 7f9083d30640 -1 WARNING: all dangerous and experimental features are enabled.
2022-02-15T10:40:46.010+0530 7f9083d30640 -1 WARNING: all dangerous and experimental features are enabled. {"fs": "a", "subvol": null, "path": "/", "rel_path": "/", "schedule": "1h", "retention": {}, "start": "2022-02-15T00:00:00", "created": "2022-02-15T05:10:32", "first": null, "last": null, "last_pruned": null, "created_count": 0, "pruned_count": 0, "active": true}

[nshelke@fedora build]$ ./bin/ceph fs snap-schedule remove
DEVELOPER MODE: setting PATH, PYTHONPATH and LD_LIBRARY_PATH
2022-02-15T10:42:48.077+0530 7fa42543e640 -1 WARNING: all dangerous and experimental features are enabled.
2022-02-15T10:42:48.083+0530 7fa42543e640 -1 WARNING: all dangerous and experimental features are enabled.
Invalid command: missing required parameter path(<string>)
fs snap-schedule remove <path> [<repeat>] [<start>] [<subvol>] [<fs>] : Remove a snapshot schedule for <path>
Error EINVAL: invalid command

Actions #5

Updated by Nikhilkumar Shelke about 2 years ago

  • Status changed from Triaged to Resolved
Actions

Also available in: Atom PDF