{"action":"created","issue":{"url":"https://api.github.com/repos/chef/ohai/issues/1089","repository_url":"https://api.github.com/repos/chef/ohai","labels_url":"https://api.github.com/repos/chef/ohai/issues/1089/labels{/name}","comments_url":"https://api.github.com/repos/chef/ohai/issues/1089/comments","events_url":"https://api.github.com/repos/chef/ohai/issues/1089/events","html_url":"https://github.com/chef/ohai/issues/1089","id":273576662,"number":1089,"title":"Ohai Hard Limit on Sessions","user":{"login":"sean-horn","id":1459992,"avatar_url":"https://avatars2.githubusercontent.com/u/1459992?v=4","gravatar_id":"","url":"https://api.github.com/users/sean-horn","html_url":"https://github.com/sean-horn","followers_url":"https://api.github.com/users/sean-horn/followers","following_url":"https://api.github.com/users/sean-horn/following{/other_user}","gists_url":"https://api.github.com/users/sean-horn/gists{/gist_id}","starred_url":"https://api.github.com/users/sean-horn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sean-horn/subscriptions","organizations_url":"https://api.github.com/users/sean-horn/orgs","repos_url":"https://api.github.com/users/sean-horn/repos","events_url":"https://api.github.com/users/sean-horn/events{/privacy}","received_events_url":"https://api.github.com/users/sean-horn/received_events","type":"User","site_admin":false},"labels":[{"id":525129508,"url":"https://api.github.com/repos/chef/ohai/labels/Type:%20Enhancement","name":"Type: Enhancement","color":"009800","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2017-11-13T21:02:53Z","updated_at":"2018-02-25T05:43:31Z","closed_at":"2018-02-25T05:42:43Z","author_association":"CONTRIBUTOR","body":"## Description\r\n\r\nSupport has seen a couple of the following issue lately. Over time, thousands of operating system login sessions can be started up and not registered as closed by systemd's logind, because presumably, the sessions are stuck open by a process that was not shut down. This can happen with monitoring logins and other kinds of periodic logins. For example: https://forums.fedoraforum.org/showthread.php?294134-User-sessions-not-are-not-ended\r\n\r\nThis condition rapidly leads to giant 1MB+ Chef Client requests with request failures back to the Chef Server and potentially Automate 1.x when the data-collector is being used.\r\n\r\nSomething very simple like this `loginctl.stdout.split(\"\\n\").first(5).each do |line|` in place of https://github.com/chef/ohai/blob/master/lib/ohai/plugins/linux/sessions.rb#L33 could limit the potential damage. I understand we don't want to be patching for error conditions that need to be handled, but most systems shouldn't normally have more than 5-10 sessions going anyway.\r\n\r\n## Ohai Version\r\n\r\n8.23\r\n\r\n## Platform Version\r\n\r\nAny RHEL/CentOS 7.x\r\n\r\n## Ohai Output\r\n\r\nThousands of sessions returned by the sessions plugin.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/chef/ohai/issues/comments/368285308","html_url":"https://github.com/chef/ohai/issues/1089#issuecomment-368285308","issue_url":"https://api.github.com/repos/chef/ohai/issues/1089","id":368285308,"user":{"login":"tas50","id":1015200,"avatar_url":"https://avatars1.githubusercontent.com/u/1015200?v=4","gravatar_id":"","url":"https://api.github.com/users/tas50","html_url":"https://github.com/tas50","followers_url":"https://api.github.com/users/tas50/followers","following_url":"https://api.github.com/users/tas50/following{/other_user}","gists_url":"https://api.github.com/users/tas50/gists{/gist_id}","starred_url":"https://api.github.com/users/tas50/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tas50/subscriptions","organizations_url":"https://api.github.com/users/tas50/orgs","repos_url":"https://api.github.com/users/tas50/repos","events_url":"https://api.github.com/users/tas50/events{/privacy}","received_events_url":"https://api.github.com/users/tas50/received_events","type":"User","site_admin":false},"created_at":"2018-02-25T05:43:31Z","updated_at":"2018-02-25T05:43:31Z","author_association":"OWNER","body":"Closing this out now since the solution we took for Chef 14 was to disable the Sessions plugin out of the box. It's been pretty problematic as this thread shows and it's something that most people probably don't need. There will be additional information in the release notes on how to enable it if it's necessary for users."}}
{"actor":{"display_login":"tas50"}}