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

Also available in: Atom PDF