{"action":"created","issue":{"url":"https://api.github.com/repos/ManageIQ/manageiq/issues/18211","repository_url":"https://api.github.com/repos/ManageIQ/manageiq","labels_url":"https://api.github.com/repos/ManageIQ/manageiq/issues/18211/labels{/name}","comments_url":"https://api.github.com/repos/ManageIQ/manageiq/issues/18211/comments","events_url":"https://api.github.com/repos/ManageIQ/manageiq/issues/18211/events","html_url":"https://github.com/ManageIQ/manageiq/pull/18211","id":381594904,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMxNTI2Njkx","number":18211,"title":"Cloud instances cannot have disconnected state","user":{"login":"miha-plesko","id":8102426,"node_id":"MDQ6VXNlcjgxMDI0MjY=","avatar_url":"https://avatars1.githubusercontent.com/u/8102426?v=4","gravatar_id":"","url":"https://api.github.com/users/miha-plesko","html_url":"https://github.com/miha-plesko","followers_url":"https://api.github.com/users/miha-plesko/followers","following_url":"https://api.github.com/users/miha-plesko/following{/other_user}","gists_url":"https://api.github.com/users/miha-plesko/gists{/gist_id}","starred_url":"https://api.github.com/users/miha-plesko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/miha-plesko/subscriptions","organizations_url":"https://api.github.com/users/miha-plesko/orgs","repos_url":"https://api.github.com/users/miha-plesko/repos","events_url":"https://api.github.com/users/miha-plesko/events{/privacy}","received_events_url":"https://api.github.com/users/miha-plesko/received_events","type":"User","site_admin":false},"labels":[{"id":106615678,"node_id":"MDU6TGFiZWwxMDY2MTU2Nzg=","url":"https://api.github.com/repos/ManageIQ/manageiq/labels/enhancement","name":"enhancement","color":"84b6eb","default":true},{"id":1069066996,"node_id":"MDU6TGFiZWwxMDY5MDY2OTk2","url":"https://api.github.com/repos/ManageIQ/manageiq/labels/hammer/yes","name":"hammer/yes","color":"000000","default":false}],"state":"open","locked":false,"assignee":{"login":"agrare","id":12851112,"node_id":"MDQ6VXNlcjEyODUxMTEy","avatar_url":"https://avatars2.githubusercontent.com/u/12851112?v=4","gravatar_id":"","url":"https://api.github.com/users/agrare","html_url":"https://github.com/agrare","followers_url":"https://api.github.com/users/agrare/followers","following_url":"https://api.github.com/users/agrare/following{/other_user}","gists_url":"https://api.github.com/users/agrare/gists{/gist_id}","starred_url":"https://api.github.com/users/agrare/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/agrare/subscriptions","organizations_url":"https://api.github.com/users/agrare/orgs","repos_url":"https://api.github.com/users/agrare/repos","events_url":"https://api.github.com/users/agrare/events{/privacy}","received_events_url":"https://api.github.com/users/agrare/received_events","type":"User","site_admin":false},"assignees":[{"login":"agrare","id":12851112,"node_id":"MDQ6VXNlcjEyODUxMTEy","avatar_url":"https://avatars2.githubusercontent.com/u/12851112?v=4","gravatar_id":"","url":"https://api.github.com/users/agrare","html_url":"https://github.com/agrare","followers_url":"https://api.github.com/users/agrare/followers","following_url":"https://api.github.com/users/agrare/following{/other_user}","gists_url":"https://api.github.com/users/agrare/gists{/gist_id}","starred_url":"https://api.github.com/users/agrare/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/agrare/subscriptions","organizations_url":"https://api.github.com/users/agrare/orgs","repos_url":"https://api.github.com/users/agrare/repos","events_url":"https://api.github.com/users/agrare/events{/privacy}","received_events_url":"https://api.github.com/users/agrare/received_events","type":"User","site_admin":false}],"milestone":null,"comments":6,"created_at":"2018-11-16T13:15:10Z","updated_at":"2018-11-16T15:46:17Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/ManageIQ/manageiq/pulls/18211","html_url":"https://github.com/ManageIQ/manageiq/pull/18211","diff_url":"https://github.com/ManageIQ/manageiq/pull/18211.diff","patch_url":"https://github.com/ManageIQ/manageiq/pull/18211.patch"},"body":"With this commit we hard-code `disconnected?` methods to `false` for cloud VMs. A VM can only get disconnected when its host suddenly shuts down. But for cloud provider this cannot happen: if host goes down, VM is gone for good from user perspective.\r\n\r\nProblem is that VM's `disconnected?` status is calculated based on `connection_status` DB value. For cloud VMs this value is left as NULL which is interpreted as disconnected. There are two kinds of workarounds that cloud providers were currently using to overcome this issue:\r\n\r\na) override `disconnected?` on corresponding Vm class (AWS, Azure)    [link](https://github.com/ManageIQ/manageiq-providers-amazon/blob/master/app/models/manageiq/providers/amazon/cloud_manager/vm.rb#L36-L42)\r\nb) forcibly set `vm.connection_state = 'connected'` upon inventoring (OpenStack)    [link](https://github.com/ManageIQ/manageiq-providers-openstack/blob/master/app/models/manageiq/providers/openstack/cloud_manager/refresh_parser.rb#L324)\r\n\r\nOption (b) is a dirty workaround because there is no such thing as `vm.connection_state` for cloud VMs. Option (a) is impractical because every future cloud provider needs to override like this. With this commit we therefore override the functions in base cloud Vm class so it works for all cloud providers.\r\n\r\nFixes https://bugzilla.redhat.com/show_bug.cgi?id=1649403\r\n\r\n@miq-bot assign @agrare\r\n@miq-bot add_label enhancement,hammer/yes\r\n\r\n/cc @Fryguy @skateman "},"comment":{"url":"https://api.github.com/repos/ManageIQ/manageiq/issues/comments/439434745","html_url":"https://github.com/ManageIQ/manageiq/pull/18211#issuecomment-439434745","issue_url":"https://api.github.com/repos/ManageIQ/manageiq/issues/18211","id":439434745,"node_id":"MDEyOklzc3VlQ29tbWVudDQzOTQzNDc0NQ==","user":{"login":"miq-bot","id":7806257,"node_id":"MDQ6VXNlcjc4MDYyNTc=","avatar_url":"https://avatars1.githubusercontent.com/u/7806257?v=4","gravatar_id":"","url":"https://api.github.com/users/miq-bot","html_url":"https://github.com/miq-bot","followers_url":"https://api.github.com/users/miq-bot/followers","following_url":"https://api.github.com/users/miq-bot/following{/other_user}","gists_url":"https://api.github.com/users/miq-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/miq-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/miq-bot/subscriptions","organizations_url":"https://api.github.com/users/miq-bot/orgs","repos_url":"https://api.github.com/users/miq-bot/repos","events_url":"https://api.github.com/users/miq-bot/events{/privacy}","received_events_url":"https://api.github.com/users/miq-bot/received_events","type":"User","site_admin":false},"created_at":"2018-11-16T15:46:17Z","updated_at":"2018-11-16T15:46:17Z","author_association":"MEMBER","body":"<rubocop />Checked commit https://github.com/miha-plesko/manageiq/commit/4a2f91ca97407825f49e4248d6f1db64a8c5a59c with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0\n2 files checked, 0 offenses detected\nEverything looks fine. :trophy:\n"}}
{"actor":{"display_login":"miq-bot"}}