I have deployed percona-operator and percona server for mongodb using helm on GKE cluster (gke-v1.21.14).
MongoDB(percona-server-mongodb:6.0.3) replicaset is running fine.
But I’m unable to setup the backups as I’m getting this error in backup-agent (pbm sidecar) container.
2023-01-19T19:16:46.000+0000 E [agentCheckup] check storage connection: unable to get storage: get config: get: mongo: no documents in result │
│ 2023-01-19T19:16:51.000+0000 E [agentCheckup] check storage connection: unable to get storage: get config: get: mongo: no documents in result │
│ 2023-01-19T19:16:56.000+0000 E [agentCheckup] check storage connection: unable to get storage: get config: get: mongo: no documents in result
Output of pbm list command from pbm container.
bash-4.4$ pbm config list
Error: unable to get config key: invalid config key
Output of pbm status
bash-4.4$ pbm status
Error: get status of pitr: check for errors: get current epoch: get config: get: mongo: no documents in result
bash-4.4$ pbm status -s cluster
Cluster:
========
rs0:
- rs0/psmdb6-of-rs0-1.psmdb6-of-rs0.la5-inf-wyn.svc.cluster.local:27017 [S]: pbm-agent v2.0.3 FAILED status:
> ERROR with storage: unable to get storage: get config: get: mongo: no documents in result
- rs0/psmdb6-of-rs0-0.psmdb6-of-rs0.la5-inf-wyn.svc.cluster.local:27017 [P]: pbm-agent v2.0.3 FAILED status:
> ERROR with storage: unable to get storage: get config: get: mongo: no documents in result
- rs0/psmdb6-of-rs0-2.psmdb6-of-rs0.la5-inf-wyn.svc.cluster.local:27017 [S]: pbm-agent v2.0.3 FAILED status:
> ERROR with storage: unable to get storage: get config: get: mongo: no documents in result
Here are the operator logs
│ 2023-01-20T19:28:00.534Z INFO controller_psmdb Waiting for the pods {"replset": "rs0", "size": 3, "pods": 2} │
│ 2023-01-20T19:28:05.572Z INFO controller_psmdb Waiting for the pods {"replset": "rs0", "size": 3, "pods": 2} │
│ 2023-01-20T19:28:41.484Z INFO controller_psmdb Cluster state changed {"previous": "initializing", "current": "ready"} │
│ 2023-01-20T19:28:41.691Z INFO controller_psmdb Point-in-time recovery will work only with full backup. Please create one manually or wait for scheduled backup to be created (if configured). │
│ 2023-01-20T19:28:46.689Z INFO controller_psmdb Point-in-time recovery will work only with full backup. Please create one manually or wait for scheduled backup to be created (if configured). │
│ 2023-01-20T19:28:51.883Z INFO controller_psmdb Point-in-time recovery will work only with full backup. Please create one manually or wait for scheduled backup to be created (if configured).
Here is the config for backup option in PSMDB custom resource:
backup:
enabled: true
image: percona/percona-backup-mongodb:2.0.3
pitr:
compressionLevel: 6
compressionType: gzip
enabled: true
oplogSpanMin: 10
serviceAccountName: psmdb-backup-agent
storages:
google-cloud-storage-s3:
s3:
bucket: percona-backups
credentialsSecret: google-cloud-storage-s3-backup
endpointUrl: https://storage.googleapis.com/
prefix: mongodb-of/
region: europe-west-1
type: s3
I read through this doc Backup and restore - Percona Operator for MongoDB to setup the backups.
So, is there something missing here in the storage config to connect to the GCS bucket?
Can someone please take a look and see how can this be resolved?
Thank you.