Having difficulties enabling backups with MongoDB Operator 1.10 (header errors)

I have the following messages repeating in the logs for my backup-agents

Head "https://s3.amazonaws.com/<bucket-location>/.pbm.init": net/http: invalid header field value "AWS4-HMAC-SHA256 Credential=...

I have tried with both the percona/percona-server-mongodb-operator:1.10.0-backup and perconalab/percona-server-mongodb-operator:main-backup images but get the same result. I have also confirmed that my AWS/S3 keys (provided via credentialsSecret named secret) do not include a newline (mentioned elsewhere), and are properly encoded. Also confirmed that everything is in the same namespace.

Kinda at my wits end at this point. Any help the community can offer would be greatly appreciated.

3 Likes

Hey @Mike_Javorski ,

could you please share your cr.yaml? Are you getting this error when you try to take the backup or it happens without taking a backup?

1 Like

I have the same error when run backup command
kubectl apply -f backup/backup.yaml

Here is my cr.yaml on storages section

backup:
    enabled: true
    restartOnFailure: true
    image: percona/percona-server-mongodb-operator:1.10.0-backup
    serviceAccountName: percona-server-mongodb-operator
#    resources:
#      limits:
#        cpu: "300m"
#        memory: "0.5G"
#      requests:
#        cpu: "300m"
#        memory: "0.5G"
    storages:
      s3-us-west:
        type: s3
        s3:
          bucket: mongodbs-backup-test
          credentialsSecret: mongodbs-backup-s3
          region: us-west-2
          prefix: ""

and here is secrete config file

apiVersion: v1
kind: Secret
metadata:
  name: mongodbs-backup-s3
type: Opaque
data:
  AWS_ACCESS_KEY_ID: <MY BASE64 ENCODED KEY>
  AWS_SECRET_ACCESS_KEY: <MY BASE64 ENCODED KEY>
1 Like