Issue with http_request

So I am putting a check in at the end of my recipe to make sure that a service is up and running. I’m doing a simple http get. I want to retry it for a period of time until it finally works. However changing the retries does not appear to be affecting the execution.

I am expecting the 404 error. However I see a diffrence between the Resource Declaration and the Compiled Resource.

http_request[check_heartbeat] action get

================================================================================
Error executing action `get` on resource 'http_request[check_heartbeat]'
================================================================================

Net::HTTPServerException
------------------------
404 "Not Found"

Resource Declaration:
---------------------
# In /var/chef/cache/cookbooks/camel-karaf-esb-cookbook/recipes/default.rb

323: http_request 'check_heartbeat' do
324:   url 'http://localhost:8181/cxf/heartbeat'
325:   action :get
326:   retries 2
327:   retry_delay 30
328: end
329:

Compiled Resource:
------------------
# Declared in /var/chef/cache/cookbooks/camel-karaf-esb-cookbook/recipes/default.rb:323:in `from_file'

http_request("check_heartbeat") do
  action [:get]
  retries 0
  retry_delay 30
  guard_interpreter :default
  message "check_heartbeat"
  url "http://localhost:8181/cxf/heartbeat"
  headers {"Accept-Encoding"=>"gzip;q=1.0,deflate;q=0.6,identity;q=0.3"}
  cookbook_name "camel-karaf-esb-cookbook"
  recipe_name "default"

Is this an issue with the error reporting? Or is is the complied execution actually not retrying?

internally, Chef mutates the retry count by subtracting 1 from it for each retry, which makes the declared resource show the wrong value. It's quite possible that Chef exhausted all the retries; if you have the full log, there should be a message for each retry.