Project

General

Profile

Bug #57138

mgr(snap-schedule): may TypeError in rm_schedule

Added by Mer Xuanyi 4 months ago. Updated 3 months ago.

Status:
Pending Backport
Priority:
Normal
Assignee:
-
Category:
-
Target version:
% Done:

0%

Source:
Tags:
backport_processed
Backport:
pacific,quincy
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
fs
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

We should use

if not row:

to instead of

row = cur.fetchone()
if len(row) == 0:
  ...

cause the fetchone() may return None and we will get

mgr[snap_schedule] Traceback (most recent call last):
...
    if len(row) == 0:
TypeError: object of type 'NoneType' has no len()

Related issues

Copied to Ceph - Backport #57259: quincy: mgr(snap-schedule): may TypeError in rm_schedule New
Copied to Ceph - Backport #57260: pacific: mgr(snap-schedule): may TypeError in rm_schedule New

History

#1 Updated by Kefu Chai 3 months ago

  • Status changed from New to Resolved
  • Tags set to quincy
  • Pull request ID set to 47624

#2 Updated by Kefu Chai 3 months ago

  • Status changed from Resolved to Pending Backport
  • Tags deleted (quincy)
  • Backport set to pacific,quincy

#3 Updated by Backport Bot 3 months ago

  • Copied to Backport #57259: quincy: mgr(snap-schedule): may TypeError in rm_schedule added

#4 Updated by Backport Bot 3 months ago

  • Copied to Backport #57260: pacific: mgr(snap-schedule): may TypeError in rm_schedule added

#5 Updated by Backport Bot 3 months ago

  • Tags set to backport_processed

Also available in: Atom PDF