[Error] backup-agent: couldn't find key MONGODB_BACKUP_PASSWORD_ESCAPED in secret

Description:

We were already using PSMDB operator 1.18.0. We want to upgrade it to 1.19.0. After upgrade, getting below error in Percona Server MongoDB.
backup-agent: couldn’t find key MONGODB_BACKUP_PASSWORD_ESCAPED in Secret namespace/internal-project-mongo-users;

Secret has entry for key MONGODB_BACKUP_USER but not for MONGODB_BACKUP_PASSWORD_ESCAPED

Steps to Reproduce:

[Step-by-step instructions on how to reproduce the issue, including any specific settings or configurations]
Upgraded PSMDB operator to 1.19.0 from 1.18.0

Version:

[Insert the version number of the software]

Logs:

[If applicable, include any relevant log files or error messages]

Expected Result:

[What the user expected to see or happen before the issue occurred]

Actual Result:

[What actually happened when the user encountered the issue]

Additional Information:

[Include any additional information that could be helpful to diagnose the issue, such as browser or device information]

Hi @Pallavi
The MONGODB_BACKUP_USER/PASSWORD is used for PBM credentials. I did a test by upgrading the operator from 1.18.0 and didn’t see any error in further backups:

% k get psmdb -n psmdb118 -o json | jq -c '.items[].spec.crVersion'
"1.19.1"
% k apply -f backup/backup.yaml -n psmdb118
perconaservermongodbbackup.psmdb.percona.com/backup2 created
 % k get psmdb-backup -n psmdb118 -w
NAME      CLUSTER           STORAGE      DESTINATION                             TYPE       STATUS   COMPLETED   AGE
backup1   minimal-cluster   s3-us-west   s3://testRestore/2025-04-18T09:34:27Z   physical   ready    98m         100m
backup2   minimal-cluster   s3-us-west                                                                           2s
backup2   minimal-cluster   s3-us-west   s3://testRestore/2025-04-18T11:14:49Z              requested               21s
backup1   minimal-cluster   s3-us-west   s3://testRestore/2025-04-18T09:34:27Z   physical   ready       98m         100m
backup2   minimal-cluster   s3-us-west   s3://testRestore/2025-04-18T11:15:10Z              requested               42s
backup2   minimal-cluster   s3-us-west   s3://testRestore/2025-04-18T11:14:49Z   logical    ready       3s          47s
backup2   minimal-cluster   s3-us-west   s3://testRestore/2025-04-18T11:14:49Z   logical    ready       6s          50s

We will need more data to help you. Can you provide us the below outputs in a file attached? (put the output in a file and attach them)

kubectl get psmdb 
kubectl get secrets
kubectl get secret/internal-project-mongo-users -o yaml | grep -vi 'password'
kubectl get pods
kubectl get psmdb-backup
kubectl get events
kubectl logs pod/rs0-pod-name -c backup-agent
kubectl describe pod/rs0-pod-name

Also, how did you upgrade your operator?

Regards,
Vinodh Guruji