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

Error [Errno 13] Permission denied: '/data/scriptlogs' faced when try to use the backup option #126

Open
camilamacedo86 opened this issue May 22, 2024 · 2 comments

Comments

@camilamacedo86
Copy link

I am facing the error [Errno 13] Permission denied: '/data/scriptlogs' such as reported in: https://www.couchbase.com/forums/t/issue-with-file-permissions-setting-up-couchbase-backup-using-operator/34290

The SecurityContext option used:

    podSecurityContext:
      fsGroup: 1000
      runAsNonRoot: true
      runAsUser: 1000
      sysctls: []
      windowsOptions: {}
    securityContext:
      allowPrivilegeEscalation: false

Could you please let us know how we should configure the HelmChart to do the backups and do not face this issue?

Versions:

  • couchbase-operator-2.50.4
  • couchbase/operator-backup: 1.3.8 (latest) - Also, same issue faced with 1.3.5
@camilamacedo86
Copy link
Author

camilamacedo86 commented May 23, 2024

If we edit the cronjobs like kubectl edit cronjob couchbase-backup-full -n <namespace> to set

securityContext:                                                                                                                                           
            fsGroup: 1000

that works but the BUG is that the HelmChart and Operator (CRD BackupCouchbase) does not allow you set the securityContext to the cronjob :--(

Example

# -- CouchbaseBackups runs a job which preserves data into backups
backups:
  my-couchbase-backup:
    name: couchbase-backup
    strategy: full_incremental
    full:
      schedule: "0 3 * * 0"
    incremental:
      schedule: "0 3 * * 1-6"
    successfulJobsHistoryLimit: 1
    failedJobsHistoryLimit: 3
    securityContext:
      fsGroup: 1000

The securityContext need also become an spec of CouchbaseBackup.spec

@camilamacedo86
Copy link
Author

Hi @Lumin343, @tahmmee @etos @ceejatec @jeffdgr8

Folks, could you please add the option for we set the SecurityContext via the HelmChart/CouchBase backup ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant