From 2b8b78a2ca70dfb515387773376bbb1f6c9aeaad Mon Sep 17 00:00:00 2001 From: wanwencong Date: Thu, 25 Mar 2021 11:34:24 +0800 Subject: [PATCH] mgr: attr_list reassigned before use in diskprediction_local module 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 --- src/pybind/mgr/diskprediction_local/predictor.py | 1 - 1 file changed, 1 deletion(-) diff --git a/src/pybind/mgr/diskprediction_local/predictor.py b/src/pybind/mgr/diskprediction_local/predictor.py index e2b1ae9286e..fbf8d871c19 100644 --- a/src/pybind/mgr/diskprediction_local/predictor.py +++ b/src/pybind/mgr/diskprediction_local/predictor.py @@ -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 = [] -- 2.39.5