Commit 4ad0ba8f authored by weilaaa's avatar weilaaa
Browse files

enhance multi cluster manager pkg

parent 2f51411a
Showing with 5 additions and 1 deletion
+5 -1
......@@ -134,7 +134,11 @@ func (m *MultiClustersMgr) Get(cluster string) (*InternalCluster, error) {
return nil, fmt.Errorf("get: internal cluster %s not found", cluster)
}
if c.Scout.ClusterHealth() == clusterv1.ClusterAbnormal && cluster != constants.LocalCluster {
if cluster == constants.LocalCluster {
return c, nil
}
if c.Scout.ClusterHealth() == clusterv1.ClusterAbnormal {
return c, fmt.Errorf("internal cluster %v is abnormal, wait for recover", cluster)
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment