{"record":{"id":"40a7b59a56206f00","repo":"kubernetes/kops","slug":"delete-server-s-waiting-for-instance-after-termi","errorCode":null,"errorMessage":"delete server %s: waiting for instance after termination: %w","messagePattern":"delete server (.+?): waiting for instance after termination: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/scaleway/cloud.go","lineNumber":641,"sourceCode":"\t\t}\n\t}\n\n\t// We terminate the server. This stops and deletes the machine immediately\n\t_, err = s.instanceAPI.ServerAction(&instance.ServerActionRequest{\n\t\tZone:     s.zone,\n\t\tServerID: server.ID,\n\t\tAction:   instance.ServerActionTerminate,\n\t})\n\tif err != nil && !is404Error(err) {\n\t\treturn fmt.Errorf(\"delete server %s: terminating instance: %w\", server.ID, err)\n\t}\n\n\t_, err = s.instanceAPI.WaitForServer(&instance.WaitForServerRequest{\n\t\tServerID: server.ID,\n\t\tZone:     s.zone,\n\t})\n\tif err != nil && !is404Error(err) {\n\t\treturn fmt.Errorf(\"delete server %s: waiting for instance after termination: %w\", server.ID, err)\n\t}\n\n\treturn nil\n}\n\nfunc (s *scwCloudImplementation) DeleteSSHKey(sshkey *iam.SSHKey) error {\n\terr := s.iamAPI.DeleteSSHKey(&iam.DeleteSSHKeyRequest{\n\t\tSSHKeyID: sshkey.ID,\n\t})\n\tif err != nil {\n\t\tif is404Error(err) {\n\t\t\tklog.V(8).Infof(\"SSH key %q (%s) was already deleted\", sshkey.Name, sshkey.ID)\n\t\t\treturn nil\n\t\t}\n\t\treturn fmt.Errorf(\"failed to delete ssh key %s: %w\", sshkey.ID, err)\n\t}\n\treturn nil\n}","sourceCodeStart":623,"sourceCodeEnd":659,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/scaleway/cloud.go#L623-L659","documentation":"In DeleteServer, WaitForServer did not end with a 404 after termination. After a successful terminate the server should disappear; a non-404 wait result means deletion stalled or the wait call itself errored, leaving the server in an unknown state. The wrapped error identifies which case occurred.","triggerScenarios":"Thrown at upup/pkg/fi/cloudup/scaleway/cloud.go:641 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the wrapped error to distinguish a wait timeout from an API error","Verify the server is actually gone in the Scaleway console","Re-run deletion — the terminate path tolerates already-deleted servers"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"4c8573c808a73d578c5eadc86d410646ea0b0d73","analyzedAt":"2026-09-05T04:13:19.212Z","contentChangedAt":"2026-09-05T04:13:19.212Z","schemaVersion":2},"datasetVersion":"2026-09-12T12:17:11.808Z"}