{"action":"opened","issue":{"url":"https://api.github.com/repos/ngageoint/scale/issues/24","repository_url":"https://api.github.com/repos/ngageoint/scale","labels_url":"https://api.github.com/repos/ngageoint/scale/issues/24/labels{/name}","comments_url":"https://api.github.com/repos/ngageoint/scale/issues/24/comments","events_url":"https://api.github.com/repos/ngageoint/scale/issues/24/events","html_url":"https://github.com/ngageoint/scale/issues/24","id":136175048,"number":24,"title":"Sync is_online back to node models","user":{"login":"dfaller","id":15897378,"avatar_url":"https://avatars.githubusercontent.com/u/15897378?v=3","gravatar_id":"","url":"https://api.github.com/users/dfaller","html_url":"https://github.com/dfaller","followers_url":"https://api.github.com/users/dfaller/followers","following_url":"https://api.github.com/users/dfaller/following{/other_user}","gists_url":"https://api.github.com/users/dfaller/gists{/gist_id}","starred_url":"https://api.github.com/users/dfaller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dfaller/subscriptions","organizations_url":"https://api.github.com/users/dfaller/orgs","repos_url":"https://api.github.com/users/dfaller/repos","events_url":"https://api.github.com/users/dfaller/events{/privacy}","received_events_url":"https://api.github.com/users/dfaller/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ngageoint/scale/labels/database","name":"database","color":"fbca04"},{"url":"https://api.github.com/repos/ngageoint/scale/labels/refactor","name":"refactor","color":"c7def8"},{"url":"https://api.github.com/repos/ngageoint/scale/labels/rest%20api","name":"rest api","color":"f7c6c7"},{"url":"https://api.github.com/repos/ngageoint/scale/labels/scheduler","name":"scheduler","color":"006b75"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-02-24T20:15:45Z","updated_at":"2016-02-24T20:15:45Z","closed_at":null,"body":"Right now the REST API to return status information back for nodes relies upon an HTTP request to Mesos to determine whether a node is currently online. After the major scheduler refactor, the scheduler now tracks is_online status for each node using the scheduler.sync.node_manager.NodeManager class. The scheduler should be considered the source of truth for this value and should sync this value back to the database.\r\n\r\nAdd non-nullable is_online boolean field to node model\r\nUpdate NodeManager.sync_with_database() to set the is_online field for each node to the correct value as it changes in the scheduler\r\nResolve the 2 related TODOs in scheduler.offer.node.py\r\nUpdate all applicable REST APIs to no longer query Mesos to determine online status; use the new field. Since the new field \"costs\" nothing, it can be added to all REST APIs that return node models."}}