Uploaded image for project: 'Couchbase Kubernetes'
  1. Couchbase Kubernetes
  2. K8S-2271

Unrecognized operator backup argument

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.1.0, 2.2.0
    • 2.2.1
    • operator, operator-backup
    • None
    • 1

    Description

      The CronJob command line arguments generated for a CouchbaseBackup include "–threads 1" which produces the following error when run...

      usage: backup_script [-h] [-s STRATEGY] [-c CONFIG] [-m MODE] [-r REPO]
      [--start START] [--end END] [-b BACKUP_RET]
      [--cacert CACERT] [-l LOG_RET] [-v VERBOSITY]
      [--s3-bucket S3_BUCKET] [--s3-region S3_REGION]
      [--s3-access-key-id S3_ACCESS_KEY_ID]
      [--s3-secret-access-key S3_SECRET_ACCESS_KEY]
      cluster
      backup_script: error: unrecognized arguments: --threads 1

      Manually removing the "--threads 1" argument resolves the issue.

      (This is for operator:2.2.0 and operator-backup:1.1.0.)

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          simon.murray Simon Murray added a comment -

          Yeah I was mistaken too, the update code does appear to work, seems Kubernetes has changed to be more user friendly!  The cronjob update should be practically instantaneous, so that's still a mystery as to why the delay.

          simon.murray Simon Murray added a comment - Yeah I was mistaken too, the update code does appear to work, seems Kubernetes has changed to be more user friendly!  The cronjob update should be practically instantaneous, so that's still a mystery as to why the delay.
          simon.murray Simon Murray added a comment -

          We believe this is a race.

          simon.murray Simon Murray added a comment - We believe this is a race.
          tin.tran Tin Tran added a comment -

          Hi Simon Murray
          I'm reopening this issue as I was able to reproduce this error on 2.2.1 with the following config:

          metadata:
            name: cb-test
          spec:
            paused: false
            image: couchbase/server:6.6.2
          

            backup:
              managed: true
              image: couchbase/operator-backup:6.6.0-102
              serviceAccountName: couchbase-backup
              resources:
                requests:
                  cpu: 2000m
                  memory: 300Mi
              selector:
                matchLabels:
                  cluster: cb-test
          

          apiVersion: couchbase.com/v2
          kind: CouchbaseBackup
          metadata:
            name: my-backup
            labels:
              cluster: cb-test
          spec:
            strategy: full_incremental
            full:
              schedule: "*/10 * * * *"
            incremental:
              schedule: "*/2 * * * *"
            successfulJobsHistoryLimit: 10
            failedJobsHistoryLimit: 3
            backoffLimit: 2
            backupRetention: 24h
            logRetention: 24h
            size: 5Gi
            storageClassName: standard
          
          

          The backup failed with the following error:

          kcl my-backup-incremental-1635379920-kskqw
          usage: backup_script [-h] [-s STRATEGY] [-c CONFIG] [-m MODE] [-r REPO]
          [--start START] [--end END] [-b BACKUP_RET]
          [--cacert CACERT] [-l LOG_RET] [-v VERBOSITY]
          [--s3-bucket S3_BUCKET] [--s3-region S3_REGION]
          [--s3-access-key-id S3_ACCESS_KEY_ID]
          [--s3-secret-access-key S3_SECRET_ACCESS_KEY]
          cluster
          backup_script: error: unrecognized arguments: --threads 1
          

          Attaching cbopinfo logs:

          tin.tran Tin Tran added a comment - Hi Simon Murray I'm reopening this issue as I was able to reproduce this error on 2.2.1 with the following config: metadata: name: cb-test spec: paused: false image: couchbase/server:6.6.2 backup: managed: true image: couchbase/operator-backup:6.6.0-102 serviceAccountName: couchbase-backup resources: requests: cpu: 2000m memory: 300Mi selector: matchLabels: cluster: cb-test apiVersion: couchbase.com/v2 kind: CouchbaseBackup metadata: name: my-backup labels: cluster: cb-test spec: strategy: full_incremental full: schedule: "*/10 * * * *" incremental: schedule: "*/2 * * * *" successfulJobsHistoryLimit: 10 failedJobsHistoryLimit: 3 backoffLimit: 2 backupRetention: 24h logRetention: 24h size: 5Gi storageClassName: standard The backup failed with the following error: kcl my-backup-incremental-1635379920-kskqw usage: backup_script [-h] [-s STRATEGY] [-c CONFIG] [-m MODE] [-r REPO] [--start START] [--end END] [-b BACKUP_RET] [--cacert CACERT] [-l LOG_RET] [-v VERBOSITY] [--s3-bucket S3_BUCKET] [--s3-region S3_REGION] [--s3-access-key-id S3_ACCESS_KEY_ID] [--s3-secret-access-key S3_SECRET_ACCESS_KEY] cluster backup_script: error: unrecognized arguments: --threads 1 Attaching cbopinfo logs:

          That version of backup is not supported for 2.2.1: https://docs.couchbase.com/operator/current/prerequisite-and-setup.html#couchbase-backup-and-restore-compatibility

          You must use couchbase/operator-backup:1.1.0. Changing the image version should have little impact as these are cron jobs that spawn new pods as required.

          patrick.stephens Patrick Stephens (Inactive) added a comment - - edited That version of backup is not supported for 2.2.1: https://docs.couchbase.com/operator/current/prerequisite-and-setup.html#couchbase-backup-and-restore-compatibility You must use couchbase/operator-backup:1.1.0. Changing the image version should have little impact as these are cron jobs that spawn new pods as required.

          Not sure what's happened to that comment you added Tin Tran I can see in the history. The compatibility matrix is a known issue with docs, the backup image we supply is compatible.

          See https://issues.couchbase.com/browse/DOC-6711 

          patrick.stephens Patrick Stephens (Inactive) added a comment - - edited Not sure what's happened to that comment you added Tin Tran  I can see in the history. The compatibility matrix is a known issue with docs, the backup image we supply is compatible. See https://issues.couchbase.com/browse/DOC-6711  

          People

            tin.tran Tin Tran
            jonasrmichel Jonas Michel
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty