{"action":"created","issue":{"url":"https://api.github.com/repos/chef/ohai/issues/818","repository_url":"https://api.github.com/repos/chef/ohai","labels_url":"https://api.github.com/repos/chef/ohai/issues/818/labels{/name}","comments_url":"https://api.github.com/repos/chef/ohai/issues/818/comments","events_url":"https://api.github.com/repos/chef/ohai/issues/818/events","html_url":"https://github.com/chef/ohai/pull/818","id":153851746,"number":818,"title":"Properly poll Openstack detection + other Openstack improvements","user":{"login":"tas50","id":1015200,"avatar_url":"https://avatars.githubusercontent.com/u/1015200?v=3","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},"labels":[{"url":"https://api.github.com/repos/chef/ohai/labels/Enhancement","name":"Enhancement","color":"009800"},{"url":"https://api.github.com/repos/chef/ohai/labels/Signed%20CLA","name":"Signed CLA","color":"ededed"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-05-09T19:33:52Z","updated_at":"2016-05-11T15:12:59Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/chef/ohai/pulls/818","html_url":"https://github.com/chef/ohai/pull/818","diff_url":"https://github.com/chef/ohai/pull/818.diff","patch_url":"https://github.com/chef/ohai/pull/818.patch"},"body":"The existing Openstack metadata logic failed as it was hardcoded to use metadata from 2013 that doesn't seem to exist in standard installs. Instead lets use the logic in the EC2 metadata mixin to find the latest version we support.\r\nWrap metadata fetching around  socket connection check from the EC2 metadata plugin. This prevents hung Ohai runs on providers that don't support the metadata endpoint\r\nGrab the Openstack data correctly in the Cloud plugins\r\nDetect a system as being on Openstack based on DMI data\r\nRemove HP cloud logic since that's dead\r\nAdd debug logging so we can follow what's happening in the logs better\r\n\r\nPreviously nil data we now have:\r\n\r\n```json\r\n \"cloud\": {\r\n    \"public_ips\": [\r\n      \"172.16.20.52\"\r\n    ],\r\n    \"private_ips\": [\r\n      \"192.168.1.203\"\r\n    ],\r\n    \"public_ipv4\": \"172.16.20.52\",\r\n    \"public_hostname\": \"ohai.novalocal\",\r\n    \"local_ipv4\": \"192.168.1.203\",\r\n    \"local_hostname\": \"ohai.novalocal\",\r\n    \"provider\": \"openstack\"\r\n  },\r\n  \"cloud_v2\": {\r\n    \"public_ipv4_addrs\": [\r\n      \"172.16.20.52\"\r\n    ],\r\n    \"local_ipv4_addrs\": [\r\n      \"192.168.1.203\"\r\n    ],\r\n    \"provider\": \"openstack\",\r\n    \"public_hostname\": \"ohai.novalocal\",\r\n    \"local_hostname\": \"ohai.novalocal\",\r\n    \"public_ipv4\": \"172.16.20.52\",\r\n    \"local_ipv4\": \"192.168.1.203\"\r\n  },\r\n \"openstack\": {\r\n    \"provider\": \"openstack\",\r\n    \"metadata\": {\r\n      \"ami_id\": \"ami-00000002\",\r\n      \"ami_launch_index\": \"0\",\r\n      \"ami_manifest_path\": \"FIXME\",\r\n      \"block_device_mapping_ami\": \"vda\",\r\n      \"block_device_mapping_root\": \"/dev/vda\",\r\n      \"hostname\": \"ohai.novalocal\",\r\n      \"instance_action\": \"none\",\r\n      \"instance_id\": \"i-00000211\",\r\n      \"instance_type\": \"m1.medium\",\r\n      \"kernel_id\": \"None\",\r\n      \"local_hostname\": \"ohai.novalocal\",\r\n      \"local_ipv4\": \"192.168.1.203\",\r\n      \"placement_availability_zone\": \"nova\",\r\n      \"public_hostname\": \"ohai.novalocal\",\r\n      \"public_ipv4\": \"172.16.20.52\",\r\n      \"public_keys_0_openssh_key\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCxAVkrfknXoHFQtyXtYZ6vONLHn7HTKQq4mkwvCOPMKb3gr6gsLQkCdzmO3CQwOcFl7uDWGdfjH/ocuSUSn6xMvfCdsdGzDiLQXcDJ4jGOuuyOioniN1N00IhAD7Tqsf4AvbQJ7gDqfPKDCw6LdlZ0d0d9pWlJf7eKf/Hq3x8RCqWek/+UCoU4l4T1eAM0N/bA5tj3EfvRuDniO8U5ClsuUbtJ1uxJmrWMhFox3jFp6oNrleHWFTiRsNKfbtfTrTJRYlqcOG2jGAb49JY+p6Ykku4vq0ezYZFYXGJki6a0yLu1kMg5aHJo9UX0d9JW6y11KfXbGKN4okeRcH/tSNov jasghar@remasghar01.local\",\r\n      \"ramdisk_id\": \"None\",\r\n      \"reservation_id\": \"r-nvo4xzvf\",\r\n      \"security_groups\": [\r\n      ]\r\n    }\r\n```"},"comment":{"url":"https://api.github.com/repos/chef/ohai/issues/comments/218490355","html_url":"https://github.com/chef/ohai/pull/818#issuecomment-218490355","issue_url":"https://api.github.com/repos/chef/ohai/issues/818","id":218490355,"user":{"login":"mcquin","id":4721755,"avatar_url":"https://avatars.githubusercontent.com/u/4721755?v=3","gravatar_id":"","url":"https://api.github.com/users/mcquin","html_url":"https://github.com/mcquin","followers_url":"https://api.github.com/users/mcquin/followers","following_url":"https://api.github.com/users/mcquin/following{/other_user}","gists_url":"https://api.github.com/users/mcquin/gists{/gist_id}","starred_url":"https://api.github.com/users/mcquin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mcquin/subscriptions","organizations_url":"https://api.github.com/users/mcquin/orgs","repos_url":"https://api.github.com/users/mcquin/repos","events_url":"https://api.github.com/users/mcquin/events{/privacy}","received_events_url":"https://api.github.com/users/mcquin/received_events","type":"User","site_admin":false},"created_at":"2016-05-11T15:12:59Z","updated_at":"2016-05-11T15:12:59Z","body":"👍 🚀 🎉 "}}