{"record":{"id":"a527b93b42451cc3","repo":"kubernetes/kops","slug":"error-updating-targetpools-for-instancegroupmanage","errorCode":null,"errorMessage":"error updating TargetPools for InstanceGroupManager: %v","messagePattern":"error updating TargetPools for InstanceGroupManager: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/gcetasks/instancegroupmanager.go","lineNumber":140,"sourceCode":"\n\tif a == nil {\n\t\tif i.TargetSize == 0 {\n\t\t\t// TargetSize 0 will normally be omitted by the marshaling code; we need to force it\n\t\t\ti.ForceSendFields = append(i.ForceSendFields, \"TargetSize\")\n\t\t}\n\t\top, err := t.Cloud.Compute().InstanceGroupManagers().Insert(t.Cloud.Project(), *e.Zone, i)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"error creating InstanceGroupManager: %v\", err)\n\t\t}\n\n\t\tif err := t.Cloud.WaitForOp(op); err != nil {\n\t\t\treturn fmt.Errorf(\"error creating InstanceGroupManager: %v\", err)\n\t\t}\n\t} else {\n\t\tif changes.TargetPools != nil {\n\t\t\top, err := t.Cloud.Compute().InstanceGroupManagers().SetTargetPools(t.Cloud.Project(), *e.Zone, i.Name, i.TargetPools)\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"error updating TargetPools for InstanceGroupManager: %v\", err)\n\t\t\t}\n\n\t\t\tif err := t.Cloud.WaitForOp(op); err != nil {\n\t\t\t\treturn fmt.Errorf(\"error updating TargetPools for InstanceGroupManager: %v\", err)\n\t\t\t}\n\n\t\t\tchanges.TargetPools = nil\n\t\t}\n\n\t\tif changes.InstanceTemplate != nil {\n\t\t\top, err := t.Cloud.Compute().InstanceGroupManagers().SetInstanceTemplate(t.Cloud.Project(), *e.Zone, i.Name, instanceTemplateURL)\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"error updating InstanceTemplate for InstanceGroupManager: %v\", err)\n\t\t\t}\n\n\t\t\tif err := t.Cloud.WaitForOp(op); err != nil {\n\t\t\t\treturn fmt.Errorf(\"error updating InstanceTemplate for InstanceGroupManager: %v\", err)\n\t\t\t}","sourceCodeStart":122,"sourceCodeEnd":158,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/gcetasks/instancegroupmanager.go#L122-L158","documentation":"Wrapped error from InstanceGroupManager.RenderGCE when the InstanceGroupManagers.SetTargetPools call fails while reconciling target-pool membership on an existing IGM (changes.TargetPools != nil). The underlying cause is in the %v detail — commonly a target pool that is missing, in the wrong region, or a transient API error.","triggerScenarios":"Thrown at upup/pkg/fi/cloudup/gcetasks/instancegroupmanager.go:140 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the wrapped API error for the exact reason","Verify all target pools referenced by the IGM exist in the same region","Retry after fixing references or transient API conditions"],"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"}