]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
mgr/diskprediction_local: import scipy early to fix self-test deadlock
authorSage Weil <sage@redhat.com>
Sat, 7 Dec 2019 21:34:59 +0000 (15:34 -0600)
committerSage Weil <sage@redhat.com>
Sat, 7 Dec 2019 21:34:59 +0000 (15:34 -0600)
commitb9dea87ff1d39d0b9ba2ab469852b78aaa49529b
tree82f6fc4220b35d2e80db2a4ad4bc3f52e5e319fb
parentb35dbcd582f8832665189e325dd85dfa6ef27a52
mgr/diskprediction_local: import scipy early to fix self-test deadlock

We are seeing a hang on centos7 (but not ubuntu 18.04) from

        from .predictor import get_diskfailurepredictor_path

in _predict_life_expentancy.

Doing that same predictor import at the top of the file doesn't help--it
hangs right when the diskpredictor_local module is loaded.  Commenting
out the import scipy in predictor.py avoids the hang.

I'm not sure why, but doing the full scipy import here appears to work
around the problem.

Fixes: https://tracker.ceph.com/issues/42764
Signed-off-by: Sage Weil <sage@redhat.com>
src/pybind/mgr/diskprediction_local/module.py