{"action":"created","issue":{"url":"https://api.github.com/repos/chef-cookbooks/audit/issues/138","repository_url":"https://api.github.com/repos/chef-cookbooks/audit","labels_url":"https://api.github.com/repos/chef-cookbooks/audit/issues/138/labels{/name}","comments_url":"https://api.github.com/repos/chef-cookbooks/audit/issues/138/comments","events_url":"https://api.github.com/repos/chef-cookbooks/audit/issues/138/events","html_url":"https://github.com/chef-cookbooks/audit/issues/138","id":186625721,"number":138,"title":"version 2.0.0 reporting resources updated","user":{"login":"jeremymv2","id":1991696,"avatar_url":"https://avatars.githubusercontent.com/u/1991696?v=3","gravatar_id":"","url":"https://api.github.com/users/jeremymv2","html_url":"https://github.com/jeremymv2","followers_url":"https://api.github.com/users/jeremymv2/followers","following_url":"https://api.github.com/users/jeremymv2/following{/other_user}","gists_url":"https://api.github.com/users/jeremymv2/gists{/gist_id}","starred_url":"https://api.github.com/users/jeremymv2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeremymv2/subscriptions","organizations_url":"https://api.github.com/users/jeremymv2/orgs","repos_url":"https://api.github.com/users/jeremymv2/repos","events_url":"https://api.github.com/users/jeremymv2/events{/privacy}","received_events_url":"https://api.github.com/users/jeremymv2/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/chef-cookbooks/audit/milestones/3","html_url":"https://github.com/chef-cookbooks/audit/milestones/2.0%20feedback%20fixes","labels_url":"https://api.github.com/repos/chef-cookbooks/audit/milestones/3/labels","id":2107942,"number":3,"title":"2.0 feedback fixes","description":"","creator":{"login":"vjeffrey","id":10341541,"avatar_url":"https://avatars.githubusercontent.com/u/10341541?v=3","gravatar_id":"","url":"https://api.github.com/users/vjeffrey","html_url":"https://github.com/vjeffrey","followers_url":"https://api.github.com/users/vjeffrey/followers","following_url":"https://api.github.com/users/vjeffrey/following{/other_user}","gists_url":"https://api.github.com/users/vjeffrey/gists{/gist_id}","starred_url":"https://api.github.com/users/vjeffrey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vjeffrey/subscriptions","organizations_url":"https://api.github.com/users/vjeffrey/orgs","repos_url":"https://api.github.com/users/vjeffrey/repos","events_url":"https://api.github.com/users/vjeffrey/events{/privacy}","received_events_url":"https://api.github.com/users/vjeffrey/received_events","type":"User","site_admin":false},"open_issues":2,"closed_issues":2,"state":"open","created_at":"2016-11-01T20:52:04Z","updated_at":"2016-11-02T17:37:04Z","due_on":"2016-11-04T00:00:00Z","closed_at":null},"comments":15,"created_at":"2016-11-01T19:35:33Z","updated_at":"2016-11-02T21:52:24Z","closed_at":null,"body":"### Cookbook version\r\n2.0.0\r\n\r\n### Chef-client version\r\n12.15.19\r\n\r\n### Platform Details\r\nubuntu 14.04\r\n\r\n### Scenario:\r\nversion 2.0.0 uses chef-handler in attempt to not report resources being updated, however each subsequent chef-client converge is reporting resources updated.\r\n\r\n### Steps to Reproduce:\r\nuse wrapper cookbook with these attributes:\r\n```\r\ndefault['audit']['inspec_version'] = '1.2.0'\r\n\r\n# collector possible values: chef-server, chef-compliance, chef-visibility, json-file\r\n# chef-visibility requires inspec version 0.27.1 or above\r\ndefault['audit']['collector'] = 'chef-server'\r\n\r\n# Attributes server, insecure and token/refresh_token are only needed for the 'chef-compliance' collector\r\n# server format example: 'https://comp-server.example.com/api'\r\ndefault['audit']['server'] = nil\r\n\r\n# choose between the permanent refresh_token or ephemeral token(access_token). Needed only for the 'chef-compliance' collector\r\ndefault['audit']['refresh_token'] = nil\r\n\r\n# the token(access_token) expires in 12h after creation\r\ndefault['audit']['token'] = nil\r\n\r\n# set this insecure attribute to true if the compliance server / chef server uses self-signed ssl certificates\r\ndefault['audit']['insecure'] = nil\r\n\r\n# Chef Compliance organization to post the report to. Defaults to Chef Server org if not defined\r\n# needed for the 'chef-compliance' collector, optional for 'chef-server' collector\r\ndefault['audit']['owner'] = nil\r\n\r\n# raise exception if Compliance API endpoint is unreachable\r\n# while fetching profiles or posting report\r\ndefault['audit']['raise_if_unreachable'] = true\r\n\r\n# fail converge if downloaded profile is not present\r\ndefault['audit']['fail_if_not_present'] = false\r\n\r\n# by default run audit every time\r\ndefault['audit']['interval']['enabled'] = false\r\n\r\n# by default run compliance once a day\r\ndefault['audit']['interval']['time'] = 1440\r\n\r\n# quiet mode, on by default because this is testing, resources aren't converged in the normal chef sense\r\ndefault['audit']['quiet'] = true\r\n\r\n# overwrite existing profile in upload mode\r\ndefault['audit']['overwrite'] = true\r\n\r\n# use json format since this is for reporting\r\ndefault['audit']['format'] = 'json'\r\n\r\n# set profiles to empty array as default\r\ndefault['audit']['profiles'] = [{\r\n      'name' => 'linux',\r\n      'compliance' => 'base/linux'\r\n}]\r\n```\r\n\r\n### Expected Result:\r\nChef-client runs should report 0/x resources updated at the end of the report handlers phase.\r\n\r\n### Actual Result:\r\nI'm seeing 2 resources updated on each chef-client converge.\r\n\r\n```\r\nroot@node:/tmp/vagrant-chef# chef-client -c client.rb\r\n[2016-11-01T19:32:37+00:00] INFO: Forking chef instance to converge...\r\nStarting Chef Client, version 12.15.19\r\n[2016-11-01T19:32:37+00:00] INFO: *** Chef 12.15.19 ***\r\n[2016-11-01T19:32:37+00:00] INFO: Platform: x86_64-linux\r\n[2016-11-01T19:32:37+00:00] INFO: Chef-client pid: 4712\r\n[2016-11-01T19:32:39+00:00] INFO: Run List is [recipe[audit_wrapper]]\r\n[2016-11-01T19:32:39+00:00] INFO: Run List expands to [audit_wrapper]\r\n[2016-11-01T19:32:39+00:00] INFO: Starting Chef Run for node\r\n[2016-11-01T19:32:39+00:00] INFO: Running start handlers\r\n[2016-11-01T19:32:39+00:00] INFO: Start handlers complete.\r\n[2016-11-01T19:32:39+00:00] INFO: HTTP Request Returned 404 Not Found:\r\nresolving cookbooks for run list: [\"audit_wrapper\"]\r\n[2016-11-01T19:32:39+00:00] INFO: Loading cookbooks [audit_wrapper@0.1.0, audit@2.0.0, compat_resource@12.16.1, chef_handler@2.0.0]\r\nSynchronizing Cookbooks:\r\n  - audit_wrapper (0.1.0)\r\n  - audit (2.0.0)\r\n  - compat_resource (12.16.1)\r\n  - chef_handler (2.0.0)\r\nInstalling Cookbook Gems:\r\nCompiling Cookbooks...\r\n[2016-11-01T19:32:39+00:00] INFO: Chef Handlers will be located at: /var/chef/handlers\r\nRecipe: chef_handler::default\r\n  * remote_directory[/var/chef/handlers] action create\r\n  Recipe: <Dynamically Defined Resource>\r\n    * cookbook_file[/var/chef/handlers/README] action create (up to date)\r\n     (up to date)\r\n  Converging 5 resources\r\nRecipe: chef_handler::default\r\n  * remote_directory[/var/chef/handlers] action nothing (skipped due to action :nothing)\r\nRecipe: audit::default\r\n  * inspec[inspec] action install\r\n    * chef_gem[inspec] action install (up to date)\r\n    - install/update inspec[2016-11-01T19:32:39+00:00] WARN: Using inspec version: (1.2.0)\r\n\r\n    - verifies the inspec version\r\n    * chef_gem[inspec] action install (up to date)\r\n\r\n  * directory[/var/chef/cache/handler] action create (up to date)\r\n  * cookbook_file[/var/chef/cache/handler/audit_report.rb] action create (up to date)\r\n  * chef_handler[Chef::Handler::AuditReport] action enable[2016-11-01T19:32:39+00:00] INFO: Disabling Chef::Handler::AuditReport as a report handler.\r\n\r\n    - disable Chef::Handler::AuditReport as a report handler[2016-11-01T19:32:39+00:00] INFO: Disabling Chef::Handler::AuditReport as a exception handler.\r\n\r\n    - disable Chef::Handler::AuditReport as a exception handler\r\n    - load Chef::Handler::AuditReport from /var/chef/cache/handler/audit_report.rb[2016-11-01T19:32:39+00:00] INFO: Enabling Chef::Handler::AuditReport as a report handler.\r\n\r\n    - enable chef_handler[Chef::Handler::AuditReport] as a report handler[2016-11-01T19:32:39+00:00] INFO: Enabling Chef::Handler::AuditReport as a exception handler.\r\n\r\n    - enable chef_handler[Chef::Handler::AuditReport] as a exception handler\r\n[2016-11-01T19:32:39+00:00] INFO: Chef Run complete in 0.674548823 seconds\r\n\r\nRunning handlers:\r\n[2016-11-01T19:32:39+00:00] INFO: Running report handlers\r\n[2016-11-01T19:32:39+00:00] WARN: Format is json-min\r\n[2016-11-01T19:32:39+00:00] INFO: Initialize InSpec\r\n[2016-11-01T19:32:39+00:00] INFO: Running tests from: [{:name=>\"linux\", :compliance=>\"base/linux\"}]\r\n[2016-11-01T19:32:40+00:00] INFO: Reporting to chef-server\r\n[2016-11-01T19:32:40+00:00] INFO: Control Profile: [\"linux\"]\r\n[2016-11-01T19:32:40+00:00] INFO: Control Profil: linux\r\n[2016-11-01T19:32:40+00:00] INFO: Compliance Profils: [{:owner=>\"base\", :profile_id=>\"linux\"}]\r\n[2016-11-01T19:32:40+00:00] INFO: Report to Chef Server: https://chef-server.test/compliance/organizations/brewinc/inspec\r\n  - Chef::Handler::AuditReport\r\nRunning handlers complete\r\n[2016-11-01T19:32:40+00:00] INFO: Report handlers complete\r\nChef Client finished, 2/9 resources updated in 02 seconds\r\nroot@node:/tmp/vagrant-chef#\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/chef-cookbooks/audit/issues/comments/258010467","html_url":"https://github.com/chef-cookbooks/audit/issues/138#issuecomment-258010467","issue_url":"https://api.github.com/repos/chef-cookbooks/audit/issues/138","id":258010467,"user":{"login":"vjeffrey","id":10341541,"avatar_url":"https://avatars.githubusercontent.com/u/10341541?v=3","gravatar_id":"","url":"https://api.github.com/users/vjeffrey","html_url":"https://github.com/vjeffrey","followers_url":"https://api.github.com/users/vjeffrey/followers","following_url":"https://api.github.com/users/vjeffrey/following{/other_user}","gists_url":"https://api.github.com/users/vjeffrey/gists{/gist_id}","starred_url":"https://api.github.com/users/vjeffrey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vjeffrey/subscriptions","organizations_url":"https://api.github.com/users/vjeffrey/orgs","repos_url":"https://api.github.com/users/vjeffrey/repos","events_url":"https://api.github.com/users/vjeffrey/events{/privacy}","received_events_url":"https://api.github.com/users/vjeffrey/received_events","type":"User","site_admin":false},"created_at":"2016-11-02T21:52:24Z","updated_at":"2016-11-02T21:52:24Z","body":"thank youuuuu!!!!"}}
{"actor":{"display_login":"vjeffrey"}}