Gnocchi Resources updation with new metric fails with 406 response if the Accept header is set to application/json through REST api

Bug #1763341 reported by Arjun G
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gnocchi (Ubuntu)
New
Undecided
Unassigned

Bug Description

Gnocchi Resources updation with new metric fails with 406 response if the Accept header is set to application/json through REST api.

While testing through curl command also, we got 206 error.

With out header "Accept: application/json"
curl -g -i -H 'X-Auth-Token: gAAAAABazzcY90bC8OGKedYwV0caZ02BYZC-x2_bLTgCsfeteiElMpxkgtMKbh7UTSV4F5YxqwghISgUTc1ZbOxDfmO6yR1r0XkeaMZNwjAxoAGHh9w25rxBBnhg_WYh3U8wBHUNIuHxo2CjM2AMkhulh4s-PcOJUXhvkbA1aKoKUM5Vq-PWnKHucpoUpTrHF840vnDsdFtN' -X POST http://ubuntu16:8041/v1/resource/instance/11dbeeae-40d4-43a2-81d2-aae37541188f/metric -H "Content-Type: application/json" -H "HTTP/1.1" -d '{"cpu.util1":{"archive_policy_name":"low"}}'
HTTP/1.1 204 No Content
Date: Thu, 12 Apr 2018 10:44:19 GMT
Server: Apache/2.4.18 (Ubuntu)

With header "Accept: application/json"
curl -g -i -H 'X-Auth-Token: gAAAAABazzcY90bC8OGKedYwV0caZ02BYZC-x2_bLTgCsfeteiElMpxkgtMKbh7UTSV4F5YxqwghISgUTc1ZbOxDfmO6yR1r0XkeaMZNwjAxoAGHh9w25rxBBnhg_WYh3U8wBHUNIuHxo2CjM2AMkhulh4s-PcOJUXhvkbA1aKoKUM5Vq-PWnKHucpoUpTrHF840vnDsdFtN' -X POST http://ubuntu16:8041/v1/resource/instance/11dbeeae-40d4-43a2-81d2-aae37541188f/metric -H "Content-Type: application/json" -H "Accept: application/json" -H "HTTP/1.1" -d '{"cpu.util":{"archive_policy_name":"low"}}'
HTTP/1.1 406 Not Acceptable
Date: Thu, 12 Apr 2018 11:33:43 GMT
Server: Apache/2.4.18 (Ubuntu)
Content-Length: 61
Content-Type: application/json

Presently using Gnocchi 3.3.1 version. Please let us know is this issue can be fixed & already working in some newer version builds.

jun923.gu (gujun1989)
Changed in gnocchi (Ubuntu):
status: New → Incomplete
status: Incomplete → New
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.