ceph/rgw metasearch with elasticsearch 6.x

Posted on Tue 29 January 2019 in Ceph • 1 min read

Houston, we have a problem

Since elasticsearch 6.x requires to provide the correct content-type for a request and the elastic sync module has no option for the content-type....we stucked at elastic 5.x

Error message

{"error":"Content-Type header [] is not supported","status":406}

strace log

strace -e network -s 1024 -ff [..] radosgw ...
sendto(587, "PUT /rgw-default-cb05d298 HTTP/1.1\r\nHost: 10.20.30.30:9200\r\nAccept: */*\r\nDate: Mon, 04 Feb 2019 00:09:55 +0000\r\nContent-Length: 1233\r\nExpect: 100-continue\r\n\r\n", 158, MSG_NOSIGNAL, NULL, 0) = 158
recvfrom(587, "HTTP/1.1 100 Continue\r\n\r\n", 16384, 0, NULL, NULL) = 25
sendto(587, "{\"settings\":{\"number_of_replicas\":1,\"number_of_shards\":10},\"mappings\":{\"object\":{\"properties\":{\"bucket\":{\"type\":\"string\",\"index\":\"not_analyzed\"},\"name\":{\"type\":\"string\",\"index\":\"not_analyzed\"},\"instance\":{\"type\":\"string\",\"index\":\"not_analyzed\"},\"versioned_epoch\":{\"type\":\"long\"},\"meta\":{\"properties\":{\"cache_control\":{\"type\":\"string\",\"index\":\"not_analyzed\"},\"content_disposition\":{\"type\":\"string\",\"index\":\"not_analyzed\"},\"content_encoding\":{\"type\":\"string\",\"index\":\"not_analyzed\"},\"content_language\":{\"type\":\"string\",\"index\":\"not_analyzed\"},\"content_type\":{\"type\":\"string\",\"index\":\"not_analyzed\"},\"etag\":{\"type\":\"string\",\"index\":\"not_analyzed\"},\"expires\":{\"type\":\"string\",\"index\":\"not_analyzed\"},\"mtime\":{\"type\":\"date\",\"format\":\"strict_date_optional_time||epoch_millis\"},\"size\":{\"type\":\"long\"},\"custom-string\":{\"type\":\"nested\",\"properties\":{\"name\":{\"type\":\"string\",\"index\":\"not_analyzed\"},\"value\":{\"type\":\"string\",\"index\":\"not_analyzed\"}}},\"custom-int\":{\"type\":\"nested\",\"properties\":{\"name\":{\"type\":\"string\",\"index\":\"not_ana"..., 1233, MSG_NOSIGNAL, NULL, 0) = 1233
recvfrom(587, "HTTP/1.1 406 Not Acceptable\r\ncontent-type: application/json; charset=UTF-8\r\ncontent-length: 64\r\n\r\n{\"error\":\"Content-Type header [] is not supported\",\"status\":406}", 16384, 0, NULL, NULL) = 162