]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mgr/diskprediction_local: Fix array size error 36577/head
authorBenoît Knecht <bknecht@protonmail.ch>
Wed, 15 Jul 2020 13:14:51 +0000 (15:14 +0200)
committerLaura Paduano <lpaduano@suse.com>
Wed, 12 Aug 2020 07:39:03 +0000 (09:39 +0200)
commit32905abe410313f3616cdb2d8bbcdd9d76895293
treea94be2b8855c45fdc4481cd78238ca625d5c452e
parent3d6d3969fb38a7179b19aeb245f7a1963cd2a315
mgr/diskprediction_local: Fix array size error

The disk predictor assumes that it has at least 6 days worth of data to work
with, and the code ensures that `health_data` contains at least 6 elements.

However, it then gets fitlered down into a `predict_datas` array that can
contain less than 6 elements in some cases.

This commit ensures that `predict_datas` contains 6 elements or more before
passing it on to the disk predictor.

Fixes: https://tracker.ceph.com/issues/46549
Signed-off-by: Benoît Knecht <bknecht@protonmail.ch>
(cherry picked from commit ab0e5ae928d4fc15cf812957541c02770d13ab26)
src/pybind/mgr/diskprediction_local/module.py