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:
1 file changed
+5
@@ -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 == "" {
|
||||
|
||||
Reference in new issue
Block a user