{"action":"created","comment":{"url":"https://api.github.com/repos/control-center/serviced/pulls/comments/89823536","pull_request_review_id":10355011,"id":89823536,"diff_hunk":"@@ -119,192 +151,264 @@ func (l *HostStateListener) Spawn(shutdown <-chan interface{}, stateID string) {\n \t\tInstanceID: instanceID,\n \t}\n \n-\tvar containerExit <-chan time.Time\n-\tdefer func() {\n-\n-\t\t// stop the container\n-\t\tif err := l.handler.StopContainer(serviceID, instanceID); err != nil {\n-\t\t\tlogger.WithError(err).Error(\"Could not stop container\")\n-\t\t} else if containerExit != nil {\n-\t\t\t// wait for the container to exit\n-\t\t\ttime := <-containerExit\n-\t\t\tlogger.WithField(\"terminated\", time).Debug(\"Container exited\")\n-\t\t}\n+\t// reattach to orphaned container\n+\tssdat, containerExit := l.getExistingState(stateID)\n+\t// TODO: Should we go ahead and pull the service state node from zk and make sure it matches?","path":"zzk/service/hoststate.go","position":109,"original_position":109,"commit_id":"e1b88af47e17d1d5f3b3f15898a847d3c80c3a30","original_commit_id":"e1b88af47e17d1d5f3b3f15898a847d3c80c3a30","user":{"login":"smousa","id":3171936,"avatar_url":"https://avatars.githubusercontent.com/u/3171936?v=3","gravatar_id":"","url":"https://api.github.com/users/smousa","html_url":"https://github.com/smousa","followers_url":"https://api.github.com/users/smousa/followers","following_url":"https://api.github.com/users/smousa/following{/other_user}","gists_url":"https://api.github.com/users/smousa/gists{/gist_id}","starred_url":"https://api.github.com/users/smousa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smousa/subscriptions","organizations_url":"https://api.github.com/users/smousa/orgs","repos_url":"https://api.github.com/users/smousa/repos","events_url":"https://api.github.com/users/smousa/events{/privacy}","received_events_url":"https://api.github.com/users/smousa/received_events","type":"User","site_admin":false},"body":"No, because this is the only place the service state node will ever be modified.","created_at":"2016-11-28T16:45:47Z","updated_at":"2016-11-28T16:45:47Z","html_url":"https://github.com/control-center/serviced/pull/3255#discussion_r89823536","pull_request_url":"https://api.github.com/repos/control-center/serviced/pulls/3255","_links":{"self":{"href":"https://api.github.com/repos/control-center/serviced/pulls/comments/89823536"},"html":{"href":"https://github.com/control-center/serviced/pull/3255#discussion_r89823536"},"pull_request":{"href":"https://api.github.com/repos/control-center/serviced/pulls/3255"}}},"pull_request":{"url":"https://api.github.com/repos/control-center/serviced/pulls/3255","id":95525523,"html_url":"https://github.com/control-center/serviced/pull/3255","diff_url":"https://github.com/control-center/serviced/pull/3255.diff","patch_url":"https://github.com/control-center/serviced/pull/3255.patch","issue_url":"https://api.github.com/repos/control-center/serviced/issues/3255","number":3255,"state":"open","locked":false,"title":"Don't shut down containers when host state listener shuts down","user":{"login":"johnlhamilton","id":14060038,"avatar_url":"https://avatars.githubusercontent.com/u/14060038?v=3","gravatar_id":"","url":"https://api.github.com/users/johnlhamilton","html_url":"https://github.com/johnlhamilton","followers_url":"https://api.github.com/users/johnlhamilton/followers","following_url":"https://api.github.com/users/johnlhamilton/following{/other_user}","gists_url":"https://api.github.com/users/johnlhamilton/gists{/gist_id}","starred_url":"https://api.github.com/users/johnlhamilton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johnlhamilton/subscriptions","organizations_url":"https://api.github.com/users/johnlhamilton/orgs","repos_url":"https://api.github.com/users/johnlhamilton/repos","events_url":"https://api.github.com/users/johnlhamilton/events{/privacy}","received_events_url":"https://api.github.com/users/johnlhamilton/received_events","type":"User","site_admin":false},"body":"DO NOT MERGE","created_at":"2016-11-28T16:00:03Z","updated_at":"2016-11-28T16:54:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fbbb3a27c3da31ae0a357c5c9ac7074de34945c2","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/control-center/serviced/pulls/3255/commits","review_comments_url":"https://api.github.com/repos/control-center/serviced/pulls/3255/comments","review_comment_url":"https://api.github.com/repos/control-center/serviced/pulls/comments{/number}","comments_url":"https://api.github.com/repos/control-center/serviced/issues/3255/comments","statuses_url":"https://api.github.com/repos/control-center/serviced/statuses/e1b88af47e17d1d5f3b3f15898a847d3c80c3a30","head":{"label":"control-center:feature/CC-3021","ref":"feature/CC-3021","sha":"e1b88af47e17d1d5f3b3f15898a847d3c80c3a30","user":{"login":"control-center","id":8160673,"avatar_url":"https://avatars.githubusercontent.com/u/8160673?v=3","gravatar_id":"","url":"https://api.github.com/users/control-center","html_url":"https://github.com/control-center","followers_url":"https://api.github.com/users/control-center/followers","following_url":"https://api.github.com/users/control-center/following{/other_user}","gists_url":"https://api.github.com/users/control-center/gists{/gist_id}","starred_url":"https://api.github.com/users/control-center/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/control-center/subscriptions","organizations_url":"https://api.github.com/users/control-center/orgs","repos_url":"https://api.github.com/users/control-center/repos","events_url":"https://api.github.com/users/control-center/events{/privacy}","received_events_url":"https://api.github.com/users/control-center/received_events","type":"Organization","site_admin":false},"repo":{"id":11929217,"name":"serviced","full_name":"control-center/serviced","owner":{"login":"control-center","id":8160673,"avatar_url":"https://avatars.githubusercontent.com/u/8160673?v=3","gravatar_id":"","url":"https://api.github.com/users/control-center","html_url":"https://github.com/control-center","followers_url":"https://api.github.com/users/control-center/followers","following_url":"https://api.github.com/users/control-center/following{/other_user}","gists_url":"https://api.github.com/users/control-center/gists{/gist_id}","starred_url":"https://api.github.com/users/control-center/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/control-center/subscriptions","organizations_url":"https://api.github.com/users/control-center/orgs","repos_url":"https://api.github.com/users/control-center/repos","events_url":"https://api.github.com/users/control-center/events{/privacy}","received_events_url":"https://api.github.com/users/control-center/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/control-center/serviced","description":"Serviced is a PaaS runtime. It allows users to create, manage and scale services in a uniform way.","fork":false,"url":"https://api.github.com/repos/control-center/serviced","forks_url":"https://api.github.com/repos/control-center/serviced/forks","keys_url":"https://api.github.com/repos/control-center/serviced/keys{/key_id}","collaborators_url":"https://api.github.com/repos/control-center/serviced/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/control-center/serviced/teams","hooks_url":"https://api.github.com/repos/control-center/serviced/hooks","issue_events_url":"https://api.github.com/repos/control-center/serviced/issues/events{/number}","events_url":"https://api.github.com/repos/control-center/serviced/events","assignees_url":"https://api.github.com/repos/control-center/serviced/assignees{/user}","branches_url":"https://api.github.com/repos/control-center/serviced/branches{/branch}","tags_url":"https://api.github.com/repos/control-center/serviced/tags","blobs_url":"https://api.github.com/repos/control-center/serviced/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/control-center/serviced/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/control-center/serviced/git/refs{/sha}","trees_url":"https://api.github.com/repos/control-center/serviced/git/trees{/sha}","statuses_url":"https://api.github.com/repos/control-center/serviced/statuses/{sha}","languages_url":"https://api.github.com/repos/control-center/serviced/languages","stargazers_url":"https://api.github.com/repos/control-center/serviced/stargazers","contributors_url":"https://api.github.com/repos/control-center/serviced/contributors","subscribers_url":"https://api.github.com/repos/control-center/serviced/subscribers","subscription_url":"https://api.github.com/repos/control-center/serviced/subscription","commits_url":"https://api.github.com/repos/control-center/serviced/commits{/sha}","git_commits_url":"https://api.github.com/repos/control-center/serviced/git/commits{/sha}","comments_url":"https://api.github.com/repos/control-center/serviced/comments{/number}","issue_comment_url":"https://api.github.com/repos/control-center/serviced/issues/comments{/number}","contents_url":"https://api.github.com/repos/control-center/serviced/contents/{+path}","compare_url":"https://api.github.com/repos/control-center/serviced/compare/{base}...{head}","merges_url":"https://api.github.com/repos/control-center/serviced/merges","archive_url":"https://api.github.com/repos/control-center/serviced/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/control-center/serviced/downloads","issues_url":"https://api.github.com/repos/control-center/serviced/issues{/number}","pulls_url":"https://api.github.com/repos/control-center/serviced/pulls{/number}","milestones_url":"https://api.github.com/repos/control-center/serviced/milestones{/number}","notifications_url":"https://api.github.com/repos/control-center/serviced/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/control-center/serviced/labels{/name}","releases_url":"https://api.github.com/repos/control-center/serviced/releases{/id}","deployments_url":"https://api.github.com/repos/control-center/serviced/deployments","created_at":"2013-08-06T16:45:00Z","updated_at":"2016-10-24T15:25:20Z","pushed_at":"2016-11-28T16:49:36Z","git_url":"git://github.com/control-center/serviced.git","ssh_url":"git@github.com:control-center/serviced.git","clone_url":"https://github.com/control-center/serviced.git","svn_url":"https://github.com/control-center/serviced","homepage":null,"size":130161,"stargazers_count":95,"watchers_count":95,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":14,"mirror_url":null,"open_issues_count":11,"forks":14,"open_issues":11,"watchers":95,"default_branch":"develop"}},"base":{"label":"control-center:develop","ref":"develop","sha":"b238cbefe1e326ab581f139f81c35a1262b5bf0a","user":{"login":"control-center","id":8160673,"avatar_url":"https://avatars.githubusercontent.com/u/8160673?v=3","gravatar_id":"","url":"https://api.github.com/users/control-center","html_url":"https://github.com/control-center","followers_url":"https://api.github.com/users/control-center/followers","following_url":"https://api.github.com/users/control-center/following{/other_user}","gists_url":"https://api.github.com/users/control-center/gists{/gist_id}","starred_url":"https://api.github.com/users/control-center/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/control-center/subscriptions","organizations_url":"https://api.github.com/users/control-center/orgs","repos_url":"https://api.github.com/users/control-center/repos","events_url":"https://api.github.com/users/control-center/events{/privacy}","received_events_url":"https://api.github.com/users/control-center/received_events","type":"Organization","site_admin":false},"repo":{"id":11929217,"name":"serviced","full_name":"control-center/serviced","owner":{"login":"control-center","id":8160673,"avatar_url":"https://avatars.githubusercontent.com/u/8160673?v=3","gravatar_id":"","url":"https://api.github.com/users/control-center","html_url":"https://github.com/control-center","followers_url":"https://api.github.com/users/control-center/followers","following_url":"https://api.github.com/users/control-center/following{/other_user}","gists_url":"https://api.github.com/users/control-center/gists{/gist_id}","starred_url":"https://api.github.com/users/control-center/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/control-center/subscriptions","organizations_url":"https://api.github.com/users/control-center/orgs","repos_url":"https://api.github.com/users/control-center/repos","events_url":"https://api.github.com/users/control-center/events{/privacy}","received_events_url":"https://api.github.com/users/control-center/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/control-center/serviced","description":"Serviced is a PaaS runtime. It allows users to create, manage and scale services in a uniform way.","fork":false,"url":"https://api.github.com/repos/control-center/serviced","forks_url":"https://api.github.com/repos/control-center/serviced/forks","keys_url":"https://api.github.com/repos/control-center/serviced/keys{/key_id}","collaborators_url":"https://api.github.com/repos/control-center/serviced/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/control-center/serviced/teams","hooks_url":"https://api.github.com/repos/control-center/serviced/hooks","issue_events_url":"https://api.github.com/repos/control-center/serviced/issues/events{/number}","events_url":"https://api.github.com/repos/control-center/serviced/events","assignees_url":"https://api.github.com/repos/control-center/serviced/assignees{/user}","branches_url":"https://api.github.com/repos/control-center/serviced/branches{/branch}","tags_url":"https://api.github.com/repos/control-center/serviced/tags","blobs_url":"https://api.github.com/repos/control-center/serviced/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/control-center/serviced/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/control-center/serviced/git/refs{/sha}","trees_url":"https://api.github.com/repos/control-center/serviced/git/trees{/sha}","statuses_url":"https://api.github.com/repos/control-center/serviced/statuses/{sha}","languages_url":"https://api.github.com/repos/control-center/serviced/languages","stargazers_url":"https://api.github.com/repos/control-center/serviced/stargazers","contributors_url":"https://api.github.com/repos/control-center/serviced/contributors","subscribers_url":"https://api.github.com/repos/control-center/serviced/subscribers","subscription_url":"https://api.github.com/repos/control-center/serviced/subscription","commits_url":"https://api.github.com/repos/control-center/serviced/commits{/sha}","git_commits_url":"https://api.github.com/repos/control-center/serviced/git/commits{/sha}","comments_url":"https://api.github.com/repos/control-center/serviced/comments{/number}","issue_comment_url":"https://api.github.com/repos/control-center/serviced/issues/comments{/number}","contents_url":"https://api.github.com/repos/control-center/serviced/contents/{+path}","compare_url":"https://api.github.com/repos/control-center/serviced/compare/{base}...{head}","merges_url":"https://api.github.com/repos/control-center/serviced/merges","archive_url":"https://api.github.com/repos/control-center/serviced/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/control-center/serviced/downloads","issues_url":"https://api.github.com/repos/control-center/serviced/issues{/number}","pulls_url":"https://api.github.com/repos/control-center/serviced/pulls{/number}","milestones_url":"https://api.github.com/repos/control-center/serviced/milestones{/number}","notifications_url":"https://api.github.com/repos/control-center/serviced/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/control-center/serviced/labels{/name}","releases_url":"https://api.github.com/repos/control-center/serviced/releases{/id}","deployments_url":"https://api.github.com/repos/control-center/serviced/deployments","created_at":"2013-08-06T16:45:00Z","updated_at":"2016-10-24T15:25:20Z","pushed_at":"2016-11-28T16:49:36Z","git_url":"git://github.com/control-center/serviced.git","ssh_url":"git@github.com:control-center/serviced.git","clone_url":"https://github.com/control-center/serviced.git","svn_url":"https://github.com/control-center/serviced","homepage":null,"size":130161,"stargazers_count":95,"watchers_count":95,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":14,"mirror_url":null,"open_issues_count":11,"forks":14,"open_issues":11,"watchers":95,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/control-center/serviced/pulls/3255"},"html":{"href":"https://github.com/control-center/serviced/pull/3255"},"issue":{"href":"https://api.github.com/repos/control-center/serviced/issues/3255"},"comments":{"href":"https://api.github.com/repos/control-center/serviced/issues/3255/comments"},"review_comments":{"href":"https://api.github.com/repos/control-center/serviced/pulls/3255/comments"},"review_comment":{"href":"https://api.github.com/repos/control-center/serviced/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/control-center/serviced/pulls/3255/commits"},"statuses":{"href":"https://api.github.com/repos/control-center/serviced/statuses/e1b88af47e17d1d5f3b3f15898a847d3c80c3a30"}}}}
{"actor":{"display_login":"smousa"}}