Skip to content

Commit

Permalink
fix-remedy-e2e-errors
Browse files Browse the repository at this point in the history
Signed-off-by: changzhen <changzhen5@huawei.com>
  • Loading branch information
XiShanYongYe-Chang committed Jun 13, 2024
1 parent 8ef8d37 commit ce75e5a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/controllers/remediation/remedy_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ func (c *RemedyController) Reconcile(ctx context.Context, req controllerruntime.
klog.Errorf("Failed to sync cluster(%s) remedy actions: %v", cluster.Name, err)
return controllerruntime.Result{}, err
}
klog.V(4).Infof("Success to sync cluster(%s) remedy actions", cluster.Name)
klog.V(4).Infof("Success to sync cluster(%s) remedy actions: %v", cluster.Name, actions)
return controllerruntime.Result{}, nil
}

Expand Down
6 changes: 5 additions & 1 deletion pkg/controllers/status/cluster_status_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,11 @@ func (c *ClusterStatusController) updateStatusIfNeeded(cluster *clusterv1alpha1.
if !equality.Semantic.DeepEqual(cluster.Status, currentClusterStatus) {
klog.V(4).Infof("Start to update cluster status: %s", cluster.Name)
err := retry.RetryOnConflict(retry.DefaultRetry, func() (err error) {
cluster.Status = currentClusterStatus
cluster.Status.KubernetesVersion = currentClusterStatus.KubernetesVersion
cluster.Status.APIEnablements = currentClusterStatus.APIEnablements
cluster.Status.Conditions = currentClusterStatus.Conditions
cluster.Status.NodeSummary = currentClusterStatus.NodeSummary
cluster.Status.ResourceSummary = currentClusterStatus.ResourceSummary
updateErr := c.Status().Update(context.TODO(), cluster)
if updateErr == nil {
return nil
Expand Down

0 comments on commit ce75e5a

Please sign in to comment.