Files
nomad/command/agent
Danielle Lancashire efdfef868f consul: Include port-label in service registration
It is possible to provide multiple identically named services with
different port assignments in a Nomad configuration.

We introduced a regression when migrating to stable service identifiers where
multiple services with the same name would conflict, and the last definition
would take precedence.

This commit includes the port label in the stable service identifier to
allow the previous behaviour where this was supported, for example
providing:

```hcl
service {
  name = "redis-cache"
  tags = ["global", "cache"]
  port = "db"
  check {
    name     = "alive"
    type     = "tcp"
    interval = "10s"
    timeout  = "2s"
  }
}

service {
  name = "redis-cache"
  tags = ["global", "foo"]
  port = "foo"

  check {
    name     = "alive"
    type     = "tcp"
    port     = "db"
    interval = "10s"
    timeout  = "2s"
  }
}

service {
  name = "redis-cache"
  tags = ["global", "bar"]
  port = "bar"

  check {
    name     = "alive"
    type     = "tcp"
    port     = "db"
    interval = "10s"
    timeout  = "2s"
  }
}
```

in a nomad task definition is now completely valid. Each service
definition with the same name must still have a unique port label however.
2019-06-13 15:24:54 +02:00
..
2018-03-11 17:43:19 +00:00
2017-10-13 13:12:20 -07:00
2018-02-15 13:59:01 -08:00
2018-09-13 10:43:40 -07:00
2018-09-13 10:43:40 -07:00
2018-03-11 18:35:30 +00:00
2018-10-16 16:56:55 -07:00
2017-10-13 14:36:02 -07:00
2018-01-17 10:29:15 -05:00
2017-07-20 09:36:34 -07:00
2017-07-20 09:36:34 -07:00
2017-09-26 15:26:33 -07:00
2018-09-13 10:43:40 -07:00
2018-05-30 17:27:04 -05:00
2017-07-20 09:36:34 -07:00
2018-09-13 10:43:40 -07:00
2018-09-13 10:43:40 -07:00
2017-09-07 17:04:21 -07:00
2018-02-15 13:59:02 -08:00
2017-07-20 09:36:34 -07:00
2017-09-19 10:08:23 -05:00
2019-01-22 15:44:31 -08:00
2019-01-22 15:44:31 -08:00
2017-07-20 09:36:34 -07:00