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

    Details

      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
      No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

        Hide
        rmayuram Ravi Mayuram added a comment -

        This is not a regression. Seems not critical for this release. If we have agreement we should defer.

        Show
        rmayuram Ravi Mayuram added a comment - This is not a regression. Seems not critical for this release. If we have agreement we should defer.
        Hide
        alkondratenko Aleksey Kondratenko (Inactive) added a comment -

        Some more important stuff was moved out of 2.0.2. And this one is too minor to fix this late.

        Show
        alkondratenko Aleksey Kondratenko (Inactive) added a comment - Some more important stuff was moved out of 2.0.2. And this one is too minor to fix this late.
        Hide
        alkondratenko Aleksey Kondratenko (Inactive) added a comment -

        I'm not at all convinced this is worth doing at all.

        Show
        alkondratenko Aleksey Kondratenko (Inactive) added a comment - I'm not at all convinced this is worth doing at all.
        Show
        Aliaksey Artamonau Aliaksey Artamonau added a comment - http://review.couchbase.org/#/c/30080/
        Hide
        maria Maria McDuff (Inactive) added a comment -

        Aruna,

        pls verify on the latest build. Also, pls create a cbqe for you to automate this functionality for the next sprint.

        Show
        maria Maria McDuff (Inactive) added a comment - Aruna, pls verify on the latest build. Also, pls create a cbqe for you to automate this functionality for the next sprint.

          People

          • Assignee:
            apiravi Aruna Piravi
            Reporter:
            abhinav Abhinav 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