{"action":"created","issue":{"url":"https://api.github.com/repos/opscode-cookbooks/ohai/issues/23","labels_url":"https://api.github.com/repos/opscode-cookbooks/ohai/issues/23/labels{/name}","comments_url":"https://api.github.com/repos/opscode-cookbooks/ohai/issues/23/comments","events_url":"https://api.github.com/repos/opscode-cookbooks/ohai/issues/23/events","html_url":"https://github.com/opscode-cookbooks/ohai/issues/23","id":88280179,"number":23,"title":"Unneeded reloading…","user":{"login":"rmoriz","id":1527,"avatar_url":"https://avatars.githubusercontent.com/u/1527?v=3","gravatar_id":"","url":"https://api.github.com/users/rmoriz","html_url":"https://github.com/rmoriz","followers_url":"https://api.github.com/users/rmoriz/followers","following_url":"https://api.github.com/users/rmoriz/following{/other_user}","gists_url":"https://api.github.com/users/rmoriz/gists{/gist_id}","starred_url":"https://api.github.com/users/rmoriz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rmoriz/subscriptions","organizations_url":"https://api.github.com/users/rmoriz/orgs","repos_url":"https://api.github.com/users/rmoriz/repos","events_url":"https://api.github.com/users/rmoriz/events{/privacy}","received_events_url":"https://api.github.com/users/rmoriz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-06-15T01:08:11Z","updated_at":"2015-06-24T09:01:54Z","closed_at":null,"body":"https://github.com/opscode-cookbooks/ohai/blob/master/recipes/default.rb#L23-L26 is not included by default and forces reloads on every converge.\r\n\r\ndebug code:\r\n\r\n```ruby\r\nreload_ohai = false\r\n# Add plugin_path from node attributes if missing, and ensure a reload of\r\n# ohai in that case\r\nunless Ohai::Config[:plugin_path].include?(node['ohai']['plugin_path'])\r\n\r\n  Chef::Log.error(\"node path: #{node['ohai']['plugin_path']}\")\r\n  Chef::Log.error(\"config path: #{Ohai::Config[:plugin_path]}\")\r\n\r\n  Ohai::Config[:plugin_path] = [node['ohai']['plugin_path'], Ohai::Config[:plugin_path]].flatten.compact\r\n\r\n\r\n  Chef::Log.error \"reload_ohai 1: #{reload_ohai}\"\r\n\r\n  reload_ohai ||= true\r\nend\r\nChef::Log.info(\"ohai plugins will be at: #{node['ohai']['plugin_path']}\")\r\nChef::Log.error \"reload_ohai 2: #{reload_ohai}\"\r\n```\r\n\r\noutput: \r\n\r\n```\r\n      [2015-06-15T01:07:25+00:00] ERROR: node path: /etc/chef/ohai_plugins\r\n       [2015-06-15T01:07:25+00:00] ERROR: config path: [\"/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/ohai-8.3.0/lib/ohai/plugins\"]\r\n       [2015-06-15T01:07:25+00:00] ERROR: reload_ohai 1: false\r\n       [2015-06-15T01:07:25+00:00] ERROR: reload_ohai 2: true\r\n```\r\n\r\nAs seen with the `nginx` and `sysctl` cookbooks from supermarket.\r\n\r\nrelated: https://github.com/miketheman/nginx/issues/344\r\n\r\n- Chef 12.3.0-1, test-kitchen with vagrant & chef-zero \r\n- Ubuntu 12.04\r\n- Ohai: 8.3.0\r\n\r\nExample .kitchen.yml\r\n\r\n```yaml\r\ndriver:\r\n  name: vagrant\r\n\r\nprovisioner:\r\n  name: chef_zero\r\n\r\nplatforms:\r\n  - name: ubuntu-12.04\r\n    run_list:\r\n        - recipe[apt]\r\n\r\nsuites:\r\n  - name: default\r\n    run_list:\r\n      - recipe[nginx::default]\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/opscode-cookbooks/ohai/issues/comments/114793669","html_url":"https://github.com/opscode-cookbooks/ohai/issues/23#issuecomment-114793669","issue_url":"https://api.github.com/repos/opscode-cookbooks/ohai/issues/23","id":114793669,"user":{"login":"rmoriz","id":1527,"avatar_url":"https://avatars.githubusercontent.com/u/1527?v=3","gravatar_id":"","url":"https://api.github.com/users/rmoriz","html_url":"https://github.com/rmoriz","followers_url":"https://api.github.com/users/rmoriz/followers","following_url":"https://api.github.com/users/rmoriz/following{/other_user}","gists_url":"https://api.github.com/users/rmoriz/gists{/gist_id}","starred_url":"https://api.github.com/users/rmoriz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rmoriz/subscriptions","organizations_url":"https://api.github.com/users/rmoriz/orgs","repos_url":"https://api.github.com/users/rmoriz/repos","events_url":"https://api.github.com/users/rmoriz/events{/privacy}","received_events_url":"https://api.github.com/users/rmoriz/received_events","type":"User","site_admin":false},"created_at":"2015-06-24T09:01:54Z","updated_at":"2015-06-24T09:01:54Z","body":"Also, looks like when using the `chef-client` cookbook, this issue gets fixed. NOT a good solution… https://github.com/opscode-cookbooks/chef-client/blob/master/templates/default/client.rb.erb#L42-L45"}}