{"record":{"id":"84beebad4fdb6664","repo":"kubernetes/kops","slug":"error-waiting-for-healthcheck-v","errorCode":null,"errorMessage":"error waiting for healthcheck: %v","messagePattern":"error waiting for healthcheck: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/gcetasks/healthcheck.go","lineNumber":156,"sourceCode":"\t\t\tPort: e.Port,\n\t\t}\n\tdefault:\n\t\thc.Type = \"TCP\"\n\t\thc.TcpHealthCheck = &compute.TCPHealthCheck{\n\t\t\tPort: e.Port,\n\t\t}\n\t}\n\n\tif a == nil {\n\t\tklog.V(2).Infof(\"Creating HealthCheck %q\", hc.Name)\n\n\t\top, err := cloud.Compute().RegionHealthChecks().Insert(cloud.Project(), cloud.Region(), hc)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"error creating healthcheck: %v\", err)\n\t\t}\n\n\t\tif err := cloud.WaitForOp(op); err != nil {\n\t\t\treturn fmt.Errorf(\"error waiting for healthcheck: %v\", err)\n\t\t}\n\t} else {\n\t\treturn fmt.Errorf(\"cannot apply changes to healthcheck: %v\", changes)\n\t}\n\n\treturn nil\n}\n\ntype terraformHealthCheckBlock struct {\n\tPort int64 `cty:\"port\"`\n}\n\ntype terraformHealthCheck struct {\n\tName           string                     `cty:\"name\"`\n\tTCPHealthCheck *terraformHealthCheckBlock `cty:\"tcp_health_check\"`\n\tSSLHealthCheck *terraformHealthCheckBlock `cty:\"ssl_health_check\"`\n}\n","sourceCodeStart":138,"sourceCodeEnd":174,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/gcetasks/healthcheck.go#L138-L174","documentation":"After the Insert call returns a GCE long-running operation, RenderGCE waits for it via cloud.WaitForOp(op). If the operation completes with an error (or polling fails), the error is wrapped with this message — meaning creation was submitted but did not finish successfully.","triggerScenarios":"The async insert operation fails during execution: quota exceeded at provisioning time, concurrent conflicting operation on the same health check, invalid resource reached the backend, or the polling loop itself errors/times out.","commonSituations":"Another operation (delete/update) was in flight on the same health check; regional quota hit between submit and execute; GCE backend rejected fields validated only server-side; transient API errors during polling.","solutions":["Check the operation's error details (HTTP error payload) in GCE Cloud Logging / Operations for the specific reason","Resolve conflicting concurrent operations and re-run the apply","Retry the apply — it will re-insert after backoff if the check was not created","Free up regional health-check quota if the error indicates quota"],"exampleFix":"null","handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"if err := cloud.WaitForOp(op); err != nil {\n\tvar gerr *googleapi.Error\n\tif errors.As(err, &gerr) && (gerr.Code == 429 || gerr.Code >= 500) {\n\t\ttime.Sleep(backoff)\n\t\t// re-run apply; Find will reconcile actual state\n\t}\n}","preventionTips":["Avoid concurrent applies against the same GCE project","Check GCE Operations/Cloud Logging for the async failure reason","Retry idempotently — the next apply reconciles or recreates","Provision quota headroom before large cluster changes"],"tags":["gce","health-check","operation","async-wait"],"backgroundTag":"gce-operation-failed","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"}