vitessio/vitess · error

file not present : %v

Error message

file not present : %v

What it means

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.

Source

Thrown at go/vt/mysqlctl/cephbackupstorage/ceph.go:284

	}
	return nil
}

func (bs *CephBackupStorage) WithParams(params backupstorage.Params) backupstorage.BackupStorage {
	// TODO(maxeng): return a new CephBackupStorage that uses params.
	return bs
}

// client returns the Ceph Storage client instance.
// If there isn't one yet, it tries to create one.
func (bs *CephBackupStorage) client() (*minio.Client, error) {
	bs.mu.Lock()
	defer bs.mu.Unlock()

	if bs._client == nil {
		configFile, err := os.Open(configFilePath)
		if err != nil {
			return nil, fmt.Errorf("file not present : %v", err)
		}
		defer configFile.Close()
		jsonParser := json.NewDecoder(configFile)
		if err = jsonParser.Decode(&storageConfig); err != nil {
			return nil, fmt.Errorf("error parsing the json file : %v", err)
		}

		accessKey := storageConfig.AccessKey
		secretKey := storageConfig.SecretKey
		url := storageConfig.EndPoint
		useSSL := storageConfig.UseSSL

		client, err := minio.NewV2(url, accessKey, secretKey, useSSL)
		if err != nil {
			return nil, err
		}
		bs._client = client
	}

View on GitHub (pinned to 01a25a7d17)

Solutions

  1. Verify the ceph config file exists at the configured path on the host running the tablet.
  2. Check file permissions so the vitess process user can read it.
  3. Mount the /etc/ceph directory (or the config secret) into containers/pods.
  4. Confirm the ceph_backup_storage config-file flag/parameter points at the right path, then retry the operation.

Example fix

// before
# tablet host: no /etc/ceph/ceph.conf
// after
$ ls -l /etc/ceph/ceph.conf   # ensure present and readable
$ kubectl create secret generic ceph-config --from-file=ceph.conf && mount it on tablets
Defensive patterns

Strategy: validation

Validate before calling

if _, err := os.Stat(configFilePath); err != nil {
	return fmt.Errorf("ceph config missing at %s: %w", configFilePath, err)
}

Try / catch

backups, err := bs.ListBackups(ctx, dir)
if err != nil && strings.Contains(err.Error(), "file not present") {
	// deploy/mount the ceph config at the configured path, then retry
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of vitessio/vitess@01a25a7d17 (2026-09-01). Data as JSON: /api/errors/9ae31f04e1c152e8. Report an issue: GitHub.