You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to append the ${NOMAD_ALLOC_INDEX} to the service name. I have a task with count > 1 and I need to be able to talk to the services exposed by them individually.
Trying to use ${NOMAD_ALLOC_INDEX} in the service name gives the following error:
* service[0] "service-${NOMAD_ALLOC_INDEX}" validation failed: 1 error(s) occurred:
* service name must be valid per RFC 1123 and can contain only alphanumeric characters or dashes and must be less than 63 characters long: "service-${NOMAD_ALLOC_INDEX}"
Shouldn't this interpreted environment variable be available in the service name as Alex Dadgar confirmed in the conversation given below?
Nomad version
zeeshan@zeeshan:~$ nomad version
Nomad v0.4.0
Operating system and Environment details
Ubuntu 16.04
Reproduction steps
Put ${NOMAD_ALLOC_INDEX} in service name
Here is how the Nomad job specification template looks like:
I'm going to lock this issue because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Hi,
I am trying to append the ${NOMAD_ALLOC_INDEX} to the service name. I have a task with count > 1 and I need to be able to talk to the services exposed by them individually.
Trying to use ${NOMAD_ALLOC_INDEX} in the service name gives the following error:
Shouldn't this interpreted environment variable be available in the service name as Alex Dadgar confirmed in the conversation given below?
Nomad version
zeeshan@zeeshan:~$ nomad version
Nomad v0.4.0
Operating system and Environment details
Ubuntu 16.04
Reproduction steps
Put ${NOMAD_ALLOC_INDEX} in service name
Here is how the Nomad job specification template looks like:
..
..
"Services": [
{
"Id": "",
"Name": "{{id}}-${NOMAD_ALLOC_INDEX}",
"Tags": [
"protocol-http"
],
..
..
Detailed Error Message
Conversation on https://gitter.im/hashicorp-nomad/Lobby:
Christian Winther @jippi Oct 14 16:11
${NOMAD_ALLOC_INDEX} straight up doesn’t work?
...
Christian Winther @jippi Oct 14 16:13
ah, those Environment Variables can’t be used there
Frank Rosner @FRosner Oct 14 16:13
@jippi so it's not expanding the variable. Yep
...
Alex Dadgar @dadgar Oct 14 19:21
@FRosner That is a bug, it should be interpretable
Can you file an issue
The text was updated successfully, but these errors were encountered: