Skip to content

Commit

Permalink
fix: remove extra return in machine template, back port v5 (#1400) (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
matttrach authored Sep 6, 2024
1 parent 725a19f commit d9facff
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions rancher2/resource_rancher2_machine_config_v2.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,6 @@ func waitForMachineConfigV2(d *schema.ResourceData, config *Config, interval tim
return nil
}
log.Printf("[INFO] Retrying on error Refreshing Machine Config V2 %s: %v", d.Id(), err)
if IsNotFound(err) || IsForbidden(err) {
d.SetId("")
return fmt.Errorf("Machine Config V2 %s not found: %s", d.Id(), err)
}
if IsNotAccessibleByID(err) {
// Restarting clients to update RBAC
config.RestartClients()
Expand All @@ -72,6 +68,7 @@ func waitForMachineConfigV2(d *schema.ResourceData, config *Config, interval tim
select {
case <-time.After(rancher2RetriesWait * time.Second):
case <-ctx.Done():
d.SetId("")
return fmt.Errorf("Timeout waiting for machine config V2 ID %s", d.Id())
}
}
Expand Down

0 comments on commit d9facff

Please sign in to comment.