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

RBAC : cbbackupmgr fails with authentication error when trying to restore a backup with a user having data backup role

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Critical
    • 5.0.0
    • 5.0.0
    • rbac, tools
    • None
    • Untriaged
    • Unknown

    Description

      Build : 5.0.0-3236

      This came up while verifying the bug MB-25117. Backup with a user with Data Backup[*] role worked, but when restoring the backup with the same user, cbbackupmgr failed with error :
      Error restoring cluster: authentication error

      Steps :
      1. Create a bucket and have some docs in it. No views, no indexes.
      2. Create a user backupuser and grant the data_backup role to this user.
      3. Run cbbackupmgr as below :
      ./cbbackupmgr backup -c 10.111.151.101 -u backupuser -p password -a /tmp/backup -r backup
      4. Delete the bucket and recreate the bucket.
      5. Now restore to the same cluster using the following cmd :
      ./cbbackupmgr restore -c 10.111.151.101 -u backupuser -p password -a /tmp/backup -r backup

      It fails with the above mentioned error. Here is what is there in the backup.log

      2017-07-06T09:04:23.702+00:00 (Cmd) restore -c 10.111.151.104 -u backupuser -p ******** -a /tmp/backup -r backup 
      2017-07-06T09:04:23.704+00:00 (Rest) GET http://10.111.151.104:8091/pools 200
      2017-07-06T09:04:23.704+00:00 Lowering forestdb buffer cache size to 1073741824 due to insufficient memory
      2017-07-06T09:04:23.721+00:00 [INFO][FDB] Forestdb blockcache size 1073741824 initialized in 16670 us
       
      2017-07-06T09:04:23.721+00:00 [INFO][FDB] Forestdb opened database file /tmp/backup/backup/2017-07-06T09_02_07.044216212Z/beer-sample-f0b4a9a0bec634eca6321c12a45562b3/data/shard_0.fdb
      2017-07-06T09:04:23.722+00:00 [INFO][FDB] Forestdb closed database file /tmp/backup/backup/2017-07-06T09_02_07.044216212Z/beer-sample-f0b4a9a0bec634eca6321c12a45562b3/data/shard_0.fdb
      2017-07-06T09:04:23.722+00:00 Restoring data from backup 2017-07-06T09_02_07.044216212Z
      2017-07-06T09:04:23.723+00:00 (Plan) Executing transfer plan
      2017-07-06T09:04:23.723+00:00 (Plan) Checking for data movement restrictions between beer-sample and beer-sample
      2017-07-06T09:04:23.726+00:00 (Rest) GET http://10.111.151.104:8091/pools/default/buckets 200
      2017-07-06T09:04:23.727+00:00 (Plan) Transfering bucket configuration for beer-sample to beer-sample
      2017-07-06T09:04:23.730+00:00 (Rest) GET http://10.111.151.104:8091/pools/default/buckets 200
      2017-07-06T09:04:23.730+00:00 (Plan) Transfering views definitions for beer-sample to beer-sample
      2017-07-06T09:04:23.731+00:00 (Rest) GET http://10.111.151.104:8091/pools/default/nodeServices 200
      2017-07-06T09:04:23.784+00:00 (Rest) PUT http://10.111.151.104:8091/couchBase/beer-sample/_design/beer 201
      2017-07-06T09:04:23.784+00:00 (Plan) Transfering GSI index definitions for beer-sample to beer-sample
      2017-07-06T09:04:23.785+00:00 (Rest) GET http://10.111.151.104:8091/pools/default/nodeServices 200
      2017-07-06T09:04:23.935+00:00 (Rest) POST http://10.111.151.104:9102/restoreIndexMetadata?bucket=beer-sample 200
      2017-07-06T09:04:23.935+00:00 (Plan) Transfering full text index definitions for beer-sample to beer-sample
      2017-07-06T09:04:23.935+00:00 (Plan) Deciding which key value data to transfer for beer-sample
      2017-07-06T09:04:23.935+00:00 [INFO][FDB] Forestdb opened database file /tmp/backup/backup/2017-07-06T09_02_07.044216212Z/beer-sample-f0b4a9a0bec634eca6321c12a45562b3/data/shard_0.fdb
      2017-07-06T09:04:24.006+00:00 [INFO][FDB] Forestdb closed database file /tmp/backup/backup/2017-07-06T09_02_07.044216212Z/beer-sample-f0b4a9a0bec634eca6321c12a45562b3/data/shard_0.fdb
      2017-07-06T09:04:24.007+00:00 (Plan) Transfering new key value data for beer-sample to beer-sample
      2017-07-06T09:04:24.009+00:00 (Rest) GET http://10.111.151.104:8091/pools/default/buckets 200
      2017-07-06T09:04:24.010+00:00 (Rest) GET http://10.111.151.104:8091/pools/default/nodeServices 200
      2017-07-06T09:04:24.014+00:00 (Rest) GET http://10.111.151.104:8091/pools/default/buckets 200
      2017-07-06T09:04:24.015+00:00 ERRO: authentication error -- plan.(*data).execute() at data.go:70
      2017-07-06T09:04:24.015+00:00 (Plan) Transfer plan failed due to error authentication error
      2017-07-06T09:04:24.015+00:00 (Cmd) Error restoring cluster: authentication error
      
      

      Attachments

        Issue Links

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

          Activity

            People

              mikew Mike Wiederhold [X] (Inactive)
              mihir.kamdar Mihir Kamdar (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty