Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-61631

[CBM] Cloud backup fails if staging directory is a relative path

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 7.6.2
    • 7.6.0, 7.6.1
    • tools
    • Untriaged
    • 0
    • Unknown
    • Tools 2024-Q1

    Description

      What is the problem?
      If you pass --obj-staging-dir as a relative path restores fails due to the key being empty. Example from GCP:

      Error restoring cluster: failed to execute cluster operations: failed to execute bucket operation for bucket 'beer-sample': failed to transfer bucket data for bucket 'beer-sample': failed to transfer key value data: failed to transfer key value data: failed to stop worker pool: fai
      led to open source vBucket 1021: failed to open vBucket 1021: failed to open data store: failed to get object: storage: object name is empty
      

      Backups also fail in a similar way.

      The problem originates in PathToKey where we try and get a relative path using the staging directory path and the path parameter. The staging directory path here is a full path to the staging directory, whereas the path parameter is a relative path, meaning filepath.Rel fails, and we ignore the error.

      Is there a workaround
      Pass an absolute path to --obj-staging-dir

      What is the solution?
      When the program starts we should turn --obj-staging-dir into an absolute path so that whenever it is used it is an absolute path.

      Attachments

        For Gerrit Dashboard: MB-61631
        # Subject Branch Project Status CR V

        Activity

          People

            gilad.kalchheim Gilad Kalchheim
            Matt.Hall Matt Hall
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty