Skip to content

Commit

Permalink
Fix: Cluster deletion is skipped if timeout happens in WaitUntilClust…
Browse files Browse the repository at this point in the history
…erIsReady (#227)

Signed-off-by: Parthvi Vala <parthvi.vala@suse.com>
  • Loading branch information
valaparthvi authored Dec 18, 2024
1 parent cfd66eb commit df9e5e2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hosted/helpers/helper_common.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,14 +139,14 @@ func WaitUntilClusterIsReady(cluster *management.Cluster, client *rancher.Client
opts := metav1.ListOptions{FieldSelector: "metadata.name=" + cluster.ID, TimeoutSeconds: &defaults.WatchTimeoutSeconds}
watchInterface, err := client.GetManagementWatchInterface(management.ClusterType, opts)
if err != nil {
return nil, err
return cluster, err
}

watchFunc := shepherdclusters.IsHostedProvisioningClusterReady

err = wait.WatchWait(watchInterface, watchFunc)
if err != nil {
return nil, err
return cluster, err
}
var updatedCluster *management.Cluster
updatedCluster, err = client.Management.Cluster.ByID(cluster.ID)
Expand Down

0 comments on commit df9e5e2

Please sign in to comment.