Details
-
Improvement
-
Resolution: Fixed
-
Major
-
2.0, 2.0.1, 2.1.0, 2.2.0
-
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