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

resource/alicloud_ecs_disk: Added retry strategy for error code LastTokenProcessing; Fixed the update error caused by field enable_auto_snapshot #8156

Merged
merged 1 commit into from
Jan 22, 2025
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
4 changes: 2 additions & 2 deletions alicloud/resource_alicloud_ecs_disk.go
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ func resourceAliCloudEcsDiskCreate(d *schema.ResourceData, meta interface{}) err
err = resource.Retry(d.Timeout(schema.TimeoutCreate), func() *resource.RetryError {
response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2014-05-26"), StringPointer("AK"), query, request, &runtime)
if err != nil {
if IsExpectedErrors(err, []string{"ServiceUnavailable", "UnknownError"}) || NeedRetry(err) {
if IsExpectedErrors(err, []string{"ServiceUnavailable", "UnknownError", "LastTokenProcessing"}) || NeedRetry(err) {
wait()
return resource.RetryableError(err)
}
Expand Down Expand Up @@ -448,7 +448,7 @@ func resourceAliCloudEcsDiskUpdate(d *schema.ResourceData, meta interface{}) err
}

enableAutoSnapshot, ok := d.GetOkExists("enable_auto_snapshot")
if ok && fmt.Sprint(objectRaw["EnableAutoSnapshot"]) != enableAutoSnapshot {
if ok && fmt.Sprint(objectRaw["EnableAutoSnapshot"]) != fmt.Sprint(enableAutoSnapshot) {
update = true
request["EnableAutoSnapshot"] = enableAutoSnapshot
}
Expand Down
Loading