From dffcc8bac6dff6054771b714db7edee17f565e33 Mon Sep 17 00:00:00 2001 From: Diptanu Choudhury Date: Mon, 14 Dec 2015 08:54:34 -0800 Subject: [PATCH 1/2] Changing the prefix of the service id --- nomad/structs/structs.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nomad/structs/structs.go b/nomad/structs/structs.go index 84a171e678f..265c0713ad5 100644 --- a/nomad/structs/structs.go +++ b/nomad/structs/structs.go @@ -1146,7 +1146,7 @@ func (sc *ServiceCheck) Hash(serviceId string) string { } const ( - NomadConsulPrefix = "nomad" + NomadConsulPrefix = "1729nomad" ) // The Service model represents a Consul service defintion From 68b1dd032edac922258985ef2532c94a7dbfbbed Mon Sep 17 00:00:00 2001 From: Diptanu Choudhury Date: Mon, 14 Dec 2015 11:14:22 -0800 Subject: [PATCH 2/2] Changing the prefix of the service --- client/consul_test.go | 12 ++++++------ nomad/structs/structs.go | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/client/consul_test.go b/client/consul_test.go index e7bb8012ee4..f2fb18ef880 100644 --- a/client/consul_test.go +++ b/client/consul_test.go @@ -290,8 +290,8 @@ func TestConsul_FilterNomadServicesAndChecks(t *testing.T) { Port: 8080, Address: "10.10.1.11", }, - "nomad-2121212": { - ID: "nomad-2121212", + "nomad-registered-service-2121212": { + ID: "nomad-registered-service-2121212", Service: "identity-service", Tags: []string{"global"}, Port: 8080, @@ -300,8 +300,8 @@ func TestConsul_FilterNomadServicesAndChecks(t *testing.T) { } expSrvcs := map[string]*consul.AgentService{ - "nomad-2121212": { - ID: "nomad-2121212", + "nomad-registered-service-2121212": { + ID: "nomad-registered-service-2121212", Service: "identity-service", Tags: []string{"global"}, Port: 8080, @@ -327,7 +327,7 @@ func TestConsul_FilterNomadServicesAndChecks(t *testing.T) { }, "212121212": { CheckID: "212121212", - ServiceID: "nomad-2121212", + ServiceID: "nomad-registered-service-2121212", Name: "ping", }, } @@ -335,7 +335,7 @@ func TestConsul_FilterNomadServicesAndChecks(t *testing.T) { expChks := map[string]*consul.AgentCheck{ "212121212": { CheckID: "212121212", - ServiceID: "nomad-2121212", + ServiceID: "nomad-registered-service-2121212", Name: "ping", }, } diff --git a/nomad/structs/structs.go b/nomad/structs/structs.go index 265c0713ad5..82723965c53 100644 --- a/nomad/structs/structs.go +++ b/nomad/structs/structs.go @@ -1146,7 +1146,7 @@ func (sc *ServiceCheck) Hash(serviceId string) string { } const ( - NomadConsulPrefix = "1729nomad" + NomadConsulPrefix = "nomad-registered-service" ) // The Service model represents a Consul service defintion