Bug #22487
closedPlugin does not cause smart-proxy to return a body
Description
With NIOS version 8.2 of the Infoblox, Foreman 1.16 and gem version 0.0.6, while an A record is created during host provisioning, results are not properly reported either to the Smart Proxy by the plugin and/or to Foreman by the Smart Proxy.
HTTP traffic between the Smart Proxy and Foreman appears as follows:
Request:
POST /dns/ HTTP/1.1
Accept: application/json
Accept-Encoding: gzip, deflate
User-Agent: rest-client/2.0.1 (linux-gnu x86_64) ruby/2.2.2p95
X-Request-Id: ca7db6e7fe4d5a1a729d9ee28e1a8cbae66cdf7571e3e03b7ec758bd98a9c9b8
Content-Length: 59
Content-Type: application/x-www-form-urlencoded
Host: foreman.example.com:8000
fqdn=juana-porraz.example.com&value=192.168.1.189&type=A
Response:
HTTP/1.1 200 OK
Content-Type: text/html;charset=utf-8
Content-Length: 0
X-Xss-Protection: 1; mode=block
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
Server:
Date: Wed, 24 Jan 2018 17:24:48 GMT
Connection: Keep-Alive
Related links:
https://community.theforeman.org/t/dns-smart-proxy-times-out/8175
http://projects.theforeman.org/issues/22464
While Foreman probably shouldn't throw an error on an empty body when it receives a 200 OK status code, the plugin should also probably be sending back some sort of JSON content in the body reporting the successful creation.
Updated by Anonymous about 7 years ago
- Status changed from New to Rejected
Smart-proxy doesn't guarantee that any data will be returned from POSTs (which includes dns record creation), some providers enforce this by explicitly returning nils. If anything, smart-proxy should return 204s instead of 200s, but this might cause api compatibility issues, which is why this hasn't been done.
Updated by James Shewey about 7 years ago
- Related to Bug #22464: Foreman attempts to parse & errors on empty body added
Updated by Lukas Zapletal almost 6 years ago
I believe this is related: https://github.com/theforeman/smart_proxy_dns_infoblox/pull/23 (WIP)