{"record":{"id":"9ae31f04e1c152e8","repo":"vitessio/vitess","slug":"file-not-present-v","errorCode":null,"errorMessage":"file not present : %v","messagePattern":"file not present : (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"go/vt/mysqlctl/cephbackupstorage/ceph.go","lineNumber":284,"sourceCode":"\t}\n\treturn nil\n}\n\nfunc (bs *CephBackupStorage) WithParams(params backupstorage.Params) backupstorage.BackupStorage {\n\t// TODO(maxeng): return a new CephBackupStorage that uses params.\n\treturn bs\n}\n\n// client returns the Ceph Storage client instance.\n// If there isn't one yet, it tries to create one.\nfunc (bs *CephBackupStorage) client() (*minio.Client, error) {\n\tbs.mu.Lock()\n\tdefer bs.mu.Unlock()\n\n\tif bs._client == nil {\n\t\tconfigFile, err := os.Open(configFilePath)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"file not present : %v\", err)\n\t\t}\n\t\tdefer configFile.Close()\n\t\tjsonParser := json.NewDecoder(configFile)\n\t\tif err = jsonParser.Decode(&storageConfig); err != nil {\n\t\t\treturn nil, fmt.Errorf(\"error parsing the json file : %v\", err)\n\t\t}\n\n\t\taccessKey := storageConfig.AccessKey\n\t\tsecretKey := storageConfig.SecretKey\n\t\turl := storageConfig.EndPoint\n\t\tuseSSL := storageConfig.UseSSL\n\n\t\tclient, err := minio.NewV2(url, accessKey, secretKey, useSSL)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tbs._client = client\n\t}","sourceCodeStart":266,"sourceCodeEnd":302,"githubUrl":"https://github.com/vitessio/vitess/blob/01a25a7d176f94613b8d59d799f438380a8760e4/go/vt/mysqlctl/cephbackupstorage/ceph.go#L266-L302","documentation":"CephBackupStorage.client lazily opens the Ceph configuration file (configFilePath, typically an /etc/ceph style config) before creating a RADOS client. If the file cannot be opened, this error wraps the os.Open failure. All backup listing/creation/deletion through Ceph depends on this config being present.","triggerScenarios":"ListBackups, StartBackup, or RemoveBackup is called while bs._client is nil and os.Open(configFilePath) fails — the ceph config file is missing at the configured path, or the process lacks read permission on it.","commonSituations":"Ceph config not mounted/deployed on the tablet host; wrong ceph_backup_storage config path flag; running in a container without the /etc/ceph mount; permissions tightened after install.","solutions":["Verify the ceph config file exists at the configured path on the host running the tablet.","Check file permissions so the vitess process user can read it.","Mount the /etc/ceph directory (or the config secret) into containers/pods.","Confirm the ceph_backup_storage config-file flag/parameter points at the right path, then retry the operation."],"exampleFix":"// before\n# tablet host: no /etc/ceph/ceph.conf\n// after\n$ ls -l /etc/ceph/ceph.conf   # ensure present and readable\n$ kubectl create secret generic ceph-config --from-file=ceph.conf && mount it on tablets","handlingStrategy":"validation","validationCode":"if _, err := os.Stat(configFilePath); err != nil {\n\treturn fmt.Errorf(\"ceph config missing at %s: %w\", configFilePath, err)\n}","typeGuard":null,"tryCatchPattern":"backups, err := bs.ListBackups(ctx, dir)\nif err != nil && strings.Contains(err.Error(), \"file not present\") {\n\t// deploy/mount the ceph config at the configured path, then retry\n}","preventionTips":["Ship the Ceph config with the tablet deployment (secret/mount).","Verify ceph_backup_storage config paths in every environment.","Add a startup check that fails fast if the Ceph config file is unreadable."],"tags":["ceph","configuration","filesystem","backup-storage"],"backgroundTag":"missing-config-file","analyzedSha":"01a25a7d176f94613b8d59d799f438380a8760e4","analyzedAt":"2026-09-01T17:28:30.605Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}