{"action":"created","issue":{"url":"https://api.github.com/repos/hashicorp/nomad/issues/658","labels_url":"https://api.github.com/repos/hashicorp/nomad/issues/658/labels{/name}","comments_url":"https://api.github.com/repos/hashicorp/nomad/issues/658/comments","events_url":"https://api.github.com/repos/hashicorp/nomad/issues/658/events","html_url":"https://github.com/hashicorp/nomad/issues/658","id":125482807,"number":658,"title":"Zombie service registered if Service name is changed","user":{"login":"cleung2010","id":1883212,"avatar_url":"https://avatars.githubusercontent.com/u/1883212?v=3","gravatar_id":"","url":"https://api.github.com/users/cleung2010","html_url":"https://github.com/cleung2010","followers_url":"https://api.github.com/users/cleung2010/followers","following_url":"https://api.github.com/users/cleung2010/following{/other_user}","gists_url":"https://api.github.com/users/cleung2010/gists{/gist_id}","starred_url":"https://api.github.com/users/cleung2010/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cleung2010/subscriptions","organizations_url":"https://api.github.com/users/cleung2010/orgs","repos_url":"https://api.github.com/users/cleung2010/repos","events_url":"https://api.github.com/users/cleung2010/events{/privacy}","received_events_url":"https://api.github.com/users/cleung2010/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/hashicorp/nomad/labels/bug","name":"bug","color":"f7c6c7"},{"url":"https://api.github.com/repos/hashicorp/nomad/labels/discovery","name":"discovery","color":"B722E4"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-01-07T20:56:15Z","updated_at":"2016-01-07T21:51:27Z","closed_at":null,"body":"I encountered an issue where a Task was registered to Consul as service under a specific name, but after changing the name the old task name was still registered, in addition to the new one.\r\n\r\nInitially I had this JSON Service object in the job spec:\r\n```\r\n...\r\n\"Services\": [\r\n  {\r\n    \"Name\": \"helloworld\",\r\n    \"PortLabel\": \"http\"\r\n  }\r\n],\r\n...\r\n```\r\nRunning this job registered the `helloworld.service.dc1.consul` service. I then changed the service name to be the following:\r\n\r\n```\r\n...\r\n\"Services\": [\r\n  {\r\n    \"Name\": \"nomad-helloworld\",\r\n    \"PortLabel\": \"http\"\r\n  }\r\n],\r\n...\r\n```\r\nThis registered `nomad-helloworld.service.dc1.consul`, but `helloworld.service.dc1.consul` was also still registered.\r\n"},"comment":{"url":"https://api.github.com/repos/hashicorp/nomad/issues/comments/169817223","html_url":"https://github.com/hashicorp/nomad/issues/658#issuecomment-169817223","issue_url":"https://api.github.com/repos/hashicorp/nomad/issues/658","id":169817223,"user":{"login":"diptanu","id":21833,"avatar_url":"https://avatars.githubusercontent.com/u/21833?v=3","gravatar_id":"","url":"https://api.github.com/users/diptanu","html_url":"https://github.com/diptanu","followers_url":"https://api.github.com/users/diptanu/followers","following_url":"https://api.github.com/users/diptanu/following{/other_user}","gists_url":"https://api.github.com/users/diptanu/gists{/gist_id}","starred_url":"https://api.github.com/users/diptanu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/diptanu/subscriptions","organizations_url":"https://api.github.com/users/diptanu/orgs","repos_url":"https://api.github.com/users/diptanu/repos","events_url":"https://api.github.com/users/diptanu/events{/privacy}","received_events_url":"https://api.github.com/users/diptanu/received_events","type":"User","site_admin":false},"created_at":"2016-01-07T21:51:27Z","updated_at":"2016-01-07T21:51:27Z","body":"@cleung2010 This will be fixed in 0.3"}}