Skip to content
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

Implement dynamic ports in rkt driver #927

Closed
blalor opened this issue Mar 17, 2016 · 9 comments
Closed

Implement dynamic ports in rkt driver #927

blalor opened this issue Mar 17, 2016 · 9 comments

Comments

@blalor
Copy link
Contributor

blalor commented Mar 17, 2016

As of v0.3.1, the rkt driver does not support dynamic port allocation. Per the documentation:

This can lead to port conflicts and as such, this driver is being marked as experimental and should be used with care.

I believe this is stunting further adoption of rkt with Nomad.

@achanda
Copy link
Contributor

achanda commented Mar 17, 2016

That's true. Sorry it took this long, I am hoping to get this working over the weekend.

@jrg72
Copy link

jrg72 commented Jun 14, 2016

Has there been any progress on this? I'd also love to have this functionality.

@achanda
Copy link
Contributor

achanda commented Jun 15, 2016

Sorry for being so late on this. Unfortunately, I did not have a chance to work on this since a few months.

I could not find a way to expose arbitrary ports in rkt. From what I understand, ports have to be defined in the app image and then they can be exposed in the CLI. So, we cannot define a port randomly and map it 1:1 (unless there is a way which is not obvious from the docs). Given an app image with a port defined, we can do this:

  1. Read the image manifest to get the port definitions
  2. If those port names are in the dynamic ports config in the Nomad job, map the ports 1:1 using the rkt CLI
  3. Construct the env variables and put those in the container
    Will that work for you guys?

I opened a bug in rkt asking about this: rkt/rkt#2801

@blalor
Copy link
Contributor Author

blalor commented Aug 29, 2016

There's progress on this in #1616.

@minhdanh
Copy link

minhdanh commented Nov 7, 2016

As #1616 is merged and closed, does this means that dynamic ports is supported by rkt driver?

@schmichael
Copy link
Member

@minhdanh Yes! Sorry for not updating this ticket. I'd love to get some confirmation (other than my own testing) that it's working the way people need it to. I'm closing this issue, but if you get a chance to try out the 0.5 release candidate please feel free to file new issues or ping me in gitter: https://gitter.im/hashicorp-nomad/Lobby

@minhdanh
Copy link

minhdanh commented Nov 8, 2016

So I think the document may also need updated: https://www.nomadproject.io/docs/drivers/rkt.html

@schmichael
Copy link
Member

@minhdanh Ah, thanks! I forgot to update that big warning at the top. Luckily the new features are documented: https://www.nomadproject.io/docs/drivers/rkt.html#networking

I'll get that warning updated ASAP.

@github-actions
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants