forked from rook/rook
Saw this today in the logs: ``` 2021-06-02 13:02:54.787838 I | ceph-block-pool-controller: deleting pool "testpool" 2021-06-02 13:02:56.178094 I | cephclient: no images/snapshosts present in pool "testpool" 2021-06-02 13:02:56.178125 I | cephclient: purging pool "testpool" (id=17) panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x1cef49f] goroutine 1607 [running]: github.com/rook/rook/pkg/operator/ceph/pool.(*mirrorChecker).checkMirroringHealth(0xc001a98ba0, 0x8, 0xc000d34c60) /home/runner/work/rook/rook/pkg/operator/ceph/pool/health.go:115 +0xdf github.com/rook/rook/pkg/operator/ceph/pool.(*mirrorChecker).checkMirroring(0xc001a98ba0, 0xc0016fd500) /home/runner/work/rook/rook/pkg/operator/ceph/pool/health.go:82 +0x147 created by github.com/rook/rook/pkg/operator/ceph/pool.(*ReconcileCephBlockPool).reconcile /home/runner/work/rook/rook/pkg/operator/ceph/pool/controller.go:298 +0xee5 ``` Essentially, it's intermittent but when deleting the pool the healthcheck kicked in and fetched the mirroring status, which returned empty. THe subsequent code tried to access content of a nil pointer, hence the error. So now we stop monitoring first, then we proceed with the deletion. Signed-off-by: Sébastien Han <seb@redhat.com>