Hi, I have a few questions about the usage of ceph-rest-api's /osd/crush/set.

Documentation obtained from GET /api/v0.1/osd:

osd/crush/set PUT "set crush map from input file"

1) Does the input crush map have to be compiled before using this API or can an 
uncompiled map be used?
2) Is there anything in the ceph-rest-api API to compile a crush map?

I can successfully set a compiled crush map, but I get an error using an 
uncompiled one which seems to indicate it must be compiled first.  The below is 
my attempt with curl to use an uncompiled map but it gets 400 BadRequest: 
"Error: Failed to parse crushmap: buffer::malformed_input: bad magic number 
(-22)”.

Is there a way to do this with an uncompiled map?


curl -iv -XPUT --data-binary "@/tmp/crushmap-uncompiled" -H "Accept: 
application/json" -H "Content-type: application/octet-stream" 
'0.0.0.0:53279/api/v0.1/osd/crush/set'

*   Trying 0.0.0.0...

* Connected to 0.0.0.0 (127.0.0.1) port 53279 (#0)

> PUT /api/v0.1/osd/setcrushmap HTTP/1.1

> User-Agent: curl/7.38.0

> Host: 0.0.0.0:53279

> Accept: application/json

> Content-type: application/octet-stream

> Content-Length: 1297

> Expect: 100-continue

>

< HTTP/1.1 100 Continue

HTTP/1.1 100 Continue


* HTTP 1.0, assume close after body

< HTTP/1.0 400 BAD REQUEST

HTTP/1.0 400 BAD REQUEST

< Content-Type: text/html; charset=utf-8

Content-Type: text/html; charset=utf-8

< Content-Length: 108

Content-Length: 108

* Server Werkzeug/0.9.6 Python/2.7.9 is not blacklisted

< Server: Werkzeug/0.9.6 Python/2.7.9

Server: Werkzeug/0.9.6 Python/2.7.9

< Date: Wed, 09 Mar 2016 22:45:57 GMT

Date: Wed, 09 Mar 2016 22:45:57 GMT


<

* Closing connection 0

{"status": "Error: Failed to parse crushmap: buffer::malformed_input: bad magic 
number (-22)", "output": []}

Thanks for any help!


----------------------------------------------------------------------
The information contained in this transmission may be confidential. Any 
disclosure, copying, or further distribution of confidential information is not 
permitted unless such privilege is explicitly granted in writing by Quantum. 
Quantum reserves the right to have electronic communications, including email 
and attachments, sent across its networks filtered through anti virus and spam 
software programs and retain such messages in order to comply with applicable 
data security and retention requirements. Quantum is not responsible for the 
proper and complete transmission of the substance of this communication or for 
any delay in its receipt.
_______________________________________________
ceph-users mailing list
[email protected]
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com

Reply via email to