-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[feature-request] Allow specifying port ranges in network stanza #3242
Comments
Thanks for the good writeup and use case @ryanmickler! Seems like something Nomad should handle better. |
2 use cases that being able to specify the dynamic port range in the network stanza would support:
|
I have recently solved this using a jinja template and a for loop within jinja to do something similar. FWIW, I changed the restart mode of the job to fail as all processes inside the job don't necessarily exist all the time. |
I solved this by setting some meta tags in the jobspec that defined my desired port range, writing a "harness" script that picked a port from that range, making sure no other processes were listening on that port, and then running my executable on that port. I have no network resource stanza in the jobspec now, but that seems to be just fine as far as Nomad is concerned. I can see how it may be wise to leave this sort of use case up to the user to solve. |
I think this fits into my current scenario Dockerfile
Do I need to expose those 200 ports explicitly into the nomad job specification file? That is 200 extra lines. |
This is a must support for nomad. When this will be implemented? |
Hi can you share from technical perspective, I need a port range scenario too, to solve my problems |
Another use case is WebRTC where typically a range of UDP ports need to be opened. |
exactly my issue, so having to drop nomad for now |
🤕 Just thinking and a curiosity question: An external job file generator like Levant, Nomad's Terraform provider ❓ , some jinja based wrapper, etc. did not work? I think one of the problems with block ranges would be how the port name would be referenced. As of today every port has an identifier. |
Thanks @shantanugadgil, Indeed, I ended up using terraform to provision the nomad job file (and deploy the job), so that i could loop over the ports. |
hmmm, yeah that would work. but I need to open up 10000 ports (yes, 10 thousand), for webrtc, 50-60k |
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
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
The text was updated successfully, but these errors were encountered: