{"record":{"id":"ce8a5f1acaf0db51","repo":"kubernetes/kops","slug":"error-listing-files-in-state-store-v","errorCode":null,"errorMessage":"error listing files in state store: %v","messagePattern":"error listing files in state store: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/client/simple/vfsclientset/clientset.go","lineNumber":143,"sourceCode":"}\n\nfunc (c *VFSClientset) pkiPath(cluster *kops.Cluster) (vfs.Path, error) {\n\tif cluster.Spec.ConfigStore.Keypairs == \"\" {\n\t\tconfigBase, err := registry.ConfigBase(c.VFSContext(), cluster)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\treturn configBase.Join(\"pki\"), nil\n\t} else {\n\t\tstorePath, err := c.VFSContext().BuildVfsPath(cluster.Spec.ConfigStore.Keypairs)\n\t\treturn storePath, err\n\t}\n}\n\nfunc DeleteAllClusterState(ctx context.Context, basePath vfs.Path) error {\n\tpaths, err := basePath.ReadTree(ctx)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"error listing files in state store: %v\", err)\n\t}\n\n\tfor _, path := range paths {\n\t\trelativePath, err := vfs.RelativePath(basePath, path)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif relativePath == \"\" {\n\t\t\tcontinue\n\t\t}\n\n\t\t// \"cluster.spec\" was written by kOps 1.21 and earlier.\n\t\tif relativePath == \"config\" || relativePath == \"cluster.spec\" || relativePath == \"cluster-completed.spec\" || relativePath == registry.PathKopsVersionUpdated {\n\t\t\tcontinue\n\t\t}\n\t\tif strings.HasPrefix(relativePath, \"addons/\") {\n\t\t\tcontinue","sourceCodeStart":125,"sourceCodeEnd":161,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/pkg/client/simple/vfsclientset/clientset.go#L125-L161","documentation":"ReadTree over the cluster's config base in the state store failed while preparing to delete all cluster state; a VFS listing error (bucket permissions, network, or a malformed path) prevents enumeration of files to delete.","triggerScenarios":"Thrown at pkg/client/simple/vfsclientset/clientset.go:143 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the state store path is correct and listable","Check bucket credentials and list permissions","Retry after restoring connectivity to the state store"],"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"}