]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mgr/diskprediction_local: Fix array size error 36115/head
authorBenoît Knecht <bknecht@protonmail.ch>
Wed, 15 Jul 2020 13:14:51 +0000 (15:14 +0200)
committerBenoît Knecht <bknecht@protonmail.ch>
Wed, 15 Jul 2020 13:24:12 +0000 (15:24 +0200)
commitab0e5ae928d4fc15cf812957541c02770d13ab26
tree095763c399d4961a2eeeb832b686b81f1358af2d
parentc3af7f4fb7357be51d61cb154046587e550b8b29
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>
src/pybind/mgr/diskprediction_local/module.py