{"record":{"id":"7f0147ad08ecd8c8","repo":"kubernetes/kops","slug":"delete-server-s-terminating-instance-w","errorCode":null,"errorMessage":"delete server %s: terminating instance: %w","messagePattern":"delete server (.+?): terminating instance: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/scaleway/cloud.go","lineNumber":633,"sourceCode":"\t\t\t\t_, err = s.instanceAPI.DetachVolume(&instance.DetachVolumeRequest{\n\t\t\t\t\tZone:     s.zone,\n\t\t\t\t\tVolumeID: volume.ID,\n\t\t\t\t})\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn fmt.Errorf(\"delete server %s: detaching volume %s\", server.ID, volume.ID)\n\t\t\t\t}\n\t\t\t}\n\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 {","sourceCodeStart":615,"sourceCodeEnd":651,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/scaleway/cloud.go#L615-L651","documentation":"In DeleteServer, the ServerAction 'terminate' call (immediate stop+delete of the machine) failed with a non-404 error. 404s are deliberately tolerated (server already gone); any other SDK error — quota, locked state, permission — surfaces here with the server ID.","triggerScenarios":"Thrown at upup/pkg/fi/cloudup/scaleway/cloud.go:633 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the wrapped error for the terminate failure reason","Verify the server is not in a locked/stopped-transitional state","Retry deletion; terminate can fail transiently during concurrent operations"],"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-12T07:17:12.445Z"}