So the delete, fails and Juju keeps on trying. The problem is the sending of the "Content-Type:[application/octet-stream]" header, which isn't needed at all since I don't think DELETEs ever have a payload?
I have patched juju 1.X locally ( https://pastebin.canonical.com/171596/ ) to remove the Content-Type header from Delete requests for JsonRequest and BinaryRequest. This fixes the issue for me.
I think I've got to the bottom of this, its a bug in goose so I assume it affects Juju 1.X and 2.X at the moment.
When Juju requests the deletion of a security group it hits the API with these parameters:
sendRateLimited Request method: DELETE Request URL: http:// 10.245. 161.158: 8774/v2/ a65e1673ca784ec 3b3a4b76c95a254 b0/os-security- groups/ 3e4ff483- 4b12-4a07- b466-ed93a146a5 6a Request headers: map[User- Agent:[ goose (0.1.0)] X-Auth- Token:[ 54baab4248574e5 c862de354100021 fc] Content- Type:[applicati on/octet- stream] Accept: [application/ octet-stream] ] Request reqData: []
sendRateLimited
sendRateLimited
sendRateLimited
(Output above doesn't match the uuids below because there from different test runs but you get the picture)
If I take those parameters and use curl I get:
$ curl -g -i -X DELETE http:// 10.245. 161.158: 8774/v2/ a65e1673ca784ec 3b3a4b76c95a254 b0/os-security- groups/ 592c0b2e- ce86-4c6a- 9778-faf8c89cdf 61 -H "User-Agent: goose (0.1.0)" -H "Content- Type:[applicati on/octet- stream] octet-stream" -H "X-Auth-Token: b11ada0df6a342e 1a667e579f6e6f1 53" Request- Id: req-d19a46a2- 736f-479d- a0b4-156ffa4da8 de
" -H "Accept: application/
HTTP/1.1 415 Unsupported Media Type
Content-Type: application/json; charset=UTF-8
Content-Length: 70
X-Compute-
Date: Wed, 23 Nov 2016 12:15:02 GMT
{"badMediaType": {"message": "Unsupported Content-Type", "code": 415}
So the delete, fails and Juju keeps on trying. The problem is the sending of the "Content- Type:[applicati on/octet- stream] " header, which isn't needed at all since I don't think DELETEs ever have a payload?
I have patched juju 1.X locally ( https:/ /pastebin. canonical. com/171596/ ) to remove the Content-Type header from Delete requests for JsonRequest and BinaryRequest. This fixes the issue for me.