Skip to content

Commit

Permalink
modify error message when filtering classes
Browse files Browse the repository at this point in the history
modify error message when filtering ReplicationClasses
and SnapshotClasses

Signed-off-by: rakeshgm <[email protected]>
  • Loading branch information
rakeshgm authored and BenamarMk committed Nov 20, 2024
1 parent 0c7e00c commit 8c376ff
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions internal/controller/volumereplicationgroup_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -881,7 +881,8 @@ func (v *VRGInstance) separatePVCUsingPeerClassAndSC(peerClasses []ramendrv1alph
return nil
}

return fmt.Errorf("failed to find matching peerClass for PVC") // TODO: better error message
return fmt.Errorf("failed to find replicationClass matching peerClass for PVC %s/%s",
pvc.Namespace, pvc.Name)
}
}

Expand All @@ -895,7 +896,7 @@ func (v *VRGInstance) separatePVCUsingPeerClassAndSC(peerClasses []ramendrv1alph
}

if snapClass == nil {
return fmt.Errorf("failed to find matching peerClass for PVC") // TODO: better error message
return fmt.Errorf("failed to find snapshotClass for PVC %s/%s", pvc.Namespace, pvc.Name)
}

v.volSyncPVCs = append(v.volSyncPVCs, *pvc)
Expand Down

0 comments on commit 8c376ff

Please sign in to comment.