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

Unable to fetch profiles from chef server #361

Open
jillson opened this issue Mar 13, 2019 · 5 comments
Open

Unable to fetch profiles from chef server #361

jillson opened this issue Mar 13, 2019 · 5 comments
Labels
Priority: Low Triage: Needs Information Indicates an issue needs more information in order to work on it. Type: Bug Does not work as expected.

Comments

@jillson
Copy link

jillson commented Mar 13, 2019

Cookbook version

Edit: 7.4.0 (and also 7.3.0)

Chef-client version

14.8.12

Platform Details

RHEL 7.6 on AWS EC2 instance. We appear to be using inspec 3.0.61 (bundled with chef client)

Scenario:

We have chef server configured to proxy requests to chef automate for profiles, and then publish the results of the audit cookbook through chef server to chef automate.

Steps to Reproduce:

Followed standard configuration as far as I know. Using the bottom configuration option from https://github.com/chef-cookbooks/audit/blob/master/docs/supported_configuration.md (i.e.


Expected Result:

Audit results published

Actual Result:

Using the stock code, I get an error. The error message is [] is undefined for URI::HTTPS. The real meaning is that the code was being passed in a URI:HTTPS but was expecting either a string (which gets parsed to a URI:HTTPS) or a hash (which will have a :url value that gets passed as a string to be parsed).

If I edit line 123 or so in * /opt/chef/embedded/lib/ruby/gems/2.5.0/gems/inspec-core-3.0.61/lib/fetchers/url.rb * to add

puts "Monkey patching if target is already URI:HTTPS",target.class
      return target if target.is_a?(URI::HTTPS)

at the top of the * def parse_uri(target) * method, then I get the expected result.

@welcomebot
Copy link

Hey There
It looks like this is the first issue you've filed against the chef-cookbooks project. I'm here to offer you a bit of extra help to make sure we can quickly get back to you.
Make sure you've filled out all the fields in our issue template. Make sure you've provided us with the version of chef-client you're running, your operating system and the version of the cookbook. If you're not using the most up to date version of the cookbook then please make sure to update first. Lots of things change between versions even if you're issue isn't listed in the changelog. Finally please give us a detailed description of the issue you're having. The more we know about what you're trying to do, what actually happens, and how you can reproduce the problem, the better.

If you're looking for more immediate troubleshooting help make sure to check out #general on the Chef Community Slack. There's plenty of folks there willing to lend a helping hand. Thanks for the first issue. We hope we can get back to you soon with a solution.

@jillson
Copy link
Author

jillson commented Mar 13, 2019

Currently updating to 7.4.0; will update issue (and/or close) shortly

@clintoncwolfe clintoncwolfe added Type: Bug Does not work as expected. Triage: Needs Information Indicates an issue needs more information in order to work on it. labels Mar 18, 2019
@jillson
Copy link
Author

jillson commented Apr 1, 2019

Just to make sure this isn't going to get auto-closed because I misunderstood: is there more information I need to provide? (To confirm: I did update to 7.4.0 and still had same issue. )

@kekaichinose
Copy link
Collaborator

@jillson apologies for the late follow-up, but is this still an issue in the latest version of the cookbook?

@jillson
Copy link
Author

jillson commented Nov 8, 2019

Unfortunately, not able to test currently. I gave up and just kept my monkeypatch in place

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: Low Triage: Needs Information Indicates an issue needs more information in order to work on it. Type: Bug Does not work as expected.
Development

No branches or pull requests

5 participants