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

AuditReport rasied RunTime Error supports_profile #185

Closed
username-is-already-taken2 opened this issue Dec 16, 2016 · 1 comment
Closed
Labels
Type: Bug Does not work as expected.

Comments

@username-is-already-taken2

Cookbook version

2.3.1

Chef-client version

12.17.44

Platform Details

RedHat RHEL 6

Scenario:

Run the audit cookbook.

Steps to Reproduce:

Use the audit cookbook to call a profile which has a

supports:
  - os-family: windows

defined within the inspec.yml and run it on a different os (IE RedHat)

Expected Result:

It should skip the the profile

Actual Result:

chef-client run errors

Recipe: audit::inspec
  * chef_gem[inspec] action install (up to date)
[2016-12-16T15:13:44+00:00] WARN: Using inspec version: (1.7.1)
  Converging 1 resources
  * chef_gem[inspec] action install (up to date)

Running handlers:
[2016-12-16T15:13:45+00:00] WARN: Format is json
[2016-12-16T15:13:45+00:00] ERROR: Report handler Chef::Handler::AuditReport raised #<RuntimeError: This OS/platform (redhat) is not supported by this profile.>
[2016-12-16T15:13:45+00:00] ERROR: /opt/chef/embedded/lib/ruby/gems/2.3.0/gems/inspec-1.7.1/lib/inspec/runner.rb:178:in `supports_profile?'
[2016-12-16T15:13:45+00:00] ERROR: /opt/chef/embedded/lib/ruby/gems/2.3.0/gems/inspec-1.7.1/lib/inspec/runner.rb:165:in `add_target'
[2016-12-16T15:13:45+00:00] ERROR: /var/chef/cache/cookbooks/audit/files/default/handler/audit_report.rb:101:in `block in call'
[2016-12-16T15:13:45+00:00] ERROR: /var/chef/cache/cookbooks/audit/files/default/handler/audit_report.rb:101:in `each'
[2016-12-16T15:13:45+00:00] ERROR: /var/chef/cache/cookbooks/audit/files/default/handler/audit_report.rb:101:in `call'
[2016-12-16T15:13:45+00:00] ERROR: /var/chef/cache/cookbooks/audit/files/default/handler/audit_report.rb:47:in `block in report'
[2016-12-16T15:13:45+00:00] ERROR: /var/chef/cache/cookbooks/audit/files/default/handler/audit_report.rb:33:in `each'
[2016-12-16T15:13:45+00:00] ERROR: /var/chef/cache/cookbooks/audit/files/default/handler/audit_report.rb:33:in `report'
@cheeseplus cheeseplus added the Type: Bug Does not work as expected. label Apr 11, 2017
@kekaichinose
Copy link
Collaborator

What’s happening? Why was this issue closed?
This issue was closed due to some much needed review of legacy issues or issues that were spawned in older versions of InSpec, i.e. < v3.

Why do I care?
You would care about this if this was an issue that you are still seeing and/or feel needs to be addressed in the current version of InSpec.

What do I need to do?
If this issue is no longer important, no further action is necessary. However, if you think this is something that should be addressed, please open a new issue and refer to the original issue in the description.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Does not work as expected.
Development

No branches or pull requests

3 participants