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

Cannot set flushEnabled to true without setting the ramQuotaMB for a bucket through the REST api

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Fixed
    • Major
    • 2.5.0
    • 2.0, 2.0.1, 2.1.0, 2.2.0
    • RESTful-APIs
    • Security Level: Public

    Description

      For example:

      To enable flushall on a bucket, the curl command I used:

      curl -X POST -v -u Administrator:password -d "flushEnabled=1" http://10.3.2.55:8091/pools/default/buckets/default?bucket_uuid=3e0057a069f2007cf89265dd6a673500

      .. throws an error:

      • About to connect() to 10.3.2.55 port 8091
      • Trying 10.3.2.55... connected
      • Connected to 10.3.2.55 (10.3.2.55) port 8091
      • Server auth using Basic with user 'Administrator'
        > POST /pools/default/buckets/default?bucket_uuid=3e0057a069f2007cf89265dd6a673500 HTTP/1.1
        > Authorization: Basic QWRtaW5pc3RyYXRvcjpwYXNzd29yZA==
        > User-Agent: curl/7.15.5 (x86_64-redhat-linux-gnu) libcurl/7.15.5 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5
        > Host: 10.3.2.55:8091
        > Accept: /
        > Content-Length: 14
        > Content-Type: application/x-www-form-urlencoded
        >
        > flushEnabled=1HTTP/1.1 400 Bad Request
        < Server: Couchbase Server 2.0.2-765-rel-enterprise
        < Pragma: no-cache
        < Date: Wed, 17 Apr 2013 19:40:51 GMT
        < Content-Type: application/json
        < Content-Length: 333
        < Cache-Control: no-cache
        Connection #0 to host 10.3.2.55 left intact
      • Closing connection #0
        {"errors": {"ramQuotaMB":"RAM quota cannot be set below current usage."}

        ,"summaries":

        Unknown macro: {"ramSummary"}

        }

      However, if I set the ramQuotaMB to what it was along with flushEnabled, I'm able to enable flush:

      curl -X POST -v -u Administrator:password -d "flushEnabled=1" -d "ramQuotaMB=4789" http://10.3.2.55:8091/pools/default/buckets/default?bucket_uuid=3e0057a069f2007cf89265dd6a673500

      • About to connect() to 10.3.2.55 port 8091
      • Trying 10.3.2.55... connected
      • Connected to 10.3.2.55 (10.3.2.55) port 8091
      • Server auth using Basic with user 'Administrator'
        > POST /pools/default/buckets/default?bucket_uuid=3e0057a069f2007cf89265dd6a673500 HTTP/1.1
        > Authorization: Basic QWRtaW5pc3RyYXRvcjpwYXNzd29yZA==
        > User-Agent: curl/7.15.5 (x86_64-redhat-linux-gnu) libcurl/7.15.5 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5
        > Host: 10.3.2.55:8091
        > Accept: /
        > Content-Length: 30
        > Content-Type: application/x-www-form-urlencoded
        >
        > flushEnabled=1&ramQuotaMB=4789HTTP/1.1 200 OK
        < Server: Couchbase Server 2.0.2-765-rel-enterprise
        < Pragma: no-cache
        < Date: Wed, 17 Apr 2013 19:41:12 GMT
        < Content-Length: 0
        < Cache-Control: no-cache
      • Connection #0 to host 10.3.2.55 left intact
      • Closing connection #0

      Attachments

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

        Activity

          People

            apiravi Aruna Piravi (Inactive)
            abhinav Abhi Dangeti
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty