Merge pull request #16487 from rook/mergify/bp/release-1.18/pr-16484

mon: fix mon health nil pointer exception with mons on PVC (backport #16484)
This commit is contained in:
subham rai authored and GitHub committed 2025-09-15 21:15:44 +05:30
commit 98ba1335cb
1 file changed
+5
+5
View File
@@ -394,6 +394,11 @@ func (c *Cluster) shouldFailoverMonImmediately(ctx context.Context, monName stri
logger.Debugf("checking if mon %q is scheduled on a node", monName)
assignedNode := ""
if mapping, ok := c.mapping.Schedule[monName]; ok {
if mapping == nil {
// mon schedule information is not available in the rook-ceph-mon-endpoints configmap in case of mons on PVC
logger.Debugf("mon schedule information is not available for mon %q", monName)
return false
}
assignedNode = mapping.Hostname
}
if assignedNode == "" {