Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backup fails to get created when using a minio backend with base64 encoded certs #14

Closed
soumyalj opened this issue Aug 31, 2020 · 1 comment
Assignees

Comments

@soumyalj
Copy link

What kind of request is this (question/bug/enhancement/feature request): Bug

Steps to reproduce (least amount of steps as possible):

  1. Launch backup-restore-operator app providing minio backend. Provide a dummy region and provide the certs in base64 encoded form
debug: false
global:
  systemDefaultRegistry: ''
image: rancher/backup-restore-operator
pvc: {}
s3: 
  credentialSecretName: miniocreds
  bucketName: backups
  region: us-west-2
  endpoint: minio.x.yz.a.xip.io
  endpointCA: abcdef
tag: v0.0.1-rc4

  1. Create a backup with the config below:
apiVersion: resources.cattle.io/v1
kind: Backup
metadata:
  name: test1
  namespace: default
#  annotations:
#    key: string
#  labels:
#    key: string
spec:
#  encryptionConfigName: string
   resourceSetName: ecm-resource-set


Backup fails with an error

ERRO[2020/08/31 21:13:54] error syncing 'default/bkp3': handler backups: failed to check s3 bucket:rancherbackups, err:400 Bad Request, requeuing

backup-restore-operator logs:

ERRO[2020/08/31 21:13:54] error syncing 'default/bkp3': handler backups: failed to check s3 bucket:rancherbackups, err:400 Bad Request, requeuing
INFO[2020/08/31 21:13:54] Processing backup bkp1
INFO[2020/08/31 21:13:54] For backup CR bkp1, filename: default-bkp1-4b824d64-513b-4667-a77e-de2567128fe3-2020-08-31T21#13#54Z
INFO[2020/08/31 21:13:54] Temporary backup path for storing all contents for backup CR bkp1 is /tmp/default-bkp1-4b824d64-513b-4667-a77e-de2567128fe3-2020-08-31T21#13#54Z658372547
INFO[2020/08/31 21:13:54] Using resourceSet ecm-resource-set for gathering resources for backup CR bkp1
INFO[2020/08/31 21:13:54] Gathering resources for backup CR bkp1
INFO[2020/08/31 21:13:54] Gathering resources for groupVersion: v1
INFO[2020/08/31 21:13:54] resource kind namespaces, matched regex ^namespaces$
INFO[2020/08/31 21:13:54] Gathering resources for groupVersion: v1
INFO[2020/08/31 21:13:54] resource kind secrets, matched regex ^Secret$|^serviceaccounts$
INFO[2020/08/31 21:13:54] resource kind serviceaccounts, matched regex ^Secret$|^serviceaccounts$
INFO[2020/08/31 21:13:54] invoking set s3 service client                s3-accessKey=6EukuHPdeaY s3-bucketName=rancherbackups s3-endpoint=abcd.xip.io s3-endpoint-ca=LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURHakNDQWdLZ0F3SUJBZ0lKQUpscFM4Skowb2RMTUEwR0NTcUdTSWIzRFFFQkN3VUFNQkl4RURBT0JnTlYKQkFNTUIzUmxjM1F0WTJFd0hoY05NakF3T0RNeE1UazFOakF3V2hjTk1qQXhUUVBCnVPd3pFVGpuRkpFTnNDdml6TE0rNUp4QU9pVnRqbThQY3ZkQmFGbkxXM1pFMU5LN0d6N3hobkRBOUw4dlcySFgKd0JocHp4WWRiYm1OTE9IeVlqdnlEL1lNMGhhelFMNlRYNXEzRG85VWRXZmZUbUFyaWdEQnFoUFBVhS21pMGYxaDhLVHRsUFRvbWdKVzRIQQotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0t s3-folder= s3-region=us-west-2
INFO[2020/08/31 21:13:54] Gathering resources for groupVersion: rbac.authorization.k8s.io/v1
INFO[2020/08/31 21:13:54] resource kind rolebindings, matched regex ^roles$|^rolebindings$
INFO[2020/08/31 21:13:54] resource kind roles, matched regex ^roles$|^rolebindings$
INFO[2020/08/31 21:13:54] Gathering resources for groupVersion: rbac.authorization.k8s.io/v1
INFO[2020/08/31 21:13:54] resource kind clusterrolebindings, matched regex ^clusterrolebindings$
ERRO[2020/08/31 21:13:55] error syncing 'default/bkp2': handler backups: failed to check s3 bucket:rancherbackups, err:400 Bad Request, requeuing
INFO[2020/08/31 21:13:55] Processing backup bkp3

@soumyalj
Copy link
Author

soumyalj commented Sep 1, 2020

Tested with master-head(master-c428bc9feb4).
Backup-restore-operator: v0.0.1-rc7
Steps:

  1. Install the backup-restore operator using helm chart by specifying S3 minio config details in the values.yml . Do not provide region parameter. Provide the certs in base64 encoded format.
debug: false
global:
  systemDefaultRegistry: ''
image: rancher/backup-restore-operator
pvc: {}
s3: 
  credentialSecretName: miniocreds
  bucketName: rancherbackups
  endpoint: minio.a.b.c.d.xip.io
  endpointCA: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURHakNDQWdLZ0F3SUJBZ0lKQUpscFM4Skowb2RMTUEwR0NTcUdTSWIzRFFFQkN3VUFNQkl4RURBT0JnTlYKQkFNTUIzUmxjM1F0WTJFd0hoY05NakF3T0RNeE1UazFOakF3V2hjTk1qQXhNRE1
tag: v0.0.1-rc4

helm install backup-restore-operator packages/backup-restore-operator/charts -n cattle-resources-system 
  1. Create few rke templates, roles, user in rancher
  2. Create a backup min1 in the UI. Verified that backup min1 is created in the minio backend
  3. Create another set of rke templates, roles, users in rancher.
  4. Create another backup "min2" in the UI. Verify the backup is created in minio
  5. Restore to "min1". Restore succeeds and resources created in backup "min1" are available.

@soumyalj soumyalj closed this as completed Sep 1, 2020
@maggieliu maggieliu transferred this issue from rancher/rancher Sep 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants