Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

First Converge: Net::HTTPServerException 404 "Object Not Found" #21

Open
wojnosystems opened this issue Feb 3, 2015 · 0 comments
Open

Comments

@wojnosystems
Copy link

I'm attempting to set up a new node with x509. I'm getting a very ambiguous error when I run chef-client on the bootstrapped node.

What appears to be happening is that on line 30 of providers/certificate.rb:

  # Try to find this certificate in the data bag.
  certbag = search(:certificates, "id:#{cert_id}").first
  if certbag
    # Data bag item found - the CSR was processed, and can be removed
    # from the outbox
    if node.attribute?('csr_outbox')
      if node.set['csr_outbox'].delete(new_resource.name)
        new_resource.updated_by_last_action(true)
      end
    end
  else
    certbag ||= {}
  end

You're doing a search for the certificate. The Chef API returns a 404 exception if it's not found, but you're not capturing the 404 error. Is this correct?

Is this fix as simple as catching an exception?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant