{"record":{"id":"080eeaf2063e87b7","repo":"kubernetes/kops","slug":"error-deleting-cluster-files-in-s-w","errorCode":null,"errorMessage":"error deleting cluster files in %s: %w","messagePattern":"error deleting cluster files in (.+?): %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/client/simple/vfsclientset/clientset.go","lineNumber":191,"sourceCode":"\t\t\tcontinue\n\t\t}\n\t\tif strings.HasPrefix(relativePath, \"igconfig/\") {\n\t\t\tcontinue\n\t\t}\n\t\tif strings.HasPrefix(relativePath, \"manifests/\") {\n\t\t\tcontinue\n\t\t}\n\t\t// TODO: offer an option _not_ to delete backups?\n\t\tif strings.HasPrefix(relativePath, \"backups/\") {\n\t\t\tcontinue\n\t\t}\n\n\t\treturn fmt.Errorf(\"refusing to delete: unknown file found: %s\", path)\n\t}\n\n\terr = basePath.RemoveAll(ctx)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"error deleting cluster files in %s: %w\", basePath, err)\n\t}\n\n\treturn nil\n}\n\nfunc (c *VFSClientset) DeleteCluster(ctx context.Context, cluster *kops.Cluster) error {\n\tif cluster.Spec.ServiceAccountIssuerDiscovery != nil {\n\t\tdiscoveryStore := cluster.Spec.ServiceAccountIssuerDiscovery.DiscoveryStore\n\t\tif discoveryStore != \"\" {\n\t\t\tpath, err := c.VFSContext().BuildVfsPath(discoveryStore)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t\terr = path.Join(\"openid/v1/jwks\").Remove(ctx)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}","sourceCodeStart":173,"sourceCodeEnd":209,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/pkg/client/simple/vfsclientset/clientset.go#L173-L209","documentation":"The recursive RemoveAll of the cluster's config base failed after the safety scan passed; the VFS layer could not delete one or more objects (permissions, concurrent modification, or network errors).","triggerScenarios":"Thrown at pkg/client/simple/vfsclientset/clientset.go:191 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check delete permissions on the state store bucket/prefix","Retry kops delete cluster","Manually empty the bucket prefix if objects are stuck"],"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"}