{"action":"created","comment":{"url":"https://api.github.com/repos/rancherio/cattle/pulls/comments/30466117","id":30466117,"diff_hunk":"@@ -0,0 +1,173 @@\n+package io.cattle.platform.servicediscovery.deployment.impl;\n+\n+import static io.cattle.platform.core.model.tables.ImageTable.IMAGE;\n+import static io.cattle.platform.core.model.tables.InstanceTable.INSTANCE;\n+import io.cattle.platform.core.constants.CommonStatesConstants;\n+import io.cattle.platform.core.constants.InstanceConstants;\n+import io.cattle.platform.core.model.Image;\n+import io.cattle.platform.core.model.Instance;\n+import io.cattle.platform.core.model.Service;\n+import io.cattle.platform.core.model.ServiceExposeMap;\n+import io.cattle.platform.deferred.util.DeferredUtils;\n+import io.cattle.platform.engine.process.impl.ProcessCancelException;\n+import io.cattle.platform.object.ObjectManager;\n+import io.cattle.platform.object.process.ObjectProcessManager;\n+import io.cattle.platform.object.process.StandardProcess;\n+import io.cattle.platform.object.resource.ResourceMonitor;\n+import io.cattle.platform.object.resource.ResourcePredicate;\n+import io.cattle.platform.servicediscovery.api.dao.ServiceExposeMapDao;\n+import io.cattle.platform.servicediscovery.deployment.DeploymentUnitInstance;\n+import io.cattle.platform.servicediscovery.resource.ServiceDiscoveryConfigItem;\n+import io.cattle.platform.servicediscovery.service.ServiceDiscoveryService;\n+import io.cattle.platform.storage.service.StorageService;\n+\n+import java.io.IOException;\n+import java.util.HashMap;\n+import java.util.List;\n+import java.util.Map;\n+import java.util.concurrent.Callable;\n+\n+import org.apache.commons.lang3.tuple.Pair;\n+\n+public class RegularDeploymentUnitInstance extends DeploymentUnitInstance {","path":"code/iaas/service-discovery/server/src/main/java/io/cattle/platform/servicediscovery/deployment/impl/RegularDeploymentUnitInstance.java","position":32,"original_position":32,"commit_id":"807e3a74c1156b0e11ef787fcbb3d8e075df51cc","original_commit_id":"1f0ad4a7c2c5c69e200c980e4f5cdda9101da83b","user":{"login":"ibuildthecloud","id":1754002,"avatar_url":"https://avatars.githubusercontent.com/u/1754002?v=3","gravatar_id":"","url":"https://api.github.com/users/ibuildthecloud","html_url":"https://github.com/ibuildthecloud","followers_url":"https://api.github.com/users/ibuildthecloud/followers","following_url":"https://api.github.com/users/ibuildthecloud/following{/other_user}","gists_url":"https://api.github.com/users/ibuildthecloud/gists{/gist_id}","starred_url":"https://api.github.com/users/ibuildthecloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ibuildthecloud/subscriptions","organizations_url":"https://api.github.com/users/ibuildthecloud/orgs","repos_url":"https://api.github.com/users/ibuildthecloud/repos","events_url":"https://api.github.com/users/ibuildthecloud/events{/privacy}","received_events_url":"https://api.github.com/users/ibuildthecloud/received_events","type":"User","site_admin":false},"body":"nit: Maybe `DefaultDeploymentUnitInstance` would be a better name.  Who's to say what is regular or not.  It just feels this may seem unkind if you also create a `StarBellySneetchDeploymentUnitInstance` who will then feel as though he is not as important as the `RegularDeploymentUnitInstance` manager.","created_at":"2015-05-17T00:28:50Z","updated_at":"2015-05-17T00:28:50Z","html_url":"https://github.com/rancherio/cattle/pull/430#discussion_r30466117","pull_request_url":"https://api.github.com/repos/rancherio/cattle/pulls/430","_links":{"self":{"href":"https://api.github.com/repos/rancherio/cattle/pulls/comments/30466117"},"html":{"href":"https://github.com/rancherio/cattle/pull/430#discussion_r30466117"},"pull_request":{"href":"https://api.github.com/repos/rancherio/cattle/pulls/430"}}},"pull_request":{"url":"https://api.github.com/repos/rancherio/cattle/pulls/430","id":35295980,"html_url":"https://github.com/rancherio/cattle/pull/430","diff_url":"https://github.com/rancherio/cattle/pull/430.diff","patch_url":"https://github.com/rancherio/cattle/pull/430.patch","issue_url":"https://api.github.com/repos/rancherio/cattle/issues/430","number":430,"state":"open","locked":false,"title":"Service Discovery Replication controller","user":{"login":"alena1108","id":1562176,"avatar_url":"https://avatars.githubusercontent.com/u/1562176?v=3","gravatar_id":"","url":"https://api.github.com/users/alena1108","html_url":"https://github.com/alena1108","followers_url":"https://api.github.com/users/alena1108/followers","following_url":"https://api.github.com/users/alena1108/following{/other_user}","gists_url":"https://api.github.com/users/alena1108/gists{/gist_id}","starred_url":"https://api.github.com/users/alena1108/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alena1108/subscriptions","organizations_url":"https://api.github.com/users/alena1108/orgs","repos_url":"https://api.github.com/users/alena1108/repos","events_url":"https://api.github.com/users/alena1108/events{/privacy}","received_events_url":"https://api.github.com/users/alena1108/received_events","type":"User","site_admin":false},"body":"This PR adds:\r\n\r\n* refactoring to support replication controller model. ReplicationController is meant to reconcile the service to its scale by scaling up/down service instances. The reconcile can be triggered either by healthcheck update, or by service.activate called by an end user.\r\n\r\n* sidekick services support\r\n\r\n* volumesFrom service implementation\r\n\r\nThis PR modifies:\r\n\r\n* The way we set propagate labels to LB service instance. We used to set label defined in the service, to the LB; now we do it on per host map basis as each instance within the same lb service can get different affinity constraint labels.","created_at":"2015-05-13T05:45:01Z","updated_at":"2015-05-17T00:28:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e0152c28a703c27d98808283875789a438c506b4","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/rancherio/cattle/pulls/430/commits","review_comments_url":"https://api.github.com/repos/rancherio/cattle/pulls/430/comments","review_comment_url":"https://api.github.com/repos/rancherio/cattle/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rancherio/cattle/issues/430/comments","statuses_url":"https://api.github.com/repos/rancherio/cattle/statuses/807e3a74c1156b0e11ef787fcbb3d8e075df51cc","head":{"label":"alena1108:replication","ref":"replication","sha":"807e3a74c1156b0e11ef787fcbb3d8e075df51cc","user":{"login":"alena1108","id":1562176,"avatar_url":"https://avatars.githubusercontent.com/u/1562176?v=3","gravatar_id":"","url":"https://api.github.com/users/alena1108","html_url":"https://github.com/alena1108","followers_url":"https://api.github.com/users/alena1108/followers","following_url":"https://api.github.com/users/alena1108/following{/other_user}","gists_url":"https://api.github.com/users/alena1108/gists{/gist_id}","starred_url":"https://api.github.com/users/alena1108/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alena1108/subscriptions","organizations_url":"https://api.github.com/users/alena1108/orgs","repos_url":"https://api.github.com/users/alena1108/repos","events_url":"https://api.github.com/users/alena1108/events{/privacy}","received_events_url":"https://api.github.com/users/alena1108/received_events","type":"User","site_admin":false},"repo":{"id":28929339,"name":"cattle","full_name":"alena1108/cattle","owner":{"login":"alena1108","id":1562176,"avatar_url":"https://avatars.githubusercontent.com/u/1562176?v=3","gravatar_id":"","url":"https://api.github.com/users/alena1108","html_url":"https://github.com/alena1108","followers_url":"https://api.github.com/users/alena1108/followers","following_url":"https://api.github.com/users/alena1108/following{/other_user}","gists_url":"https://api.github.com/users/alena1108/gists{/gist_id}","starred_url":"https://api.github.com/users/alena1108/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alena1108/subscriptions","organizations_url":"https://api.github.com/users/alena1108/orgs","repos_url":"https://api.github.com/users/alena1108/repos","events_url":"https://api.github.com/users/alena1108/events{/privacy}","received_events_url":"https://api.github.com/users/alena1108/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/alena1108/cattle","description":"Infrastructure orchestration platform","fork":true,"url":"https://api.github.com/repos/alena1108/cattle","forks_url":"https://api.github.com/repos/alena1108/cattle/forks","keys_url":"https://api.github.com/repos/alena1108/cattle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alena1108/cattle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alena1108/cattle/teams","hooks_url":"https://api.github.com/repos/alena1108/cattle/hooks","issue_events_url":"https://api.github.com/repos/alena1108/cattle/issues/events{/number}","events_url":"https://api.github.com/repos/alena1108/cattle/events","assignees_url":"https://api.github.com/repos/alena1108/cattle/assignees{/user}","branches_url":"https://api.github.com/repos/alena1108/cattle/branches{/branch}","tags_url":"https://api.github.com/repos/alena1108/cattle/tags","blobs_url":"https://api.github.com/repos/alena1108/cattle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alena1108/cattle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alena1108/cattle/git/refs{/sha}","trees_url":"https://api.github.com/repos/alena1108/cattle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alena1108/cattle/statuses/{sha}","languages_url":"https://api.github.com/repos/alena1108/cattle/languages","stargazers_url":"https://api.github.com/repos/alena1108/cattle/stargazers","contributors_url":"https://api.github.com/repos/alena1108/cattle/contributors","subscribers_url":"https://api.github.com/repos/alena1108/cattle/subscribers","subscription_url":"https://api.github.com/repos/alena1108/cattle/subscription","commits_url":"https://api.github.com/repos/alena1108/cattle/commits{/sha}","git_commits_url":"https://api.github.com/repos/alena1108/cattle/git/commits{/sha}","comments_url":"https://api.github.com/repos/alena1108/cattle/comments{/number}","issue_comment_url":"https://api.github.com/repos/alena1108/cattle/issues/comments{/number}","contents_url":"https://api.github.com/repos/alena1108/cattle/contents/{+path}","compare_url":"https://api.github.com/repos/alena1108/cattle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alena1108/cattle/merges","archive_url":"https://api.github.com/repos/alena1108/cattle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alena1108/cattle/downloads","issues_url":"https://api.github.com/repos/alena1108/cattle/issues{/number}","pulls_url":"https://api.github.com/repos/alena1108/cattle/pulls{/number}","milestones_url":"https://api.github.com/repos/alena1108/cattle/milestones{/number}","notifications_url":"https://api.github.com/repos/alena1108/cattle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alena1108/cattle/labels{/name}","releases_url":"https://api.github.com/repos/alena1108/cattle/releases{/id}","created_at":"2015-01-07T19:10:53Z","updated_at":"2015-01-12T17:27:50Z","pushed_at":"2015-05-16T23:49:58Z","git_url":"git://github.com/alena1108/cattle.git","ssh_url":"git@github.com:alena1108/cattle.git","clone_url":"https://github.com/alena1108/cattle.git","svn_url":"https://github.com/alena1108/cattle","homepage":"","size":19419,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"rancherio:master","ref":"master","sha":"b98ea186730db2ebb18c74d49c4b768cd30ba6f3","user":{"login":"rancherio","id":9343010,"avatar_url":"https://avatars.githubusercontent.com/u/9343010?v=3","gravatar_id":"","url":"https://api.github.com/users/rancherio","html_url":"https://github.com/rancherio","followers_url":"https://api.github.com/users/rancherio/followers","following_url":"https://api.github.com/users/rancherio/following{/other_user}","gists_url":"https://api.github.com/users/rancherio/gists{/gist_id}","starred_url":"https://api.github.com/users/rancherio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rancherio/subscriptions","organizations_url":"https://api.github.com/users/rancherio/orgs","repos_url":"https://api.github.com/users/rancherio/repos","events_url":"https://api.github.com/users/rancherio/events{/privacy}","received_events_url":"https://api.github.com/users/rancherio/received_events","type":"Organization","site_admin":false},"repo":{"id":18023059,"name":"cattle","full_name":"rancherio/cattle","owner":{"login":"rancherio","id":9343010,"avatar_url":"https://avatars.githubusercontent.com/u/9343010?v=3","gravatar_id":"","url":"https://api.github.com/users/rancherio","html_url":"https://github.com/rancherio","followers_url":"https://api.github.com/users/rancherio/followers","following_url":"https://api.github.com/users/rancherio/following{/other_user}","gists_url":"https://api.github.com/users/rancherio/gists{/gist_id}","starred_url":"https://api.github.com/users/rancherio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rancherio/subscriptions","organizations_url":"https://api.github.com/users/rancherio/orgs","repos_url":"https://api.github.com/users/rancherio/repos","events_url":"https://api.github.com/users/rancherio/events{/privacy}","received_events_url":"https://api.github.com/users/rancherio/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rancherio/cattle","description":"Infrastructure orchestration platform","fork":false,"url":"https://api.github.com/repos/rancherio/cattle","forks_url":"https://api.github.com/repos/rancherio/cattle/forks","keys_url":"https://api.github.com/repos/rancherio/cattle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rancherio/cattle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rancherio/cattle/teams","hooks_url":"https://api.github.com/repos/rancherio/cattle/hooks","issue_events_url":"https://api.github.com/repos/rancherio/cattle/issues/events{/number}","events_url":"https://api.github.com/repos/rancherio/cattle/events","assignees_url":"https://api.github.com/repos/rancherio/cattle/assignees{/user}","branches_url":"https://api.github.com/repos/rancherio/cattle/branches{/branch}","tags_url":"https://api.github.com/repos/rancherio/cattle/tags","blobs_url":"https://api.github.com/repos/rancherio/cattle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rancherio/cattle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rancherio/cattle/git/refs{/sha}","trees_url":"https://api.github.com/repos/rancherio/cattle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rancherio/cattle/statuses/{sha}","languages_url":"https://api.github.com/repos/rancherio/cattle/languages","stargazers_url":"https://api.github.com/repos/rancherio/cattle/stargazers","contributors_url":"https://api.github.com/repos/rancherio/cattle/contributors","subscribers_url":"https://api.github.com/repos/rancherio/cattle/subscribers","subscription_url":"https://api.github.com/repos/rancherio/cattle/subscription","commits_url":"https://api.github.com/repos/rancherio/cattle/commits{/sha}","git_commits_url":"https://api.github.com/repos/rancherio/cattle/git/commits{/sha}","comments_url":"https://api.github.com/repos/rancherio/cattle/comments{/number}","issue_comment_url":"https://api.github.com/repos/rancherio/cattle/issues/comments{/number}","contents_url":"https://api.github.com/repos/rancherio/cattle/contents/{+path}","compare_url":"https://api.github.com/repos/rancherio/cattle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rancherio/cattle/merges","archive_url":"https://api.github.com/repos/rancherio/cattle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rancherio/cattle/downloads","issues_url":"https://api.github.com/repos/rancherio/cattle/issues{/number}","pulls_url":"https://api.github.com/repos/rancherio/cattle/pulls{/number}","milestones_url":"https://api.github.com/repos/rancherio/cattle/milestones{/number}","notifications_url":"https://api.github.com/repos/rancherio/cattle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rancherio/cattle/labels{/name}","releases_url":"https://api.github.com/repos/rancherio/cattle/releases{/id}","created_at":"2014-03-23T00:19:52Z","updated_at":"2015-05-11T21:11:49Z","pushed_at":"2015-05-16T23:49:59Z","git_url":"git://github.com/rancherio/cattle.git","ssh_url":"git@github.com:rancherio/cattle.git","clone_url":"https://github.com/rancherio/cattle.git","svn_url":"https://github.com/rancherio/cattle","homepage":"","size":25516,"stargazers_count":132,"watchers_count":132,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":31,"mirror_url":null,"open_issues_count":84,"forks":31,"open_issues":84,"watchers":132,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rancherio/cattle/pulls/430"},"html":{"href":"https://github.com/rancherio/cattle/pull/430"},"issue":{"href":"https://api.github.com/repos/rancherio/cattle/issues/430"},"comments":{"href":"https://api.github.com/repos/rancherio/cattle/issues/430/comments"},"review_comments":{"href":"https://api.github.com/repos/rancherio/cattle/pulls/430/comments"},"review_comment":{"href":"https://api.github.com/repos/rancherio/cattle/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rancherio/cattle/pulls/430/commits"},"statuses":{"href":"https://api.github.com/repos/rancherio/cattle/statuses/807e3a74c1156b0e11ef787fcbb3d8e075df51cc"}}}}