From: wanwencong Date: Thu, 25 Mar 2021 03:34:24 +0000 (+0800) Subject: mgr: attr_list reassigned before use in diskprediction_local module X-Git-Tag: v17.1.0~2454^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F40396%2Fhead;p=ceph.git 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 --- diff --git a/src/pybind/mgr/diskprediction_local/predictor.py b/src/pybind/mgr/diskprediction_local/predictor.py index e2b1ae9286ef..fbf8d871c192 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 = []