hashicorp / hashicorp/nomad

[feature-request] Allow specifying port ranges in network stanza

Open
#3,242 12 comments 27 reactions 0 assignees View on GitHub
theme/jobspec theme/networking type/enhancement
Dominant language
Go
Stars
17k
Forks
2.1k
Avg merge
1d 9h
Merged PRs (30d)
105

Description

I have a 'system' job that starts couchbase server instances, using the official couchbase server container. This container needs a lot of ports open (e.g. 21100-21299) to share data when running in clustered mode. The only way we've been able to get this to work

```hcl
network {
#...
port "nodeDataA" { static = 21100 }
port "nodeDataB" { static = 21101 }
port "nodeDataC" { static = 21102 }
#...
}
```
in the network block, and a similar thing in the `port_map` block. (you can imagine how huge the jobfile has become)

Is there another way to achieve this?

Can i suggest something like
```hcl
network {
# ...
port_block "nodeData" {
static_range_begin = 21100
static_range_end = 21299
}
# ...
}
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by tracing how the network stanza and port_map block represent individual static ports, then review the issue's proposed port_block shape and related configuration tests. Define the supported range semantics and update the configuration and validation coverage so a clustered Couchbase-style port range can replace repeated entries.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
infrastructure, networking
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.