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

unable to create buckets using /pools/default/buckets API

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.0.0
    • Fix Version/s: 4.6.2, 5.0.0
    • Component/s: ns_server, query
    • Labels:
      None
    • Triage:
      Untriaged
    • Is this a Regression?:
      Yes

      Description

      The query engine has a script for unit tests that creates six buckets for test purposes. As of build 1966, creating the buckets fails mysteriously.

      The script:

      #!/bin/bash
       
      echo Creating Buckets
       
      Site=http://127.0.0.1:8091/pools/default/buckets
      Auth=Administrator:password
      bucket=(customer orders product purchase review shellTest)
      q=${1:-250}
      port=11224
       
      for i in "${bucket[@]}"
      do
      echo curl -X POST -u $Auth -d name=$i -d ramQuotaMB=$q -d authType=none -d proxyPort=$port $Site
      curl -X POST -u $Auth -d name=$i -d ramQuotaMB=$q -d authType=none -d proxyPort=$port $Site
      let port\+=1
      done
       
      echo mkdir -p data/dimestore/product
      mkdir -p data/dimestore/product
       
      echo mkdir data/dimestore/customer
      mkdir data/dimestore/customer
       
      echo mkdir data/dimestore/orders
      mkdir data/dimestore/orders
       
      echo mkdir data/dimestore/review
      mkdir data/dimestore/review
       
      echo mkdir data/dimestore/purchase
      mkdir data/dimestore/purchase
       
      

      The script is normally run with command-line parameter 250 (as in megabytes per bucket).

      The response seen is:

      Creating Buckets
      curl -X POST -u Administrator:password -d name=customer -d ramQuotaMB=250 -d authType=none -d proxyPort=11224 http://127.0.0.1:8091/pools/default/buckets
      ["Unexpected server error, request logged."]curl -X POST -u Administrator:password -d name=orders -d ramQuotaMB=250 -d authType=none -d proxyPort=11225 http://127.0.0.1:8091/pools/default/buckets
      ["Unexpected server error, request logged."]curl -X POST -u Administrator:password -d name=product -d ramQuotaMB=250 -d authType=none -d proxyPort=11226 http://127.0.0.1:8091/pools/default/buckets
      ["Unexpected server error, request logged."]curl -X POST -u Administrator:password -d name=purchase -d ramQuotaMB=250 -d authType=none -d proxyPort=11227 http://127.0.0.1:8091/pools/default/buckets
      ["Unexpected server error, request logged."]curl -X POST -u Administrator:password -d name=review -d ramQuotaMB=250 -d authType=none -d proxyPort=11228 http://127.0.0.1:8091/pools/default/buckets
      ["Unexpected server error, request logged."]curl -X POST -u Administrator:password -d name=shellTest -d ramQuotaMB=250 -d authType=none -d proxyPort=11229 http://127.0.0.1:8091/pools/default/buckets
      ["Unexpected server error, request logged."]mkdir -p data/dimestore/product
      mkdir data/dimestore/customer
      mkdir: data/dimestore/customer: File exists
      mkdir data/dimestore/orders
      mkdir: data/dimestore/orders: File exists
      mkdir data/dimestore/review
      mkdir: data/dimestore/review: File exists
      mkdir data/dimestore/purchase
      mkdir: data/dimestore/purchase: File exists
      

      Error.log contains failures like this:

      [ns_server:error,2017-02-12T13:13:48.998-08:00,ns_1@127.0.0.1:<0.1516.0>:menelaus_web:loop:189]Server error during processing: ["web request failed",
                                       {path,"/pools/default/buckets"},
                                       {method,'POST'},
                                       {type,error},
                                       {what,{case_clause,undefined}},
                                       {trace,
                                        [{menelaus_web_buckets,get_storage_mode,3,
                                          [{file,"src/menelaus_web_buckets.erl"},
                                           {line,1006}]},
                                         {menelaus_web_buckets,
                                          validate_bucket_type_specific_params,5,
                                          [{file,"src/menelaus_web_buckets.erl"},
                                           {line,833}]},
                                         {menelaus_web_buckets,
                                          basic_bucket_params_screening_tail,3,
                                          [{file,"src/menelaus_web_buckets.erl"},
                                           {line,800}]},
                                         {menelaus_web_buckets,
                                          parse_bucket_params_without_warnings,2,
                                          [{file,"src/menelaus_web_buckets.erl"},
                                           {line,730}]},
                                         {menelaus_web_buckets,parse_bucket_params,
                                          2,
                                          [{file,"src/menelaus_web_buckets.erl"},
                                           {line,720}]},
                                         {menelaus_web_buckets,do_bucket_create,4,
                                          [{file,"src/menelaus_web_buckets.erl"},
                                           {line,575}]},
                                         {menelaus_web_buckets,
                                          handle_bucket_create,2,
                                          [{file,"src/menelaus_web_buckets.erl"},
                                           {line,606}]},
                                         {request_throttler,do_request,3,
                                          [{file,"src/request_throttler.erl"},
                                           {line,59}]}]}]
      

       

       

       

        Attachments

          Issue Links

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

            Activity

            Hide
            James Flather James Flather added a comment -

            Looks like times have changed and we have more options:

            http://src.couchbase.org/source/xref/trunk/ns_server/src/menelaus_web_buckets.erl#1005

            I suspect this should be a required field (with a suitable error message), or just have a default.

            Show
            James Flather James Flather added a comment - Looks like times have changed and we have more options: http://src.couchbase.org/source/xref/trunk/ns_server/src/menelaus_web_buckets.erl#1005 I suspect this should be a required field (with a suitable error message), or just have a default.
            Hide
            johan.larson Johan Larson added a comment -

            Adding "-d bucketType=couchbase" to the curl command looks like a functional work-around.

            Show
            johan.larson Johan Larson added a comment - Adding "-d bucketType=couchbase" to the curl command looks like a functional work-around.
            Hide
            johan.larson Johan Larson added a comment -

            Downgraded because the query team has a fix (or a workaround.)

            Show
            johan.larson Johan Larson added a comment - Downgraded because the query team has a fix (or a workaround.)
            Hide
            build-team Couchbase Build Team added a comment -

            Build 5.0.0-1974 contains query commit 6364e5fa472dba141ae27cfb4ff14504d2636c86 with commit message:
            MB-22760 Add bucketType parameter to bucket_create script.
            https://github.com/couchbase/query/commit/6364e5fa472dba141ae27cfb4ff14504d2636c86

            Show
            build-team Couchbase Build Team added a comment - Build 5.0.0-1974 contains query commit 6364e5fa472dba141ae27cfb4ff14504d2636c86 with commit message: MB-22760 Add bucketType parameter to bucket_create script. https://github.com/couchbase/query/commit/6364e5fa472dba141ae27cfb4ff14504d2636c86
            Hide
            build-team Couchbase Build Team added a comment -

            Build 5.0.0-1975 contains ns_server commit 8589dc21c1334aac642d8e3ce88f2657cda0b484 with commit message:
            MB-22760: Default storage mode to couchstore...
            https://github.com/couchbase/ns_server/commit/8589dc21c1334aac642d8e3ce88f2657cda0b484

            Show
            build-team Couchbase Build Team added a comment - Build 5.0.0-1975 contains ns_server commit 8589dc21c1334aac642d8e3ce88f2657cda0b484 with commit message: MB-22760 : Default storage mode to couchstore... https://github.com/couchbase/ns_server/commit/8589dc21c1334aac642d8e3ce88f2657cda0b484
            Hide
            build-team Couchbase Build Team added a comment -

            Build 4.6.1-3822 contains query commit c5aa0ddfeb3720acbecaadf21848a29436105989 with commit message:
            MB-22760 Add bucketType parameter to bucket_create script.
            https://github.com/couchbase/query/commit/c5aa0ddfeb3720acbecaadf21848a29436105989

            Show
            build-team Couchbase Build Team added a comment - Build 4.6.1-3822 contains query commit c5aa0ddfeb3720acbecaadf21848a29436105989 with commit message: MB-22760 Add bucketType parameter to bucket_create script. https://github.com/couchbase/query/commit/c5aa0ddfeb3720acbecaadf21848a29436105989
            Hide
            Prerna.Manaktala Prerna Manaktala (Inactive) added a comment -

            Johan Larson:Does this require an automated functional test case?
            If not can you please verify and close this issue?

            Thanks
            Prerna

            Show
            Prerna.Manaktala Prerna Manaktala (Inactive) added a comment - Johan Larson :Does this require an automated functional test case? If not can you please verify and close this issue? Thanks Prerna

              People

              • Assignee:
                johan.larson Johan Larson
                Reporter:
                johan.larson Johan Larson
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes

                    PagerDuty

                    Error rendering 'com.pagerduty.jira-server-plugin:PagerDuty'. Please contact your Jira administrators.