func()

in pkg/mgmapi/clusterstatus.go [116:137]


func (cs ClusterStatus) IsHealthy() bool {
	for _, ns := range cs {
		switch ns.NodeType {
		case NodeTypeMGM:
			if !ns.IsConnected {
				return false
			}
		case NodeTypeNDB:
			if !ns.IsConnected {
				// During online add the new data node slots will
				// have a nodegroup 65536 and they will not have a
				// valid nodegroup until they are inducted into
				// the cluster. So, any unconnected node without
				// that nodegroup is an unhealthy node.
				if ns.NodeGroup != NodeGroupNewDisconnectedDataNode {
					return false
				}
			}
		}
	}
	return true
}