Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove extra return in machine template #1400

Merged
merged 2 commits into from
Sep 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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) {
jiaqiluo marked this conversation as resolved.
Show resolved Hide resolved
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