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

ChefCompliance collector fix #75

Merged
merged 2 commits into from
Aug 15, 2016
Merged

ChefCompliance collector fix #75

merged 2 commits into from
Aug 15, 2016

Conversation

alexpop
Copy link
Contributor

@alexpop alexpop commented Aug 12, 2016

Fixes the following two exceptions when using the ChefCompliance collector:

           ================================================================================
           Error executing action `execute` on resource 'compliance_report[chef-server]'
           ================================================================================

           NameError
           ---------
           undefined local variable or method `blob' for #<Collector::ChefCompliance:0x00000005fbf040>

           Cookbook Trace:
           ---------------
           /tmp/kitchen/cache/cookbooks/audit/libraries/collector_classes.rb:236:in `send_report'
           /tmp/kitchen/cache/cookbooks/audit/libraries/report.rb:49:in `block (2 levels) in <class:ComplianceReport>'
           /tmp/kitchen/cache/cookbooks/audit/libraries/report.rb:24:in `block in <class:ComplianceReport>'

and:

           Error executing action `execute` on resource 'compliance_report[chef-server]'
           ================================================================================

           NameError
           ---------
           undefined local variable or method `run_context' for #<Collector::ChefCompliance:0x00000006826440>

           Cookbook Trace:
           ---------------
           /tmp/kitchen/cache/cookbooks/audit/libraries/helper.rb:33:in `handle_http_error_code'
           /tmp/kitchen/cache/cookbooks/audit/libraries/helper.rb:42:in `with_http_rescue'
           /tmp/kitchen/cache/cookbooks/audit/libraries/collector_classes.rb:243:in `block in send_report'
           /tmp/kitchen/cache/cookbooks/audit/libraries/collector_classes.rb:242:in `send_report'
           /tmp/kitchen/cache/cookbooks/audit/libraries/report.rb:49:in `block (2 levels) in <class:ComplianceReport>'
           /tmp/kitchen/cache/cookbooks/audit/libraries/report.rb:24:in `block in <class:ComplianceReport>'
           /tmp/kitchen/cache/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/runner.rb:41:in `run_action'

@alexpop alexpop changed the title ChefCompliance collector fix WIP: ChefCompliance collector fix Aug 12, 2016
@alexpop alexpop changed the title WIP: ChefCompliance collector fix ChefCompliance collector fix Aug 13, 2016
@chris-rock
Copy link
Contributor

Thanks @alexpop for this fix

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

Successfully merging this pull request may close these issues.

5 participants