]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mgr: attr_list reassigned before use in diskprediction_local module
authorwanwencong <wanwc@chinatelecom.cn>
Thu, 25 Mar 2021 03:34:24 +0000 (11:34 +0800)
committerwanwencong <wanwc@chinatelecom.cn>
Thu, 25 Mar 2021 03:34:24 +0000 (11:34 +0800)
According to the document description, attr_list should be intersection
set of all disk days.

Fixes: https://tracker.ceph.com/issues/49968
Signed-off-by: wencong wan <wanwc@chinatelecom.cn>
src/pybind/mgr/diskprediction_local/predictor.py

index e2b1ae9286ef5d246bac88a1c9c0df78d05b52af..fbf8d871c192dc5dfd99e57ba505728a837ba46e 100644 (file)
@@ -345,7 +345,6 @@ class PSDiskFailurePredictor(Predictor):
 
         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())
         prev_days = disk_days[:-1]
         curr_days = disk_days[1:]
         diff_disk_days = []