controller: No longer consider failed or disk-not-ready BIMs as pulling candidates
@@ -677,11 +677,14 @@ func (c *BackingImageManagerController) isEligibleForPulling(currentBIM *longhor
if _, exists := bim.Spec.BackingImages[biName]; !exists {
continue
}
- isDownOrDeleted, err := c.ds.IsNodeDownOrDeleted(bim.Spec.NodeID)
+ if bim.Status.CurrentState == types.BackingImageManagerStateError {
+ continue
+ }
+ _, _, err := c.ds.GetReadyDiskNode(bim.Spec.DiskUUID)
if err != nil {
+ if !types.ErrorIsNotFound(err) {
return false, err
}
- if isDownOrDeleted {
continue
}
cksum := util.GetStringChecksum(biName + bimName)
