{"record":{"id":"0930b1ae43bf9c80","repo":"kubernetes/kops","slug":"method-metal-cloud-detachinstance-not-implemented","errorCode":null,"errorMessage":"method metal.Cloud::DetachInstance not implemented","messagePattern":"method metal\\.Cloud::DetachInstance not implemented","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/metal/cloud.go","lineNumber":72,"sourceCode":"\n// DeleteInstance deletes a cloud instance.\nfunc (c *Cloud) DeleteInstance(instance *cloudinstances.CloudInstance) error {\n\treturn fmt.Errorf(\"method metal.Cloud::DeleteInstance not implemented\")\n}\n\n// // DeregisterInstance drains a cloud instance and loadbalancers.\nfunc (c *Cloud) DeregisterInstance(instance *cloudinstances.CloudInstance) error {\n\treturn fmt.Errorf(\"method metal.Cloud::DeregisterInstance not implemented\")\n}\n\n// DeleteGroup deletes the cloud resources that make up a CloudInstanceGroup, including the instances.\nfunc (c *Cloud) DeleteGroup(group *cloudinstances.CloudInstanceGroup) error {\n\treturn fmt.Errorf(\"method metal.Cloud::DeleteGroup not implemented\")\n}\n\n// DetachInstance causes a cloud instance to no longer be counted against the group's size limits.\nfunc (c *Cloud) DetachInstance(instance *cloudinstances.CloudInstance) error {\n\treturn fmt.Errorf(\"method metal.Cloud::DetachInstance not implemented\")\n}\n\n// GetCloudGroups returns a map of cloud instances that back a kops cluster.\n// Detached instances must be returned in the NeedUpdate slice.\nfunc (c *Cloud) GetCloudGroups(cluster *kops.Cluster, instancegroups []*kops.InstanceGroup, warnUnmatched bool, nodes []v1.Node) (map[string]*cloudinstances.CloudInstanceGroup, error) {\n\tgroups := make(map[string]*cloudinstances.CloudInstanceGroup)\n\tfor _, ig := range instancegroups {\n\t\tcloudInstanceGroup := &cloudinstances.CloudInstanceGroup{\n\t\t\tInstanceGroup: ig,\n\t\t}\n\t\tgroups[ig.ObjectMeta.Name] = cloudInstanceGroup\n\t\tfor _, node := range nodes {\n\t\t\tisControlPlaneNode := false\n\t\t\tfor k := range node.Labels {\n\t\t\t\tif k == \"node-role.kubernetes.io/control-plane\" {\n\t\t\t\t\tisControlPlaneNode = true\n\t\t\t\t}\n","sourceCodeStart":54,"sourceCodeEnd":90,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/metal/cloud.go#L54-L90","documentation":"Stub-method error: metal.Cloud.DetachInstance is unimplemented, so detaching a machine (e.g. for detached instance groups) is unsupported on bare metal. Fires when a detach operation is requested against the metal provider.","triggerScenarios":"Thrown at upup/pkg/fi/cloudup/metal/cloud.go:72 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Avoid detached-instance-group flows with the metal provider","Manage machine detachment manually outside kOps","Implement DetachInstance if metal supports it later"],"exampleFix":null,"handlingStrategy":"fallback","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"}