Project

General

Profile

Actions

Bug #49968

closed

mgr: attr_list reassigned before use in diskprediction_local module

Added by wencong wan about 3 years ago. Updated about 3 years ago.

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

0%

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

Description

    def __get_diff_attrs(disk_days: Sequence[DevSmartT]) -> Tuple[AttrNamesT, AttrDiffsT]:
        """ 
        Get 5 days differential attributes.
        Args:
            disk_days: Refer to function predict(...).
        Returns:
            attr_list: All S.M.A.R.T. attributes used in given disk. Here we
                       use intersection set of all disk days.
            diff_disk_days: A list struct comprises 5 dictionaries, each
                            dictionary contains differential attributes.
        Raises:
            Exceptions of wrong list/dict operations.
        """ 

        all_attrs = [set(disk_day.keys()) for disk_day in disk_days]
        attr_list = list(set.intersection(*all_attrs))
        attr_list = list(disk_days[0].keys())   # ----> According to the above document description, this line is redundant 
Actions #1

Updated by Kefu Chai about 3 years ago

  • Description updated (diff)
Actions #2

Updated by Kefu Chai about 3 years ago

  • Status changed from New to Fix Under Review
  • Pull request ID set to 40396
Actions #3

Updated by Kefu Chai about 3 years ago

  • Status changed from Fix Under Review to Resolved
Actions

Also available in: Atom PDF